0

When I create a new branch with Mercurial, I'm able to pull only that certain branch with :

hg pull -b <branchname>

The console prints the number of the files that had been modified, so not a problem with this.

But when I do :

hg update

The repository is not updated and so I have to merge this new branch and return to "default" branch in order to have these updates.

please what is the problem here?

VBwhatnow
  • 2,219

1 Answers1

0

When you pull specific branch, you (by design) pull branch's HEAD and all it's ancestors

Mergeset, which merge this head into default branch (if exist) is not

  • ancestor of branch-head
  • changeset in branch <branchname>

and due to these two reasons can not be pulled.

It's not a problem, but correct and expected behavior.

If you asked "Why I didn't update to head", you have to re-read hg help update

If no changeset is specified, update to the tip of the current named branch

(i.e if your . was in default branch before, hg up will not change branch, you must hg up <branchname> for cross-branch updating)

Lazy Badger
  • 3,694