changeset 346:f69a5d2d4fe1

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-----
author mpm@selenic.com
date Wed, 15 Jun 2005 00:27:20 -0800
parents 9d8d9207c0b3
children b4e0e20646bb
files mercurial/hg.py tests/test-conflict tests/test-conflict.out
diffstat 3 files changed, 51 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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" %
--- /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
--- /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