Pondering revert after merge
Adrian Buehlmann
adrian at cadifra.com
Wed May 7 19:22:13 UTC 2008
After having expanded TutorialMerge on the wiki,
I asked myself again why doing a "hg revert -all"
after a "hg merge" shouldn't also change the parents
of the working dir back to the single parent 1 like
before the merge (instead of leaving the two parents
as caused by the "hg merge").
Stupidly committing such a failed "undoing the merge"
creates quite a messy merge in the repo.
To undo a "hg merge" before committing, we currently
must use "hg update -C -r <id>" because revert doesn't
change parents.
While this is usually fine (revert not changing parent),
and can be used for tricks like ConcatenatingChangesets,
it feels a bit odd, since revert is such a common knee jerk
reaction if any fishy feeling comes up after tweaking
the working dir.
I really wonder if some bad merges seen in the wild
could be avoided with this.
Just thinking...
More information about the Mercurial
mailing list