vdiff + 3-way diff?
Vladimir Marek
Vladimir.Marek at Sun.COM
Wed Nov 14 18:12:28 UTC 2007
Hi,
> I'm using vdiff with kdiff3. It appears that vdiff does only 2-way diff?
> Is this correct? If so, it would be better to allow 3-way.
I'm using this modification to hgmerge:
============================= hgmerge.diff =============================
--- a/hgmerge Mon Nov 12 10:49:26 2007 -0800
+++ b/hgmerge Fri Sep 14 19:21:27 2007 +0100
@@ -12,6 +12,7 @@
# HG_OTHER_NODE revision being merged
set -e # bail out quickly on failure
+set -x
LOCAL="$1"
BASE="$2"
@@ -166,12 +167,15 @@ fi
fi
# Attempt to do a merge with $EDITOR
-if [ -n "$MERGE" -o -n "$DIFF3" ]; then
+if [ -n "$EDITOR" ]; then
echo "conflicts detected in $LOCAL"
cp "$BACKUP" "$CHGTEST"
case "$EDITOR" in
"emacs")
$EDITOR "$LOCAL" --eval '(condition-case nil (smerge-mode
1) (error nil))' || failure
+ ;;
+ "vim")
+ $EDITOR -d "$LOCAL" "$OTHER" "$BASE"
;;
*)
$EDITOR "$LOCAL" || failure
========================================================================
However I'm not very satisfied with it to be true. Say, if there is
difference between LOCAL and BASE, it will also highlight the affected
line in OTHER. Also if the file in question uses some rich syntax
highlighting, and vimdiff adds another color layer over it, it's
sometimes hard to make my way through the color mess.
It's a bit offtopic, but any three_way_merging_in_vim tips welcome :)
Thanks
--
Vlad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 185 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20071114/8d37964d/attachment-0001.asc>
More information about the Mercurial
mailing list