Tuesday, April 13, 2010

Merging in Mercurial

I'm using TortoiseHg and trying to get the hang of merging changes from multiple contributors so I setup a small test and did some changes and commits and pulled each one into a main repository without doing any merges (except one at the beginning). This is what the tree looked like.




 Then I tried to do a number of different merges and found that nothing really worked (or in the end made sense) except for merging from the bottom of the graph to the tip. When I started doing this things started flowing smoothly. I had lots of conflicts because I made sure that each time I changed a file I changed the same line in different locations to force conflicts. The conflicts were easily resolved in the default KDiff3 text merge tool. This is what the graph ended up looking like in the end.



No comments:

Post a Comment