changeset 2459:5c5277f03887

merge with crew
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Mon, 19 Jun 2006 20:37:36 +0200
parents 9dd93deef3c9 (diff) 8e1004c61796 (current diff)
children 605e26a2e96e fe1689273f84
files
diffstat 1 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Sun Jun 18 21:15:01 2006 -0700
+++ b/mercurial/commands.py	Mon Jun 19 20:37:36 2006 +0200
@@ -1772,11 +1772,15 @@
                 elif message or line:
                     message.append(line)
 
-            # make sure message isn't empty
-            if not message:
-                message = _("imported patch %s\n") % patch
+            if opts['message']:
+                # pickup the cmdline msg
+                message = opts['message']
+            elif message:
+                # pickup the patch msg
+                message = '\n'.join(message).rstrip()
             else:
-                message = '\n'.join(message).rstrip()
+                # launch the editor
+                message = None
             ui.debug(_('message:\n%s\n') % message)
 
             if tmpfp: tmpfp.close()
@@ -2960,10 +2964,11 @@
          [('p', 'strip', 1,
            _('directory strip option for patch. This has the same\n'
              'meaning as the corresponding patch option')),
+          ('m', 'message', '', _('use <text> as commit message')),
           ('b', 'base', '', _('base path')),
           ('f', 'force', None,
            _('skip check for outstanding uncommitted changes'))],
-         _('hg import [-p NUM] [-b BASE] [-f] PATCH...')),
+         _('hg import [-p NUM] [-b BASE] [-m MESSAGE] [-f] PATCH...')),
     "incoming|in": (incoming,
          [('M', 'no-merges', None, _('do not show merges')),
           ('f', 'force', None,