Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have cloned the default branch of a big repository and now I wish to pull from the server using the TortoiseHg client.

However, TortoiseHg proposes to pull from all the branches. Is it possible to instruct it to pull from the current branch only?

So far I have seen suggestions to:

  • Setup a hook on the client side to reject pulls from unwanted branches
  • Check incoming revisions in TortoiseHg and only pull the ones belonging to the current branch
  • Use the Mercurial ACL extension to deny access to all the branches, but the current one.

I dislike all of these solutions, since all of them are client based. In all of them TortoiseHg actually pulls all of the branches (even in the second, where the pulled revisions are arranged into a bundle presented in the incoming revisions view)

Is there an hg pull -b BRANCH equivalent in TortoiseHg?

Thanks.

EDIT

I know how to do all of this using the Mercurial command line client - hg.exe. This question is specifically about the TortoiseHg GUI client.

share|improve this question
    
Have you tried doing this from the workbench? I'm not using Hg at work, so I can't test it here. –  MBraedley Nov 14 '11 at 14:48
    
I am using the workbench all the time and I could find any option there which would tell it to pull the current or the certain branch only. –  mark Nov 14 '11 at 14:56

2 Answers 2

This can be done from the Synchronize area of the Workbench. Click the Synchronize entry on the View menu or the Synchronize toolbar icon (2 green arrows appearing to form a circle). In the bottom right pane, click Options. Enter the branch name you'd like to pull in the Branch: edit box. Finish the pull as usual.

share|improve this answer
2  
This seem to be working. I'd suggest to specify . as the branch name, this way it will always refer to the branch you're working on. –  Helgi Apr 24 '12 at 15:27
hg pull -r <branch name>  

For more info: http://stackoverflow.com/questions/5796908/mercurial-how-can-i-import-only-some-changesets-from-a-repository/5798221#5798221

share|improve this answer
    
I have edited the question body. –  mark Nov 14 '11 at 14:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.