Search code examples
mercurialdvcs

In hg how do I pull all remotes/paths in one command?


I'm looking for the equivalent of git fetch --all. I currently have three different remote paths configured for my repository. hg paths shows all three. How do I do hg pull --all to fetch the new change sets from all remote repositories?


Solution

  • I figured out how to do this with an alias. In your ~/.hgrc add:

    [alias]
    pullall = !$HG paths | cut -f 1 -d ' ' | xargs -n 1 $HG pull
    

    Then you can run hg pullall to fetch all the remotes.