Show More
@@ -1693,6 +1693,9 b' def qimport(ui, repo, *filename, **opts)' | |||||
1693 | existing=opts['existing'], force=opts['force'], rev=opts['rev'], |
|
1693 | existing=opts['existing'], force=opts['force'], rev=opts['rev'], | |
1694 | git=opts['git']) |
|
1694 | git=opts['git']) | |
1695 | q.save_dirty() |
|
1695 | q.save_dirty() | |
|
1696 | ||||
|
1697 | if opts.get('push') and not opts.get('rev'): | |||
|
1698 | return q.push(repo, None) | |||
1696 | return 0 |
|
1699 | return 0 | |
1697 |
|
1700 | |||
1698 | def init(ui, repo, **opts): |
|
1701 | def init(ui, repo, **opts): | |
@@ -2522,8 +2525,9 b' cmdtable = {' | |||||
2522 | ('n', 'name', '', _('patch file name')), |
|
2525 | ('n', 'name', '', _('patch file name')), | |
2523 | ('f', 'force', None, _('overwrite existing files')), |
|
2526 | ('f', 'force', None, _('overwrite existing files')), | |
2524 | ('r', 'rev', [], _('place existing revisions under mq control')), |
|
2527 | ('r', 'rev', [], _('place existing revisions under mq control')), | |
2525 |
('g', 'git', None, _('use git extended diff format')) |
|
2528 | ('g', 'git', None, _('use git extended diff format')), | |
2526 | _('hg qimport [-e] [-n NAME] [-f] [-g] [-r REV]... FILE...')), |
|
2529 | ('P', 'push', None, _('qpush after importing'))], | |
|
2530 | _('hg qimport [-e] [-n NAME] [-f] [-g] [-P] [-r REV]... FILE...')), | |||
2527 | "^qinit": |
|
2531 | "^qinit": | |
2528 | (init, |
|
2532 | (init, | |
2529 | [('c', 'create-repo', None, _('create queue repository'))], |
|
2533 | [('c', 'create-repo', None, _('create queue repository'))], |
@@ -69,4 +69,10 b' echo % qimport CRLF diff' | |||||
69 | hg qimport b.diff |
|
69 | hg qimport b.diff | |
70 | hg qpush |
|
70 | hg qpush | |
71 |
|
71 | |||
72 |
|
72 | echo % try to import --push | ||
|
73 | echo another >> b | |||
|
74 | hg diff > another.diff | |||
|
75 | hg up -C | |||
|
76 | hg qimport --push another.diff | |||
|
77 | hg qfin -a | |||
|
78 | hg qimport -rtip -P |
@@ -22,3 +22,8 b' 1 files updated, 0 files merged, 0 files' | |||||
22 | adding b.diff to series file |
|
22 | adding b.diff to series file | |
23 | applying b.diff |
|
23 | applying b.diff | |
24 | now at: b.diff |
|
24 | now at: b.diff | |
|
25 | % try to import --push | |||
|
26 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
27 | adding another.diff to series file | |||
|
28 | applying another.diff | |||
|
29 | now at: another.diff |
General Comments 0
You need to be logged in to leave comments.
Login now