>>>> "Jerry" == Jerry James
<james(a)xemacs.org> writes:
Jerry> I would like to avoid what I just went through. I pulled in the
Jerry> latest changes, got a merge conflict on two ChangeLogs, and then
Jerry> had to figure out how to use meld (the tool selected by
Jerry> mercurial).
I found the meld UI very unintuitive, possibly because my mind has been
warped by other merge programs. I ended up writing a wrapper around
ediff-merge-files-with-ancestor, which I use with this entry in ~/.hgrc:
[merge-tools]
xmerge.gui=True
xmerge.args=$local $base $other $output
xmerge.priority=1
xmerge.premerge=false
-----8<-----8<-----
#! /bin/sh
#
# Wrapper over XEmacs ediff-merge-files-with-ancestor.
#
# The Mercurial 0.9.5 man page apparently lists the HGMERGE args in
# the wrong order.
usage="xmerge child ancestor parent [output]"
fail() {
echo >&2 xmerge: $*
exit 1
}
#
# Sanity-test parameters.
#
[ $# -lt 3 ] && fail "usage:" "$usage"
[ $# -gt 4 ] && fail "usage:" "$usage"
parent=$3
child=$1
ancestor=$2
if [ $# -eq 4 ]; then
resfile=$4
overwrite_child=no
else
resfile=`mktemp /tmp/xmergeXXXXXX`
[ -n "$resfile" ] || exit 1
overwrite_child=yes
fi
#
# It'd be nice if we could use gnuclient, to avoid the cost of
# starting a new XEmacs, but then how would we know when the user has
# finished merging?
#
xemacs -eval "(ediff-merge-files-with-ancestor \"$parent\"
\"$child\" \"$ancestor\" nil \"$resfile\")"
stat=$?
if [ $stat -eq 0 ]; then
if [ $overwrite_child = yes ]; then
mv $resfile $child
stat=$?
fi
else
rm -f $resfile
fi
exit $stat
----->8----->8-----
mike
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta