hg merge -r tipis NOT the same as
hg merge -r defaultBecause Mercurial's tip may be on a branch. tip is just the most recent changeset, anywhere. I have hit bugs caused by following hg recipes that talk about using -r tip. Sigh.
Andy "Krazy" Glew is a computer architect, a long time poster on comp.arch ... and an evangelist of collaboration tools such as wikis, calendars, blogs, etc. Plus an occasional commentator on politics, taxes, and policy. Particularly the politics of multi-ethnic societies such as Quebec, my birthplace. Photo credit: http://docs.google.com/View?id=dcxddbtr_23cg5thdfj
hg merge -r tipis NOT the same as
hg merge -r defaultBecause Mercurial's tip may be on a branch. tip is just the most recent changeset, anywhere. I have hit bugs caused by following hg recipes that talk about using -r tip. Sigh.
// working on branch B hg pull hg merge -r tip make test // make change to silence test error hg branch Bb // somehow copy old version of patched file to pre brahnch hg ci // on Bb hg update -r B // now work // when ready to merge, do the usual hg pull hg merge make test // now do the extra step to be confident that you aren't pushing anything broken hg update -r Bb hg merge -r B // now should have B, except for that one change that was tenative make test // see if the bug was fixed by someone else... // ok, now merge to default branch, and then push // - since I am paranoid, I might pull and test again hg update -r default hg merge -r Bb make test hg pushWorks, but is complicated. I am quite likely to forget that I am supposed to merge from branch B onto Bb before merging to the trunk. {{Category-VCS}}{{Category-hg}}
hg clone work-repo quick-fix cd quick-fix hg update -r default hg merge -r B .hgignore # to merge just the change to .hgignore into the trunk make clean;hg purge make test hg ci ... hg pushI.e. I want to merge JUST the change to .hgignore, using "hg merge -r B .hgignore". Instead I do
hg clone work-repo quick-fix cd quick-fix hg update -r default cp ../work-repo/.hgignore . make clean;hg purge make test hg ci ... hg pushI.e. "cp ../work-repo/.hgignore ." is used instead of "hg merge -r B .hgignore". Although this works, it makes me unhappy. E.g. I may blithely have overwritten other changes, e.g. if I cloned from the master rather than the work-repo. Not to mention the fact that the "hg push" abnove would push my branch. And my teammates do not want my branch to be pushed, because it has too many fine grain checkins - they want just a single checkin message. But that's another story.