Danek Duvall wrote:
> hg heads --template "{node} " | read head1 head2
> hg debugancestor $head1 $head2 | IFS=: read junk ancestor
> hg status --rev $ancestor:$head1
> hg status --rev $ancestor:$head2
Excellent, thanks - a much more elegant approach than my manual determination
of ancestor and a bunch of greppery. I have wrapped the above up in a
brute-force Perl script which summarizes the two branches as below -
script attached since I hope other will find it of use:
Usage: hgbrsum [-a]
-a reports on files unique to each branch, the default is just to
report those common to both branches. The characters preceding
a path are as per 'hg help status', and for shared paths
the format is "<set1>,<set2>" with set1 being from branch 1 status
and set2 from the other branch.
For example, my merge from build 95 to 96:
(gavinm at hyper:/tank/scratch/gavinm/fx-merge-96.hg )-> ~/bin/hgbrsum -a
Branch 1: 095b8552fd2082b92511de63ccb595a1f5772359
Branch 2: ad24795291bfbd07b585d72d17e610702b77c06f
Ancestor: 4575049c1ae79a02dbd3a37170461a5301212476
Common to both branches:
M,M usr/src/cmd/fm/eversholt/files/i386/i86pc/amd64.esc
M,M usr/src/cmd/fm/eversholt/files/i386/i86pc/gcpu.esc
M,M usr/src/cmd/fm/eversholt/files/i386/i86pc/gcpu_amd.esc
M,M usr/src/cmd/fm/eversholt/files/i386/i86pc/intel.esc
M,M usr/src/cmd/fm/fmd/common/fmd_api.c
M,M usr/src/cmd/fm/fmd/common/fmd_api.h
M,M usr/src/cmd/fm/fmd/common/fmd_api.map
M,M usr/src/cmd/fm/fmd/common/fmd_asru.c
M,M usr/src/cmd/fm/fmd/common/fmd_fmri.c
M,M usr/src/cmd/fm/fmd/common/fmd_fmri.h
M,M usr/src/cmd/fm/modules/common/cpumem-retire/cma_main.c
M,M usr/src/cmd/fm/schemes/hc/scheme.c
M,M usr/src/cmd/fm/schemes/mem/mem.c
M,M usr/src/lib/fm/topo/libtopo/common/hc.c
M,M usr/src/lib/fm/topo/libtopo/common/libtopo.h
M,M usr/src/lib/fm/topo/libtopo/common/mapfile-vers
M,M usr/src/lib/fm/topo/libtopo/common/topo_fmri.c
M,M usr/src/lib/fm/topo/libtopo/common/topo_hc.h
M,M usr/src/lib/fm/topo/libtopo/common/topo_mod.h
M,M usr/src/lib/fm/topo/modules/i86pc/chip/chip.h
M,M usr/src/lib/fm/topo/modules/i86pc/chip/chip_amd.c
M,M usr/src/lib/fm/topo/modules/i86pc/chip/chip_subr.c
M,M usr/src/lib/fm/topo/modules/sun4v/platform-mem/mem.c
M,M usr/src/pkgdefs/SUNWcakrx.i/prototype_com
M,M usr/src/pkgdefs/SUNWfmd/prototype_com
M,M usr/src/pkgdefs/SUNWfmd/prototype_i386
M,M usr/src/pkgdefs/SUNWfmd/prototype_sparc
M,M usr/src/uts/common/Makefile.files
M,M usr/src/uts/common/sys/fm/protocol.h
M,M usr/src/uts/i86pc/Makefile.files
M,M usr/src/uts/i86pc/os/cpuid.c
M,M usr/src/uts/i86xpv/Makefile.files
M,M usr/src/uts/i86xpv/Makefile.i86xpv.shared
M,M usr/src/uts/i86xpv/os/xpv_panic.c
M,M usr/src/uts/intel/sys/x86_archext.h
Unique to branch 1:
M .hgtags
A deleted_files/usr/src/cmd/fps/Makefile.inc
A deleted_files/usr/src/cmd/fps/Makefile.subdirs
A deleted_files/usr/src/common/crypto/aes/aes_cbc_crypt.c
A deleted_files/usr/src/common/crypto/aes/aes_cbc_crypt.h
A deleted_files/usr/src/common/crypto/blowfish/blowfish_cbc_crypt.c
[ Remainder of stuff changed in 95->96 cut for brevity in this email ]
Unique to branch 2:
R deleted_files/usr/src/uts/i86xpv/generic_cpu/Makefile
M usr/src/cmd/devfsadm/misc_link.c
M usr/src/cmd/fm/fmd/common/fmd_time.c
M usr/src/cmd/fm/modules/SUNW,SPARC-Enterprise/cpumem-retire/Makefile
M usr/src/cmd/fm/modules/common/cpumem-retire/Makefile
[ Remainder of our project branch cut for brevity ]
Thanks
Gavin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: hgbrsum
URL:
<http://mail.opensolaris.org/pipermail/on-discuss/attachments/20080815/f3049754/attachment.ksh>