mq: regularize patch header creation.
authorBrendan Cully <brendan@kublai.com>
Mon, 25 Jun 2007 15:57:01 -0700
changeset 4722 487943b52a6c
parent 4721 96614af3c679
child 4723 fb4b6d5fe100
mq: regularize patch header creation. Do not prefix qnew patches with [mq]: when a message has been given. Always use [mq]: as the prefix for generated commit messages.
hgext/mq.py
tests/test-mq-qdelete.out
--- a/hgext/mq.py	Mon Jun 25 18:52:12 2007 -0300
+++ b/hgext/mq.py	Mon Jun 25 15:57:01 2007 -0700
@@ -612,11 +612,10 @@
         wlock = repo.wlock()
         insert = self.full_series_end()
         if msg:
-            n = repo.commit(commitfiles, "[mq]: %s" % msg, force=True,
-                            wlock=wlock)
+            n = repo.commit(commitfiles, msg, force=True, wlock=wlock)
         else:
             n = repo.commit(commitfiles,
-                            "New patch: %s" % patch, force=True, wlock=wlock)
+                            "[mq]: %s" % patch, force=True, wlock=wlock)
         if n == None:
             raise util.Abort(_("repo commit failed"))
         self.full_series[insert:insert] = [patch]
@@ -1029,7 +1028,7 @@
 
             if not msg:
                 if not message:
-                    message = "patch queue: %s\n" % patchfn
+                    message = "[mq]: %s\n" % patchfn
                 else:
                     message = "\n".join(message)
             else:
@@ -1565,7 +1564,7 @@
 
     -e, -m or -l set the patch header as well as the commit message.
     If none is specified, the patch header is empty and the
-    commit message is 'New patch: PATCH'"""
+    commit message is '[mq]: PATCH'"""
     q = repo.mq
     message = cmdutil.logmessage(opts)
     if opts['edit']:
--- a/tests/test-mq-qdelete.out	Mon Jun 25 18:52:12 2007 -0300
+++ b/tests/test-mq-qdelete.out	Mon Jun 25 15:57:01 2007 -0700
@@ -12,12 +12,12 @@
 b
 series
 status
-1 New patch: a
+1 [mq]: a
 0 base
 abort: cannot delete revision 3 above applied patches
 f
-4 New patch: f
-3 New patch: e
-2 New patch: d
-1 New patch: a
+4 [mq]: f
+3 [mq]: e
+2 [mq]: d
+1 [mq]: a
 0 base