Merge with crew-stable
authorPatrick Mezard <pmezard@gmail.com>
Sat, 24 May 2008 18:23:13 +0200
changeset 6637 79434e68512a
parent 6636 0397f592372f (current diff)
parent 6628 f18f14bae172 (diff)
child 6638 5868d0b8509f
Merge with crew-stable
hgext/mq.py
--- a/hgext/mq.py	Fri May 23 14:02:48 2008 +0200
+++ b/hgext/mq.py	Sat May 24 18:23:13 2008 +0200
@@ -1928,7 +1928,7 @@
         patch = q.series[-1]
     if opts['merge']:
         if opts['name']:
-            newpath = opts['name']
+            newpath = repo.join(opts['name'])
         else:
             newpath, i = lastsavename(q.path)
         if not newpath:
--- a/tests/hghave	Fri May 23 14:02:48 2008 +0200
+++ b/tests/hghave	Sat May 24 18:23:13 2008 +0200
@@ -25,7 +25,8 @@
     return matchoutput('baz --version 2>&1', r'baz Bazaar version')
 
 def has_cvs():
-    return matchoutput('cvs --version 2>&1', r'Concurrent Versions System')
+    re = r'Concurrent Versions System.*?server'
+    return matchoutput('cvs --version 2>&1', re)
 
 def has_cvsps():
     return matchoutput('cvsps -h -q 2>&1', r'cvsps version', True)
@@ -120,7 +121,7 @@
 
 checks = {
     "baz": (has_baz, "GNU Arch baz client"),
-    "cvs": (has_cvs, "cvs client"),
+    "cvs": (has_cvs, "cvs client/server"),
     "cvsps": (has_cvsps, "cvsps utility"),
     "darcs": (has_darcs, "darcs client"),
     "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"),
--- a/tests/test-mq-merge	Fri May 23 14:02:48 2008 +0200
+++ b/tests/test-mq-merge	Sat May 24 18:23:13 2008 +0200
@@ -49,3 +49,25 @@
 
 # ensure status is correct after merge
 hg qpop -a
+cd ..
+
+# Classic MQ merge sequence *with an explicit named queue*
+echo
+echo % init t2
+hg init t2
+cd t2
+echo a > a
+hg ci -Am init
+echo b >> a
+hg ci -m changea
+hg up -C 0
+echo c >> a
+hg qnew -f -e patcha
+echo % create the reference queue
+hg qsave -c -e -n refqueue 2> /dev/null
+hg up -C 1
+echo % merge
+hg qpush -m -n refqueue 2>&1 | \
+    sed 's/merging with queue at.*refqueue/merging with queue at refqueue/'
+cd ..
+
--- a/tests/test-mq-merge.out	Fri May 23 14:02:48 2008 +0200
+++ b/tests/test-mq-merge.out	Sat May 24 18:23:13 2008 +0200
@@ -11,3 +11,14 @@
 Now at: rm_a
 b
 Patch queue now empty
+
+% init t2
+adding a
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+% create the reference queue
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+% merge
+merging with queue at refqueue
+(working directory not at tip)
+applying patcha
+Now at: patcha