# HG changeset patch # User mpm@selenic.com # Date 1118824040 28800 # Node ID f69a5d2d4fe1ecb6dbe1ca4a8ee5be2fc9397402 # Parent 9d8d9207c0b3aa6667e4bddf12f760493ca3c95a merge3: fix argument order -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 merge3: fix argument order We were passing the wrong argument order to hgmerge. Add a merge conflict test case. manifest hash: 2d88786a3f31dcaa9d44f564c21f0d2a4f14f09c -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD4DBQFCr+ZoywK+sNU5EO8RAouJAKCOx5oxhVXkLqsfCPBXx0+wP5IeogCYoZzF ooZT2fyN3tL3uVM2YP8KcA== =O4fE -----END PGP SIGNATURE----- diff -r 9d8d9207c0b3 -r f69a5d2d4fe1 mercurial/hg.py --- a/mercurial/hg.py Wed Jun 15 00:10:18 2005 -0800 +++ b/mercurial/hg.py Wed Jun 15 00:27:20 2005 -0800 @@ -1118,8 +1118,8 @@ fl = self.file(fn) base = fl.ancestor(my, other) a = self.wjoin(fn) - b = temp("other", other) - c = temp("base", base) + b = temp("base", base) + c = temp("other", other) self.ui.note("resolving %s\n" % fn) self.ui.debug("file %s: other %s ancestor %s\n" % diff -r 9d8d9207c0b3 -r f69a5d2d4fe1 tests/test-conflict --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-conflict Wed Jun 15 00:27:20 2005 -0800 @@ -0,0 +1,17 @@ +#!/bin/bash + +set -x +hg init +echo "nothing" > a +hg add a +hg commit -t ancestor -u test -d "0 0" +echo "something" > a +hg commit -t branch1 -u test -d "0 0" +hg co 0 +echo "something else" > a +hg commit -t branch2 -u test -d "0 0" +export HGMERGE=merge +hg -d up -m 1 +hg id +cat a | grep -v ">>>" | grep -v "<<<" +hg status diff -r 9d8d9207c0b3 -r f69a5d2d4fe1 tests/test-conflict.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-conflict.out Wed Jun 15 00:27:20 2005 -0800 @@ -0,0 +1,32 @@ ++ hg init ++ echo nothing ++ hg add a ++ hg commit -t ancestor -u test -d '0 0' ++ echo something ++ hg commit -t branch1 -u test -d '0 0' ++ hg co 0 ++ echo 'something else' ++ hg commit -t branch2 -u test -d '0 0' ++ export HGMERGE=merge ++ HGMERGE=merge ++ hg -d up -m 1 +merge: warning: conflicts during merge +resolving manifests + ancestor 1c6e5a12 local 35fedfab remote a5801785 + a versions differ, resolve +working dir created .out, keeping +merging a +resolving a +file a: other d7250518 ancestor 68ba9db7 +merging a failed! ++ hg id +32e80765+75234512+ tip ++ cat a ++ grep -v '>>>' ++ grep -v '<<<' +something else +======= +something ++ hg status +C a +? .out