Show More
@@ -2103,9 +2103,8 b' cmdtable = {' | |||||
2103 | 'qfold': |
|
2103 | 'qfold': | |
2104 | (fold, |
|
2104 | (fold, | |
2105 | [('e', 'edit', None, _('edit patch header')), |
|
2105 | [('e', 'edit', None, _('edit patch header')), | |
2106 |
('k', 'keep', None, _('keep folded patch files')) |
|
2106 | ('k', 'keep', None, _('keep folded patch files')) | |
2107 | ('m', 'message', '', _('set patch header to <text>')), |
|
2107 | ] + commands.commitopts, | |
2108 | ('l', 'logfile', '', _('set patch header to contents of <file>'))], |
|
|||
2109 | 'hg qfold [-e] [-m <text>] [-l <file] PATCH...'), |
|
2108 | 'hg qfold [-e] [-m <text>] [-l <file] PATCH...'), | |
2110 | 'qguard': (guard, [('l', 'list', None, _('list all patches and guards')), |
|
2109 | 'qguard': (guard, [('l', 'list', None, _('list all patches and guards')), | |
2111 | ('n', 'none', None, _('drop all guards'))], |
|
2110 | ('n', 'none', None, _('drop all guards'))], | |
@@ -2127,9 +2126,8 b' cmdtable = {' | |||||
2127 | "qnew": |
|
2126 | "qnew": | |
2128 | (new, |
|
2127 | (new, | |
2129 | [('e', 'edit', None, _('edit commit message')), |
|
2128 | [('e', 'edit', None, _('edit commit message')), | |
2130 | ('m', 'message', '', _('use <text> as commit message')), |
|
2129 | ('f', 'force', None, _('import uncommitted changes into patch')) | |
2131 | ('l', 'logfile', '', _('read the commit message from <file>')), |
|
2130 | ] + commands.commitopts, | |
2132 | ('f', 'force', None, _('import uncommitted changes into patch'))], |
|
|||
2133 | 'hg qnew [-e] [-m TEXT] [-l FILE] [-f] PATCH'), |
|
2131 | 'hg qnew [-e] [-m TEXT] [-l FILE] [-f] PATCH'), | |
2134 | "qnext": (next, [] + seriesopts, 'hg qnext [-s]'), |
|
2132 | "qnext": (next, [] + seriesopts, 'hg qnext [-s]'), | |
2135 | "qprev": (prev, [] + seriesopts, 'hg qprev [-s]'), |
|
2133 | "qprev": (prev, [] + seriesopts, 'hg qprev [-s]'), | |
@@ -2150,12 +2148,11 b' cmdtable = {' | |||||
2150 | "^qrefresh": |
|
2148 | "^qrefresh": | |
2151 | (refresh, |
|
2149 | (refresh, | |
2152 | [('e', 'edit', None, _('edit commit message')), |
|
2150 | [('e', 'edit', None, _('edit commit message')), | |
2153 | ('m', 'message', '', _('change commit message to <text>')), |
|
|||
2154 | ('l', 'logfile', '', _('change commit message to <file> content')), |
|
|||
2155 | ('g', 'git', None, _('use git extended diff format')), |
|
2151 | ('g', 'git', None, _('use git extended diff format')), | |
2156 | ('s', 'short', None, 'refresh only files already in the patch'), |
|
2152 | ('s', 'short', None, 'refresh only files already in the patch'), | |
2157 | ('I', 'include', [], _('include names matching the given patterns')), |
|
2153 | ('I', 'include', [], _('include names matching the given patterns')), | |
2158 |
('X', 'exclude', [], _('exclude names matching the given patterns')) |
|
2154 | ('X', 'exclude', [], _('exclude names matching the given patterns')) | |
|
2155 | ] + commands.commitopts, | |||
2159 | 'hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] FILES...'), |
|
2156 | 'hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] FILES...'), | |
2160 | 'qrename|qmv': |
|
2157 | 'qrename|qmv': | |
2161 | (rename, [], 'hg qrename PATCH1 [PATCH2]'), |
|
2158 | (rename, [], 'hg qrename PATCH1 [PATCH2]'), | |
@@ -2166,12 +2163,10 b' cmdtable = {' | |||||
2166 | 'hg qrestore [-d] [-u] REV'), |
|
2163 | 'hg qrestore [-d] [-u] REV'), | |
2167 | "qsave": |
|
2164 | "qsave": | |
2168 | (save, |
|
2165 | (save, | |
2169 | [('m', 'message', '', _('use <text> as commit message')), |
|
2166 | [('c', 'copy', None, 'copy patch directory'), | |
2170 | ('l', 'logfile', '', _('read the commit message from <file>')), |
|
|||
2171 | ('c', 'copy', None, 'copy patch directory'), |
|
|||
2172 | ('n', 'name', '', 'copy directory name'), |
|
2167 | ('n', 'name', '', 'copy directory name'), | |
2173 | ('e', 'empty', None, 'clear queue status file'), |
|
2168 | ('e', 'empty', None, 'clear queue status file'), | |
2174 | ('f', 'force', None, 'force copy')], |
|
2169 | ('f', 'force', None, 'force copy')] + commands.commitopts, | |
2175 | 'hg qsave [-m TEXT] [-l FILE] [-c] [-n NAME] [-e] [-f]'), |
|
2170 | 'hg qsave [-m TEXT] [-l FILE] [-c] [-n NAME] [-e] [-f]'), | |
2176 | "qselect": (select, |
|
2171 | "qselect": (select, | |
2177 | [('n', 'none', None, _('disable all guards')), |
|
2172 | [('n', 'none', None, _('disable all guards')), |
@@ -1492,9 +1492,10 b' def import_(ui, repo, patch1, *patches, ' | |||||
1492 | raise util.Abort(_('no diffs found')) |
|
1492 | raise util.Abort(_('no diffs found')) | |
1493 |
|
1493 | |||
1494 | try: |
|
1494 | try: | |
1495 | if opts['message']: |
|
1495 | cmdline_message = logmessage(opts) | |
|
1496 | if cmdline_message: | |||
1496 | # pickup the cmdline msg |
|
1497 | # pickup the cmdline msg | |
1497 |
message = |
|
1498 | message = cmdline_message | |
1498 | elif message: |
|
1499 | elif message: | |
1499 | # pickup the patch msg |
|
1500 | # pickup the patch msg | |
1500 | message = message.strip() |
|
1501 | message = message.strip() | |
@@ -2586,6 +2587,11 b' walkopts = [' | |||||
2586 | ('X', 'exclude', [], _('exclude names matching the given patterns')), |
|
2587 | ('X', 'exclude', [], _('exclude names matching the given patterns')), | |
2587 | ] |
|
2588 | ] | |
2588 |
|
2589 | |||
|
2590 | commitopts = [ | |||
|
2591 | ('m', 'message', '', _('use <text> as commit message')), | |||
|
2592 | ('l', 'logfile', '', _('read commit message from <file>')), | |||
|
2593 | ] | |||
|
2594 | ||||
2589 | table = { |
|
2595 | table = { | |
2590 | "^add": (add, walkopts + dryrunopts, _('hg add [OPTION]... [FILE]...')), |
|
2596 | "^add": (add, walkopts + dryrunopts, _('hg add [OPTION]... [FILE]...')), | |
2591 | "addremove": |
|
2597 | "addremove": | |
@@ -2617,12 +2623,10 b' table = {' | |||||
2617 | (backout, |
|
2623 | (backout, | |
2618 | [('', 'merge', None, |
|
2624 | [('', 'merge', None, | |
2619 | _('merge with old dirstate parent after backout')), |
|
2625 | _('merge with old dirstate parent after backout')), | |
2620 | ('m', 'message', '', _('use <text> as commit message')), |
|
|||
2621 | ('l', 'logfile', '', _('read commit message from <file>')), |
|
|||
2622 | ('d', 'date', '', _('record datecode as commit date')), |
|
2626 | ('d', 'date', '', _('record datecode as commit date')), | |
2623 | ('', 'parent', '', _('parent to choose when backing out merge')), |
|
2627 | ('', 'parent', '', _('parent to choose when backing out merge')), | |
2624 | ('u', 'user', '', _('record user as committer')), |
|
2628 | ('u', 'user', '', _('record user as committer')), | |
2625 | ] + walkopts, |
|
2629 | ] + walkopts + commitopts, | |
2626 | _('hg backout [OPTION]... REV')), |
|
2630 | _('hg backout [OPTION]... REV')), | |
2627 | "branch": (branch, [], _('hg branch [NAME]')), |
|
2631 | "branch": (branch, [], _('hg branch [NAME]')), | |
2628 | "branches": (branches, [], _('hg branches')), |
|
2632 | "branches": (branches, [], _('hg branches')), | |
@@ -2656,11 +2660,9 b' table = {' | |||||
2656 | (commit, |
|
2660 | (commit, | |
2657 | [('A', 'addremove', None, |
|
2661 | [('A', 'addremove', None, | |
2658 | _('mark new/missing files as added/removed before committing')), |
|
2662 | _('mark new/missing files as added/removed before committing')), | |
2659 | ('m', 'message', '', _('use <text> as commit message')), |
|
|||
2660 | ('l', 'logfile', '', _('read the commit message from <file>')), |
|
|||
2661 | ('d', 'date', '', _('record datecode as commit date')), |
|
2663 | ('d', 'date', '', _('record datecode as commit date')), | |
2662 | ('u', 'user', '', _('record user as commiter')), |
|
2664 | ('u', 'user', '', _('record user as commiter')), | |
2663 | ] + walkopts, |
|
2665 | ] + walkopts + commitopts, | |
2664 | _('hg commit [OPTION]... [FILE]...')), |
|
2666 | _('hg commit [OPTION]... [FILE]...')), | |
2665 | "copy|cp": |
|
2667 | "copy|cp": | |
2666 | (copy, |
|
2668 | (copy, | |
@@ -2743,10 +2745,9 b' table = {' | |||||
2743 | [('p', 'strip', 1, |
|
2745 | [('p', 'strip', 1, | |
2744 | _('directory strip option for patch. This has the same\n' |
|
2746 | _('directory strip option for patch. This has the same\n' | |
2745 | 'meaning as the corresponding patch option')), |
|
2747 | 'meaning as the corresponding patch option')), | |
2746 | ('m', 'message', '', _('use <text> as commit message')), |
|
|||
2747 | ('b', 'base', '', _('base path (DEPRECATED)')), |
|
2748 | ('b', 'base', '', _('base path (DEPRECATED)')), | |
2748 | ('f', 'force', None, |
|
2749 | ('f', 'force', None, | |
2749 | _('skip check for outstanding uncommitted changes'))], |
|
2750 | _('skip check for outstanding uncommitted changes'))] + commitopts, | |
2750 | _('hg import [-p NUM] [-m MESSAGE] [-f] PATCH...')), |
|
2751 | _('hg import [-p NUM] [-m MESSAGE] [-f] PATCH...')), | |
2751 | "incoming|in": (incoming, |
|
2752 | "incoming|in": (incoming, | |
2752 | [('M', 'no-merges', None, _('do not show merges')), |
|
2753 | [('M', 'no-merges', None, _('do not show merges')), | |
@@ -2838,9 +2839,8 b' table = {' | |||||
2838 | [('p', 'parent', [], _('parent')), |
|
2839 | [('p', 'parent', [], _('parent')), | |
2839 | ('d', 'date', '', _('date code')), |
|
2840 | ('d', 'date', '', _('date code')), | |
2840 | ('u', 'user', '', _('user')), |
|
2841 | ('u', 'user', '', _('user')), | |
2841 |
('F', 'files', '', _('file list')) |
|
2842 | ('F', 'files', '', _('file list')) | |
2842 | ('m', 'message', '', _('commit message')), |
|
2843 | ] + commitopts, | |
2843 | ('l', 'logfile', '', _('commit message file'))], |
|
|||
2844 | _('hg debugrawcommit [OPTION]... [FILE]...')), |
|
2844 | _('hg debugrawcommit [OPTION]... [FILE]...')), | |
2845 | "recover": (recover, [], _('hg recover')), |
|
2845 | "recover": (recover, [], _('hg recover')), | |
2846 | "^remove|rm": |
|
2846 | "^remove|rm": |
General Comments 0
You need to be logged in to leave comments.
Login now