
If Mercurial does need to prompt, it will fail instead. When set, ensures Mercurial doesn't prompt for anything. # The synchronization is running in non-interactive mode. Adds the `-f` argument to the `hg push` command. # Forces the push, even if it will create multiple heads. Only this boookmark and changesets before it are pushed. Adds the `-new-branch` argument to the `hg push` command. The repository at `C:\Projects\PsHg` will be synchronized with its remote repository. PS> Sync-HgRepository -RepoRoot C:\Projects\PsHg The local repository in the current directory will be synchronized with its remote repository.

If the synchronization succeeds, sets the `$PsHg?` variable to `$true`. Returns the output of the the Mercurial push commands it runs. If a pull brings in multiple heads in another branch, the script will stop and you�ll have to go to that branch, merge those heads, then re-run Sync-HgRepository.ps1. Once you commit the merge, you can re-run Sync-HgRepository.ps1. If the merge results in any conflicts or merged files, the script stops so you can resolve the conflicts and review the merged files. It repeats until the push succeeds or fails and there are no incoming changes. If the push fails because there are incoming changes, it pulls those changes down, merges them, commits the merge (if there were no conflicts or merged files), then tries to push again. As long as a merge doesn't make any new, local modifications, the pull/merge/commit/push cycle will repeat until the push succeeds. This script combines all these operations. Hg commit -m "My change are done! Woot!"Ībort: push creates new remote head addbadbeddadĪnd sometimes you have to repeat the pull/merge/commit/push cycle multiple times.
