views:

258

answers:

2

I've been doing some development on a branch and realized that before it could be complete something else need to be done first. I decided that I would branch my current branch and do the requiste changes in that branch then merge them back together and then merge my working branch into default. Basically I expected this:

| | + requiste work branch commit.
| |/
| + working branch commit
|/
+Default branch commit

and in the end what I expect to do is this:

+ Merge into defualt
|\
| + Merge requisite work into working branch
| | \
| | + requiste work branch commit.
| |/
| + working branch commit
|/
+Default branch commit

What I'm getting in both hg view and hg serve is this:

| + requiste work branch commit.
| |
| + working branch commit
|/
+Default branch commit

However, when I look at the commit log "requiste work branch commit" is marked as a part of a different branch.

Am I doing something wrong? Is this a bug in hg view and hg serve? Anyone experienced this before?

+2  A: 

The missing link here is that there is no commit on which is a child of "working branch commit" and not on the same branch as "requisite work branch commit". Thus, as one is a child of the other and there's nothing to show in a third column, you only see two columns. For the same reason, merging "req..." with "working..." is currently meaningless.

jharlap
+5  A: 

If there are no further commits on the first branch after "working branch commit" (except on the second branch), then the view may appear as a straight line (which is what you are seeing). I suspect that the reason for this is merely an optimization in the display code. As soon as you make another commit to the first branch, it should display the way that you are expecting.

Adam Batkin
This is correct. Essentially, Mercurial's viewer is efficient and only creates the visualization path for separate branches when it actually needs to.
Amber