Reviewing Merges
Johannes Stezenbach
js at sig21.net
Sun Mar 8 22:18:58 UTC 2009
Hi,
one of the linux/drivers/media/ developers using the Mercurial
repositories on linuxtv.org mentioned to me that it is too
difficult to review merges. I.e. after having reviewed
and tested the changes, the maintainer pulls and merges.
It should then be trivial for the developer to check that the
merge went well (or if the maintainer botched it).
Well, I thought that's easy, just use "hg view" (hgk) and
click on the merge changeset, it does the right thing.
But it turns out that:
a) hgk isn't installed by default
b) the merge review feature (i.e. suppression of uninteresting
changes in the merge changeset's diff) of hgk isn't documented
c) there appears to be no easy way to do the equivalent without hgk
(i.e. on the command line or using the web interface)
Or maybe I missed it, but I couldn't find anything with
a web search or in the Wiki.
As a simple example, look at
http://selenic.com/repo/index.cgi/hg/rev/edcb56991afe
What hgk does is:
- hg debug-merge-base to find 25fc4c620e54
- gather the list of files changed between the
merge base and both parents of edcb56991afe
- only show the diff for those files changed in both branches,
plus what the files the merge changeset itself changed
(or something like this, I didn't have the patience to
read through the hgk Tcl/Tk code in detail)
Which is much easier to digest, and if the merge
was trivial this hgk diff is empty, which is the desired
proof that the merge is OK (e.g. for b136c6c5c1c7
or 896eaa1337bf).
I'm currently not able to pursue this issue myself, it would
be cool if someone could look into this. Or give me some
pointers in case I missed something obvious.
Thanks,
Johannes
More information about the Mercurial-devel
mailing list