diff hgext/mq.py @ 8362:bbc74c05b8a4

mq: add -P/--push option to qimport
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Tue, 12 May 2009 11:15:54 +0200
parents 9de088320e9a
children 0bf0045000b5
line wrap: on
line diff
--- a/hgext/mq.py	Tue May 12 12:05:19 2009 +0200
+++ b/hgext/mq.py	Tue May 12 11:15:54 2009 +0200
@@ -1693,6 +1693,9 @@
               existing=opts['existing'], force=opts['force'], rev=opts['rev'],
               git=opts['git'])
     q.save_dirty()
+
+    if opts.get('push') and not opts.get('rev'):
+        return q.push(repo, None)
     return 0
 
 def init(ui, repo, **opts):
@@ -2522,8 +2525,9 @@
           ('n', 'name', '', _('patch file name')),
           ('f', 'force', None, _('overwrite existing files')),
           ('r', 'rev', [], _('place existing revisions under mq control')),
-          ('g', 'git', None, _('use git extended diff format'))],
-         _('hg qimport [-e] [-n NAME] [-f] [-g] [-r REV]... FILE...')),
+          ('g', 'git', None, _('use git extended diff format')),
+          ('P', 'push', None, _('qpush after importing'))],
+         _('hg qimport [-e] [-n NAME] [-f] [-g] [-P] [-r REV]... FILE...')),
     "^qinit":
         (init,
          [('c', 'create-repo', None, _('create queue repository'))],