3

1

Here's a picture that shows three graph views of the same rep:alt text

Why is it that only the web view of TortoiseHG shows what really happend? Why are the Repository Explorer AND Kiln showing it switched around?

Here's what I've done:

  1. I created the rep and commited "inital version" and "a commit".
  2. Then I branched the rep and cloned it
  3. I commited "trunk commit" to the original rep
  4. I commited "branch commit" to the branch rep
  5. I then pulled the changes from trunk to my branch rep
  6. I merged & commited them
  7. I pushed everything back to both reps

I'm pretty sure I did everything according to the Kiln Branch and Merge How-To

flag

3 Answers

4

As far as I understand Hg: there's no notion of
"Trunk, which should be the straight line"'
and
"Branch, which should pop out sideways".
Those 2 names where just the names of the clones of the repositories you made the changes in.
And those names are not stored in the committed changeset.
So both lines are equivalent in Hg's eyes.

Maybe the web view of TortoiseHG takes into account the TTB naming convention in the summary?

link|flag
The repository names where "Test Rep" and "Test Rep Branch". It was just MY assumption that the original rep would be the straight line and any branch would "pop out sideways" :) If both lines are equal, maybe the representation should display this with "two poped out lines"? – Chris M. Mar 15 2010 at 18:19
Indeed, in hginit.com/05.html branches are visualised symmetrically, and here too: hgbook.red-bean.com/read/… . I assume Kiln's representation was just simpler to draw? – jan Mar 15 2010 at 20:29
2

You haven't done anything wrong. In fact, the data being shown in all three of these views is identical. The only difference, as you point out, is the orientation of the branch commit's "dot" with respect to the trunk.

There isn't actually an incorrect representation in any of these views, but you have pointed out a slight difference in the way our graph is calculated. I'll open a case for our DAG expert to take a peek...but for the moment rest assured that nothing is lost or wrong.

link|flag
Thanks! Will you update your answer if you get a reply? – Chris M. Mar 15 2010 at 18:16
Yes...jan's answer is also correct. – Ben Kamens Mar 15 2010 at 18:20
1

I'd say that tortoiseHg and Kiln could be considered more correct - By your description, you were on the branch commit, pulled the change from trunk and merged it. Thus you merged trunk onto your branch. In Mercurial terms, "Branch Commit" is your parent0 (the one merged into) and "A Trunk Commit" is your parent1 (the one merged in).

In reality, there is no right or wrong, it is quite arbitrary which parent of a merge is the "main" parent in any graph representation. If you were using named branches and merged the way you did however, you would have merged the latest "trunk" to "branch", which is not what you intended.

To Get Kiln to show what you want, you should have pulled trunk, hg up "trunk", hg merge "branch", then the "trunk" would have been parent0.

Matt

link|flag

Your Answer

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