1

I'm fairly new to Kiln + Mercurial, but recently I started creating branch repositories and modifying my source from two computers. After a few commits, I noticed lines/graphs on the history view in Kiln, along with commits labeled "Automated Merge with ..." that I'm struggling to understand.

Note: This pic is from the main repository. It has never had any merges from the branch repository, so everything here (eg. all the automated merges) are from the same repository. I blanked out any potentially-sensitive stuff, but hopefully there's still enough info for the questions.

Kiln History View

So, the Yellow line, I think I understand. I have a second copy of the repository on my work machine. I updated a readme on it, and I reckon that I did a commit back on my Mac before I did a fetch. This would be why the "Updated doc" seems to merge in after another commit from my Mac.

I'd also guess, that I didn't fetch from my work machine for ages - and the "Updated readme" (also on my work machine) was done in a stale copy, which was again merged in after many other commits with a fetch on my home Mac.

The questions I have are:

  1. What are the red and light blue lines? I've only ever hard two copies of the repo - one on my Mac, and one on my work machine. How can I have all of these "parallel streams"? I believe all changes on the "main line", the light blue and the red where all done in the same repository.

  2. What are these "Automated merge with..." lines? If I view the changes, they look like changes I've made, but I would've thought all of my changes would appear along with the comment I entered when I committed. These merges make it look like I've made changes without entering proper comments.

flag

1 Answer

3

It is possible – depending on when and where you commit, push, and merge your changes – that two repositories create more than two lines of development, which is what you see above. In particular, a graph like this tends to come from working on a repo that you haven't updated in a while, then pulling and merging (or fetching), and then later doing the same thing (specifically, adding changesets before pulling and merging) on a different system.

Technically speaking, there's no problem with it; Mercurial is designed to handle all sorts of workflow, including this. However, if you'd like a more linear history, I would suggesting pulling new changes before you begin doing new work. That will make sure that your new changes go on top of the old changes, instead of parallel to them.

"Automated merge with..." lines are generated by the Fetch Extension. See the second half of my answer to Merge from Branch? for more information on exactly what fetch is doing. In short, it is a merge that Mercurial is doing for you as a part of hg fetch.

link|flag
Thanks for the info. I don't mind the history looking like this, I'm just trying to understand it better. The reason the "Automated Merge" was confusing, is that it seems to show changes both sides (so it looks like the same changes have been made twice, in the merge, and in the previous changesets for each "branch"). However, I guess if I consider this as two branches being joined, rather than one branch being merged into the other, then this makes sense? – Danny Tuppeny Jan 20 2011 at 21:32
Thinking about it, it has to be this way, since I guess if the merge hadn't been automatically committed, I could have made changes that weren't the same as the original change sets (or there could have been conflicts). I think I was just confused because the graph makes it look like one of the branches/heads had the other merged into it, when really they were just merged together, the change set being the result of both sides changes. I guess this actually cant be any different to CVS/SVN, as merges can result in changes outside of the originals anyway! – Danny Tuppeny Jan 20 2011 at 22:15

Your Answer

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