changeset 6639:6334569c8caa

localrepo: fix partial merge test (issue 1111)
author Patrick Mezard <pmezard@gmail.com>
date Wed, 28 May 2008 22:45:07 +0200
parents 5868d0b8509f
children d6b53b48943f
files mercurial/localrepo.py tests/test-transplant tests/test-transplant.out
diffstat 3 files changed, 26 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Sun May 25 13:39:08 2008 -0700
+++ b/mercurial/localrepo.py	Wed May 28 22:45:07 2008 +0200
@@ -787,7 +787,7 @@
                 update_dirstate = True
 
                 if (not force and p2 != nullid and
-                    (match.files() or match.anypats())):
+                    (match and (match.files() or match.anypats()))):
                     raise util.Abort(_('cannot partially commit a merge '
                                        '(do not specify files or patterns)'))
             else:
--- a/tests/test-transplant	Sun May 25 13:39:08 2008 -0700
+++ b/tests/test-transplant	Wed May 28 22:45:07 2008 +0200
@@ -96,3 +96,21 @@
 hg transplant --continue
 hg transplant 1:3
 hg locate
+cd ..
+
+# Test transplant --merge (issue 1111)
+echo % test transplant merge
+hg init t1111
+cd t1111
+echo a > a
+hg ci -Am adda
+echo b >> a
+hg ci -m appendb
+echo c >> a
+hg ci -m appendc
+hg up -C 0
+echo d >> a
+hg ci -m appendd
+echo % tranplant
+hg transplant -m 1
+cd ..
--- a/tests/test-transplant.out	Sun May 25 13:39:08 2008 -0700
+++ b/tests/test-transplant.out	Wed May 28 22:45:07 2008 +0200
@@ -129,3 +129,10 @@
 added
 bar
 foo
+% test transplant merge
+adding a
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+created new head
+% tranplant
+applying 42dc4432fd35
+1:42dc4432fd35 merged at a9f4acbac129