Show More
@@ -152,7 +152,7 b' cmdtable = {}' | |||||
152 | # define parsealiases locally, because cmdutil.parsealiases has been |
|
152 | # define parsealiases locally, because cmdutil.parsealiases has been | |
153 | # available since 1.5 (or 6252852b4332) |
|
153 | # available since 1.5 (or 6252852b4332) | |
154 | def parsealiases(cmd): |
|
154 | def parsealiases(cmd): | |
155 |
return cmd |
|
155 | return cmd.split(b"|") | |
156 |
|
156 | |||
157 | if safehasattr(registrar, 'command'): |
|
157 | if safehasattr(registrar, 'command'): | |
158 | command = registrar.command(cmdtable) |
|
158 | command = registrar.command(cmdtable) |
@@ -982,7 +982,7 b' def absorb(ui, repo, stack=None, targetc' | |||||
982 | ui.write(_('nothing applied\n')) |
|
982 | ui.write(_('nothing applied\n')) | |
983 | return state |
|
983 | return state | |
984 |
|
984 | |||
985 |
@command(' |
|
985 | @command('absorb', | |
986 | [('a', 'apply-changes', None, |
|
986 | [('a', 'apply-changes', None, | |
987 | _('apply changes without prompting for confirmation')), |
|
987 | _('apply changes without prompting for confirmation')), | |
988 | ('p', 'print-changes', None, |
|
988 | ('p', 'print-changes', None, | |
@@ -994,7 +994,8 b' def absorb(ui, repo, stack=None, targetc' | |||||
994 | '(EXPERIMENTAL)')), |
|
994 | '(EXPERIMENTAL)')), | |
995 | ] + commands.dryrunopts + commands.templateopts + commands.walkopts, |
|
995 | ] + commands.dryrunopts + commands.templateopts + commands.walkopts, | |
996 | _('hg absorb [OPTION] [FILE]...'), |
|
996 | _('hg absorb [OPTION] [FILE]...'), | |
997 |
helpcategory=command.CATEGORY_COMMITTING |
|
997 | helpcategory=command.CATEGORY_COMMITTING, | |
|
998 | helpbasic=True) | |||
998 | def absorbcmd(ui, repo, *pats, **opts): |
|
999 | def absorbcmd(ui, repo, *pats, **opts): | |
999 | """incorporate corrections into the stack of draft changesets |
|
1000 | """incorporate corrections into the stack of draft changesets | |
1000 |
|
1001 |
@@ -226,11 +226,12 b' def reposetup(ui, repo):' | |||||
226 |
|
226 | |||
227 | repo._wlockfreeprefix.add('blackbox.log') |
|
227 | repo._wlockfreeprefix.add('blackbox.log') | |
228 |
|
228 | |||
229 |
@command(' |
|
229 | @command('blackbox', | |
230 | [('l', 'limit', 10, _('the number of events to show')), |
|
230 | [('l', 'limit', 10, _('the number of events to show')), | |
231 | ], |
|
231 | ], | |
232 | _('hg blackbox [OPTION]...'), |
|
232 | _('hg blackbox [OPTION]...'), | |
233 |
helpcategory=command.CATEGORY_MAINTENANCE |
|
233 | helpcategory=command.CATEGORY_MAINTENANCE, | |
|
234 | helpbasic=True) | |||
234 | def blackbox(ui, repo, *revs, **opts): |
|
235 | def blackbox(ui, repo, *revs, **opts): | |
235 | '''view the recent repository events |
|
236 | '''view the recent repository events | |
236 | ''' |
|
237 | ''' |
@@ -222,8 +222,8 b' def _annotatewrapper(orig, ui, repo, *pa' | |||||
222 |
|
222 | |||
223 | def registercommand(): |
|
223 | def registercommand(): | |
224 | """register the fastannotate command""" |
|
224 | """register the fastannotate command""" | |
225 |
name = ' |
|
225 | name = 'fastannotate|fastblame|fa' | |
226 | command(name, **fastannotatecommandargs)(fastannotate) |
|
226 | command(name, helpbasic=True, **fastannotatecommandargs)(fastannotate) | |
227 |
|
227 | |||
228 | def wrapdefault(): |
|
228 | def wrapdefault(): | |
229 | """wrap the default annotate command, to be aware of the protocol""" |
|
229 | """wrap the default annotate command, to be aware of the protocol""" |
@@ -50,9 +50,9 b' def convert(s):' | |||||
50 | s = re.sub('~$', '~1', s) |
|
50 | s = re.sub('~$', '~1', s) | |
51 | return s |
|
51 | return s | |
52 |
|
52 | |||
53 |
@command(' |
|
53 | @command('githelp|git', [ | |
54 | ], _('hg githelp'), |
|
54 | ], _('hg githelp'), | |
55 | helpcategory=command.CATEGORY_HELP) |
|
55 | helpcategory=command.CATEGORY_HELP, helpbasic=True) | |
56 | def githelp(ui, repo, *args, **kwargs): |
|
56 | def githelp(ui, repo, *args, **kwargs): | |
57 | '''suggests the Mercurial equivalent of the given git command |
|
57 | '''suggests the Mercurial equivalent of the given git command | |
58 |
|
58 |
@@ -2433,10 +2433,11 b' def qinit(ui, repo, create):' | |||||
2433 | commands.add(ui, r) |
|
2433 | commands.add(ui, r) | |
2434 | return 0 |
|
2434 | return 0 | |
2435 |
|
2435 | |||
2436 |
@command(" |
|
2436 | @command("qinit", | |
2437 | [('c', 'create-repo', None, _('create queue repository'))], |
|
2437 | [('c', 'create-repo', None, _('create queue repository'))], | |
2438 | _('hg qinit [-c]'), |
|
2438 | _('hg qinit [-c]'), | |
2439 |
helpcategory=command.CATEGORY_REPO_CREATION |
|
2439 | helpcategory=command.CATEGORY_REPO_CREATION, | |
|
2440 | helpbasic=True) | |||
2440 | def init(ui, repo, **opts): |
|
2441 | def init(ui, repo, **opts): | |
2441 | """init a new queue repository (DEPRECATED) |
|
2442 | """init a new queue repository (DEPRECATED) | |
2442 |
|
2443 | |||
@@ -2540,7 +2541,7 b' def clone(ui, source, dest=None, **opts)' | |||||
2540 | hg.update(repo, repo.changelog.tip()) |
|
2541 | hg.update(repo, repo.changelog.tip()) | |
2541 |
|
2542 | |||
2542 | @command("qcommit|qci", |
|
2543 | @command("qcommit|qci", | |
2543 |
commands.table[" |
|
2544 | commands.table["commit|ci"][1], | |
2544 | _('hg qcommit [OPTION]... [FILE]...'), |
|
2545 | _('hg qcommit [OPTION]... [FILE]...'), | |
2545 | helpcategory=command.CATEGORY_COMMITTING, |
|
2546 | helpcategory=command.CATEGORY_COMMITTING, | |
2546 | inferrepo=True) |
|
2547 | inferrepo=True) | |
@@ -2623,7 +2624,7 b' def setupheaderopts(ui, opts):' | |||||
2623 | if not opts.get('date') and opts.get('currentdate'): |
|
2624 | if not opts.get('date') and opts.get('currentdate'): | |
2624 | opts['date'] = "%d %d" % dateutil.makedate() |
|
2625 | opts['date'] = "%d %d" % dateutil.makedate() | |
2625 |
|
2626 | |||
2626 |
@command(" |
|
2627 | @command("qnew", | |
2627 | [('e', 'edit', None, _('invoke editor on commit messages')), |
|
2628 | [('e', 'edit', None, _('invoke editor on commit messages')), | |
2628 | ('f', 'force', None, _('import uncommitted changes (DEPRECATED)')), |
|
2629 | ('f', 'force', None, _('import uncommitted changes (DEPRECATED)')), | |
2629 | ('g', 'git', None, _('use git extended diff format')), |
|
2630 | ('g', 'git', None, _('use git extended diff format')), | |
@@ -2635,7 +2636,7 b' def setupheaderopts(ui, opts):' | |||||
2635 | _('add "Date: <DATE>" to patch'), _('DATE')) |
|
2636 | _('add "Date: <DATE>" to patch'), _('DATE')) | |
2636 | ] + cmdutil.walkopts + cmdutil.commitopts, |
|
2637 | ] + cmdutil.walkopts + cmdutil.commitopts, | |
2637 | _('hg qnew [-e] [-m TEXT] [-l FILE] PATCH [FILE]...'), |
|
2638 | _('hg qnew [-e] [-m TEXT] [-l FILE] PATCH [FILE]...'), | |
2638 | helpcategory=command.CATEGORY_COMMITTING, |
|
2639 | helpcategory=command.CATEGORY_COMMITTING, helpbasic=True, | |
2639 | inferrepo=True) |
|
2640 | inferrepo=True) | |
2640 | def new(ui, repo, patch, *args, **opts): |
|
2641 | def new(ui, repo, patch, *args, **opts): | |
2641 | """create a new patch |
|
2642 | """create a new patch | |
@@ -2671,7 +2672,7 b' def new(ui, repo, patch, *args, **opts):' | |||||
2671 | q.savedirty() |
|
2672 | q.savedirty() | |
2672 | return 0 |
|
2673 | return 0 | |
2673 |
|
2674 | |||
2674 |
@command(" |
|
2675 | @command("qrefresh", | |
2675 | [('e', 'edit', None, _('invoke editor on commit messages')), |
|
2676 | [('e', 'edit', None, _('invoke editor on commit messages')), | |
2676 | ('g', 'git', None, _('use git extended diff format')), |
|
2677 | ('g', 'git', None, _('use git extended diff format')), | |
2677 | ('s', 'short', None, |
|
2678 | ('s', 'short', None, | |
@@ -2686,7 +2687,7 b' def new(ui, repo, patch, *args, **opts):' | |||||
2686 | _('add/update date field in patch with given date'), _('DATE')) |
|
2687 | _('add/update date field in patch with given date'), _('DATE')) | |
2687 | ] + cmdutil.walkopts + cmdutil.commitopts, |
|
2688 | ] + cmdutil.walkopts + cmdutil.commitopts, | |
2688 | _('hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]...'), |
|
2689 | _('hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]...'), | |
2689 | helpcategory=command.CATEGORY_COMMITTING, |
|
2690 | helpcategory=command.CATEGORY_COMMITTING, helpbasic=True, | |
2690 | inferrepo=True) |
|
2691 | inferrepo=True) | |
2691 | def refresh(ui, repo, *pats, **opts): |
|
2692 | def refresh(ui, repo, *pats, **opts): | |
2692 | """update the current patch |
|
2693 | """update the current patch | |
@@ -2718,10 +2719,10 b' def refresh(ui, repo, *pats, **opts):' | |||||
2718 | q.savedirty() |
|
2719 | q.savedirty() | |
2719 | return ret |
|
2720 | return ret | |
2720 |
|
2721 | |||
2721 |
@command(" |
|
2722 | @command("qdiff", | |
2722 | cmdutil.diffopts + cmdutil.diffopts2 + cmdutil.walkopts, |
|
2723 | cmdutil.diffopts + cmdutil.diffopts2 + cmdutil.walkopts, | |
2723 | _('hg qdiff [OPTION]... [FILE]...'), |
|
2724 | _('hg qdiff [OPTION]... [FILE]...'), | |
2724 | helpcategory=command.CATEGORY_FILE_CONTENTS, |
|
2725 | helpcategory=command.CATEGORY_FILE_CONTENTS, helpbasic=True, | |
2725 | inferrepo=True) |
|
2726 | inferrepo=True) | |
2726 | def diff(ui, repo, *pats, **opts): |
|
2727 | def diff(ui, repo, *pats, **opts): | |
2727 | """diff of the current patch and subsequent modifications |
|
2728 | """diff of the current patch and subsequent modifications | |
@@ -2956,7 +2957,7 b' def savename(path):' | |||||
2956 | newpath = path + ".%d" % (index + 1) |
|
2957 | newpath = path + ".%d" % (index + 1) | |
2957 | return newpath |
|
2958 | return newpath | |
2958 |
|
2959 | |||
2959 |
@command(" |
|
2960 | @command("qpush", | |
2960 | [('', 'keep-changes', None, |
|
2961 | [('', 'keep-changes', None, | |
2961 | _('tolerate non-conflicting local changes')), |
|
2962 | _('tolerate non-conflicting local changes')), | |
2962 | ('f', 'force', None, _('apply on top of local changes')), |
|
2963 | ('f', 'force', None, _('apply on top of local changes')), | |
@@ -2971,7 +2972,8 b' def savename(path):' | |||||
2971 | _('reorder patch series and apply only the patch')), |
|
2972 | _('reorder patch series and apply only the patch')), | |
2972 | ('', 'no-backup', None, _('do not save backup copies of files'))], |
|
2973 | ('', 'no-backup', None, _('do not save backup copies of files'))], | |
2973 | _('hg qpush [-f] [-l] [-a] [--move] [PATCH | INDEX]'), |
|
2974 | _('hg qpush [-f] [-l] [-a] [--move] [PATCH | INDEX]'), | |
2974 |
helpcategory=command.CATEGORY_CHANGE_ORGANIZATION |
|
2975 | helpcategory=command.CATEGORY_CHANGE_ORGANIZATION, | |
|
2976 | helpbasic=True) | |||
2975 | def push(ui, repo, patch=None, **opts): |
|
2977 | def push(ui, repo, patch=None, **opts): | |
2976 | """push the next patch onto the stack |
|
2978 | """push the next patch onto the stack | |
2977 |
|
2979 | |||
@@ -3003,7 +3005,7 b' def push(ui, repo, patch=None, **opts):' | |||||
3003 | keepchanges=opts.get('keep_changes')) |
|
3005 | keepchanges=opts.get('keep_changes')) | |
3004 | return ret |
|
3006 | return ret | |
3005 |
|
3007 | |||
3006 |
@command(" |
|
3008 | @command("qpop", | |
3007 | [('a', 'all', None, _('pop all patches')), |
|
3009 | [('a', 'all', None, _('pop all patches')), | |
3008 | ('n', 'name', '', |
|
3010 | ('n', 'name', '', | |
3009 | _('queue name to pop (DEPRECATED)'), _('NAME')), |
|
3011 | _('queue name to pop (DEPRECATED)'), _('NAME')), | |
@@ -3012,7 +3014,8 b' def push(ui, repo, patch=None, **opts):' | |||||
3012 | ('f', 'force', None, _('forget any local changes to patched files')), |
|
3014 | ('f', 'force', None, _('forget any local changes to patched files')), | |
3013 | ('', 'no-backup', None, _('do not save backup copies of files'))], |
|
3015 | ('', 'no-backup', None, _('do not save backup copies of files'))], | |
3014 | _('hg qpop [-a] [-f] [PATCH | INDEX]'), |
|
3016 | _('hg qpop [-a] [-f] [PATCH | INDEX]'), | |
3015 |
helpcategory=command.CATEGORY_CHANGE_ORGANIZATION |
|
3017 | helpcategory=command.CATEGORY_CHANGE_ORGANIZATION, | |
|
3018 | helpbasic=True) | |||
3016 | def pop(ui, repo, patch=None, **opts): |
|
3019 | def pop(ui, repo, patch=None, **opts): | |
3017 | """pop the current patch off the stack |
|
3020 | """pop the current patch off the stack | |
3018 |
|
3021 |
@@ -32,7 +32,7 b" testedwith = 'ships-with-hg-core'" | |||||
32 |
|
32 | |||
33 | @command("record", |
|
33 | @command("record", | |
34 | # same options as commit + white space diff options |
|
34 | # same options as commit + white space diff options | |
35 |
[c for c in commands.table[' |
|
35 | [c for c in commands.table['commit|ci'][1][:] | |
36 | if c[1] != "interactive"] + cmdutil.diffwsopts, |
|
36 | if c[1] != "interactive"] + cmdutil.diffwsopts, | |
37 | _('hg record [OPTION]... [FILE]...'), |
|
37 | _('hg record [OPTION]... [FILE]...'), | |
38 | helpcategory=command.CATEGORY_COMMITTING) |
|
38 | helpcategory=command.CATEGORY_COMMITTING) | |
@@ -138,7 +138,7 b' def uisetup(ui):' | |||||
138 | (qrecord, |
|
138 | (qrecord, | |
139 | # same options as qnew, but copy them so we don't get |
|
139 | # same options as qnew, but copy them so we don't get | |
140 | # -i/--interactive for qrecord and add white space diff options |
|
140 | # -i/--interactive for qrecord and add white space diff options | |
141 |
mq.cmdtable[' |
|
141 | mq.cmdtable['qnew'][1][:] + cmdutil.diffwsopts, | |
142 | _('hg qrecord [OPTION]... PATCH [FILE]...')) |
|
142 | _('hg qrecord [OPTION]... PATCH [FILE]...')) | |
143 |
|
143 | |||
144 | _wrapcmd('qnew', mq.cmdtable, qnew, _("interactively record a new patch")) |
|
144 | _wrapcmd('qnew', mq.cmdtable, qnew, _("interactively record a new patch")) |
@@ -122,7 +122,7 b' def replacefilecache(cls, propname, repl' | |||||
122 | propname)) |
|
122 | propname)) | |
123 |
|
123 | |||
124 | def _setuplog(ui): |
|
124 | def _setuplog(ui): | |
125 |
entry = commands.table[' |
|
125 | entry = commands.table['log|history'] | |
126 | entry[1].append(('', 'sparse', None, |
|
126 | entry[1].append(('', 'sparse', None, | |
127 | "limit to changesets affecting the sparse checkout")) |
|
127 | "limit to changesets affecting the sparse checkout")) | |
128 |
|
128 | |||
@@ -163,7 +163,7 b' def _clonesparsecmd(orig, ui, repo, *arg' | |||||
163 | return orig(ui, repo, *args, **opts) |
|
163 | return orig(ui, repo, *args, **opts) | |
164 |
|
164 | |||
165 | def _setupclone(ui): |
|
165 | def _setupclone(ui): | |
166 |
entry = commands.table[' |
|
166 | entry = commands.table['clone'] | |
167 | entry[1].append(('', 'enable-profile', [], |
|
167 | entry[1].append(('', 'enable-profile', [], | |
168 | 'enable a sparse profile')) |
|
168 | 'enable a sparse profile')) | |
169 | entry[1].append(('', 'include', [], |
|
169 | entry[1].append(('', 'include', [], | |
@@ -173,7 +173,7 b' def _setupclone(ui):' | |||||
173 | extensions.wrapcommand(commands.table, 'clone', _clonesparsecmd) |
|
173 | extensions.wrapcommand(commands.table, 'clone', _clonesparsecmd) | |
174 |
|
174 | |||
175 | def _setupadd(ui): |
|
175 | def _setupadd(ui): | |
176 |
entry = commands.table[' |
|
176 | entry = commands.table['add'] | |
177 | entry[1].append(('s', 'sparse', None, |
|
177 | entry[1].append(('s', 'sparse', None, | |
178 | 'also include directories of added files in sparse config')) |
|
178 | 'also include directories of added files in sparse config')) | |
179 |
|
179 | |||
@@ -237,7 +237,7 b' def _setupdirstate(ui):' | |||||
237 | return orig(self, *args) |
|
237 | return orig(self, *args) | |
238 | extensions.wrapfunction(dirstate.dirstate, func, _wrapper) |
|
238 | extensions.wrapfunction(dirstate.dirstate, func, _wrapper) | |
239 |
|
239 | |||
240 |
@command(' |
|
240 | @command('debugsparse', [ | |
241 | ('I', 'include', False, _('include files in the sparse checkout')), |
|
241 | ('I', 'include', False, _('include files in the sparse checkout')), | |
242 | ('X', 'exclude', False, _('exclude files in the sparse checkout')), |
|
242 | ('X', 'exclude', False, _('exclude files in the sparse checkout')), | |
243 | ('d', 'delete', False, _('delete an include/exclude rule')), |
|
243 | ('d', 'delete', False, _('delete an include/exclude rule')), | |
@@ -249,7 +249,8 b' def _setupdirstate(ui):' | |||||
249 | ('', 'refresh', False, _('updates the working after sparseness changes')), |
|
249 | ('', 'refresh', False, _('updates the working after sparseness changes')), | |
250 | ('', 'reset', False, _('makes the repo full again')), |
|
250 | ('', 'reset', False, _('makes the repo full again')), | |
251 | ] + commands.templateopts, |
|
251 | ] + commands.templateopts, | |
252 |
_('[--OPTION] PATTERN...') |
|
252 | _('[--OPTION] PATTERN...'), | |
|
253 | helpbasic=True) | |||
253 | def debugsparse(ui, repo, *pats, **opts): |
|
254 | def debugsparse(ui, repo, *pats, **opts): | |
254 | """make the current checkout sparse, or edit the existing checkout |
|
255 | """make the current checkout sparse, or edit the existing checkout | |
255 |
|
256 |
@@ -44,12 +44,12 b' command = registrar.command(cmdtable)' | |||||
44 | # leave the attribute unspecified. |
|
44 | # leave the attribute unspecified. | |
45 | testedwith = 'ships-with-hg-core' |
|
45 | testedwith = 'ships-with-hg-core' | |
46 |
|
46 | |||
47 |
@command(' |
|
47 | @command('split', | |
48 | [('r', 'rev', '', _("revision to split"), _('REV')), |
|
48 | [('r', 'rev', '', _("revision to split"), _('REV')), | |
49 | ('', 'rebase', True, _('rebase descendants after split')), |
|
49 | ('', 'rebase', True, _('rebase descendants after split')), | |
50 | ] + cmdutil.commitopts2, |
|
50 | ] + cmdutil.commitopts2, | |
51 | _('hg split [--no-rebase] [[-r] REV]'), |
|
51 | _('hg split [--no-rebase] [[-r] REV]'), | |
52 | helpcategory=command.CATEGORY_CHANGE_MANAGEMENT) |
|
52 | helpcategory=command.CATEGORY_CHANGE_MANAGEMENT, helpbasic=True) | |
53 | def split(ui, repo, *revs, **opts): |
|
53 | def split(ui, repo, *revs, **opts): | |
54 | """split a changeset into smaller ones |
|
54 | """split a changeset into smaller ones | |
55 |
|
55 |
@@ -191,7 +191,8 b' def predecessormarkers(ctx):' | |||||
191 | for data in ctx.repo().obsstore.predecessors.get(ctx.node(), ()): |
|
191 | for data in ctx.repo().obsstore.predecessors.get(ctx.node(), ()): | |
192 | yield obsutil.marker(ctx.repo(), data) |
|
192 | yield obsutil.marker(ctx.repo(), data) | |
193 |
|
193 | |||
194 |
@command(' |
|
194 | @command('unamend', [], helpcategory=command.CATEGORY_CHANGE_MANAGEMENT, | |
|
195 | helpbasic=True) | |||
195 | def unamend(ui, repo, **opts): |
|
196 | def unamend(ui, repo, **opts): | |
196 | """undo the most recent amend operation on a current changeset |
|
197 | """undo the most recent amend operation on a current changeset | |
197 |
|
198 |
@@ -185,7 +185,7 b' def newandmodified(chunks, originalchunk' | |||||
185 | return newlyaddedandmodifiedfiles |
|
185 | return newlyaddedandmodifiedfiles | |
186 |
|
186 | |||
187 | def parsealiases(cmd): |
|
187 | def parsealiases(cmd): | |
188 |
return cmd |
|
188 | return cmd.split("|") | |
189 |
|
189 | |||
190 | def setupwrapcolorwrite(ui): |
|
190 | def setupwrapcolorwrite(ui): | |
191 | # wrap ui.write so diff output can be labeled/colorized |
|
191 | # wrap ui.write so diff output can be labeled/colorized | |
@@ -673,7 +673,7 b' def findpossible(cmd, table, strict=Fals' | |||||
673 | debugchoice = {} |
|
673 | debugchoice = {} | |
674 |
|
674 | |||
675 | if cmd in table: |
|
675 | if cmd in table: | |
676 |
# short-circuit exact matches, "log" alias beats " |
|
676 | # short-circuit exact matches, "log" alias beats "log|history" | |
677 | keys = [cmd] |
|
677 | keys = [cmd] | |
678 | else: |
|
678 | else: | |
679 | keys = table.keys() |
|
679 | keys = table.keys() |
@@ -131,11 +131,11 b' debugrevlogopts = cmdutil.debugrevlogopt' | |||||
131 |
|
131 | |||
132 | # Commands start here, listed alphabetically |
|
132 | # Commands start here, listed alphabetically | |
133 |
|
133 | |||
134 |
@command(' |
|
134 | @command('add', | |
135 | walkopts + subrepoopts + dryrunopts, |
|
135 | walkopts + subrepoopts + dryrunopts, | |
136 | _('[OPTION]... [FILE]...'), |
|
136 | _('[OPTION]... [FILE]...'), | |
137 | helpcategory=command.CATEGORY_WORKING_DIRECTORY, |
|
137 | helpcategory=command.CATEGORY_WORKING_DIRECTORY, | |
138 | inferrepo=True) |
|
138 | helpbasic=True, inferrepo=True) | |
139 | def add(ui, repo, *pats, **opts): |
|
139 | def add(ui, repo, *pats, **opts): | |
140 | """add the specified files on the next commit |
|
140 | """add the specified files on the next commit | |
141 |
|
141 | |||
@@ -256,7 +256,7 b' def addremove(ui, repo, *pats, **opts):' | |||||
256 | matcher = scmutil.match(repo[None], pats, opts) |
|
256 | matcher = scmutil.match(repo[None], pats, opts) | |
257 | return scmutil.addremove(repo, matcher, "", opts) |
|
257 | return scmutil.addremove(repo, matcher, "", opts) | |
258 |
|
258 | |||
259 |
@command(' |
|
259 | @command('annotate|blame', | |
260 | [('r', 'rev', '', _('annotate the specified revision'), _('REV')), |
|
260 | [('r', 'rev', '', _('annotate the specified revision'), _('REV')), | |
261 | ('', 'follow', None, |
|
261 | ('', 'follow', None, | |
262 | _('follow copies/renames and list the filename (DEPRECATED)')), |
|
262 | _('follow copies/renames and list the filename (DEPRECATED)')), | |
@@ -272,7 +272,7 b' def addremove(ui, repo, *pats, **opts):' | |||||
272 | ] + diffwsopts + walkopts + formatteropts, |
|
272 | ] + diffwsopts + walkopts + formatteropts, | |
273 | _('[-r REV] [-f] [-a] [-u] [-d] [-n] [-c] [-l] FILE...'), |
|
273 | _('[-r REV] [-f] [-a] [-u] [-d] [-n] [-c] [-l] FILE...'), | |
274 | helpcategory=command.CATEGORY_FILE_CONTENTS, |
|
274 | helpcategory=command.CATEGORY_FILE_CONTENTS, | |
275 | inferrepo=True) |
|
275 | helpbasic=True, inferrepo=True) | |
276 | def annotate(ui, repo, *pats, **opts): |
|
276 | def annotate(ui, repo, *pats, **opts): | |
277 | """show changeset information by line for each file |
|
277 | """show changeset information by line for each file | |
278 |
|
278 | |||
@@ -1399,7 +1399,7 b' def cat(ui, repo, file1, *pats, **opts):' | |||||
1399 | return cmdutil.cat(ui, repo, ctx, m, fm, fntemplate, '', |
|
1399 | return cmdutil.cat(ui, repo, ctx, m, fm, fntemplate, '', | |
1400 | **pycompat.strkwargs(opts)) |
|
1400 | **pycompat.strkwargs(opts)) | |
1401 |
|
1401 | |||
1402 |
@command(' |
|
1402 | @command('clone', | |
1403 | [('U', 'noupdate', None, _('the clone will include an empty working ' |
|
1403 | [('U', 'noupdate', None, _('the clone will include an empty working ' | |
1404 | 'directory (only a repository)')), |
|
1404 | 'directory (only a repository)')), | |
1405 | ('u', 'updaterev', '', _('revision, tag, or branch to check out'), |
|
1405 | ('u', 'updaterev', '', _('revision, tag, or branch to check out'), | |
@@ -1416,7 +1416,7 b' def cat(ui, repo, file1, *pats, **opts):' | |||||
1416 | ] + remoteopts, |
|
1416 | ] + remoteopts, | |
1417 | _('[OPTION]... SOURCE [DEST]'), |
|
1417 | _('[OPTION]... SOURCE [DEST]'), | |
1418 | helpcategory=command.CATEGORY_REPO_CREATION, |
|
1418 | helpcategory=command.CATEGORY_REPO_CREATION, | |
1419 | norepo=True) |
|
1419 | helpbasic=True, norepo=True) | |
1420 | def clone(ui, source, dest=None, **opts): |
|
1420 | def clone(ui, source, dest=None, **opts): | |
1421 | """make a copy of an existing repository |
|
1421 | """make a copy of an existing repository | |
1422 |
|
1422 | |||
@@ -1555,7 +1555,7 b' def clone(ui, source, dest=None, **opts)' | |||||
1555 |
|
1555 | |||
1556 | return r is None |
|
1556 | return r is None | |
1557 |
|
1557 | |||
1558 |
@command(' |
|
1558 | @command('commit|ci', | |
1559 | [('A', 'addremove', None, |
|
1559 | [('A', 'addremove', None, | |
1560 | _('mark new/missing files as added/removed before committing')), |
|
1560 | _('mark new/missing files as added/removed before committing')), | |
1561 | ('', 'close-branch', None, |
|
1561 | ('', 'close-branch', None, | |
@@ -1566,7 +1566,7 b' def clone(ui, source, dest=None, **opts)' | |||||
1566 | ('i', 'interactive', None, _('use interactive mode')), |
|
1566 | ('i', 'interactive', None, _('use interactive mode')), | |
1567 | ] + walkopts + commitopts + commitopts2 + subrepoopts, |
|
1567 | ] + walkopts + commitopts + commitopts2 + subrepoopts, | |
1568 | _('[OPTION]... [FILE]...'), |
|
1568 | _('[OPTION]... [FILE]...'), | |
1569 | helpcategory=command.CATEGORY_COMMITTING, |
|
1569 | helpcategory=command.CATEGORY_COMMITTING, helpbasic=True, | |
1570 | inferrepo=True) |
|
1570 | inferrepo=True) | |
1571 | def commit(ui, repo, *pats, **opts): |
|
1571 | def commit(ui, repo, *pats, **opts): | |
1572 | """commit the specified files or all outstanding changes |
|
1572 | """commit the specified files or all outstanding changes | |
@@ -1867,7 +1867,7 b' def copy(ui, repo, *pats, **opts):' | |||||
1867 | def debugcommands(ui, cmd='', *args): |
|
1867 | def debugcommands(ui, cmd='', *args): | |
1868 | """list all available commands and options""" |
|
1868 | """list all available commands and options""" | |
1869 | for cmd, vals in sorted(table.iteritems()): |
|
1869 | for cmd, vals in sorted(table.iteritems()): | |
1870 |
cmd = cmd.split('|')[0] |
|
1870 | cmd = cmd.split('|')[0] | |
1871 | opts = ', '.join([i[1] for i in vals[1]]) |
|
1871 | opts = ', '.join([i[1] for i in vals[1]]) | |
1872 | ui.write('%s: %s\n' % (cmd, opts)) |
|
1872 | ui.write('%s: %s\n' % (cmd, opts)) | |
1873 |
|
1873 | |||
@@ -1900,14 +1900,13 b" def debugcomplete(ui, cmd='', **opts):" | |||||
1900 | cmdlist = [' '.join(c[0]) for c in cmdlist.values()] |
|
1900 | cmdlist = [' '.join(c[0]) for c in cmdlist.values()] | |
1901 | ui.write("%s\n" % "\n".join(sorted(cmdlist))) |
|
1901 | ui.write("%s\n" % "\n".join(sorted(cmdlist))) | |
1902 |
|
1902 | |||
1903 |
@command(' |
|
1903 | @command('diff', | |
1904 | [('r', 'rev', [], _('revision'), _('REV')), |
|
1904 | [('r', 'rev', [], _('revision'), _('REV')), | |
1905 | ('c', 'change', '', _('change made by revision'), _('REV')) |
|
1905 | ('c', 'change', '', _('change made by revision'), _('REV')) | |
1906 | ] + diffopts + diffopts2 + walkopts + subrepoopts, |
|
1906 | ] + diffopts + diffopts2 + walkopts + subrepoopts, | |
1907 | _('[OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...'), |
|
1907 | _('[OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...'), | |
1908 | helpcategory=command.CATEGORY_FILE_CONTENTS, |
|
1908 | helpcategory=command.CATEGORY_FILE_CONTENTS, | |
1909 | inferrepo=True, |
|
1909 | helpbasic=True, inferrepo=True, intents={INTENT_READONLY}) | |
1910 | intents={INTENT_READONLY}) |
|
|||
1911 | def diff(ui, repo, *pats, **opts): |
|
1910 | def diff(ui, repo, *pats, **opts): | |
1912 | """diff repository (or selected files) |
|
1911 | """diff repository (or selected files) | |
1913 |
|
1912 | |||
@@ -1995,7 +1994,7 b' def diff(ui, repo, *pats, **opts):' | |||||
1995 | listsubrepos=opts.get('subrepos'), |
|
1994 | listsubrepos=opts.get('subrepos'), | |
1996 | root=opts.get('root')) |
|
1995 | root=opts.get('root')) | |
1997 |
|
1996 | |||
1998 |
@command(' |
|
1997 | @command('export', | |
1999 | [('B', 'bookmark', '', |
|
1998 | [('B', 'bookmark', '', | |
2000 | _('export changes only reachable by given bookmark')), |
|
1999 | _('export changes only reachable by given bookmark')), | |
2001 | ('o', 'output', '', |
|
2000 | ('o', 'output', '', | |
@@ -2005,7 +2004,7 b' def diff(ui, repo, *pats, **opts):' | |||||
2005 | ] + diffopts + formatteropts, |
|
2004 | ] + diffopts + formatteropts, | |
2006 | _('[OPTION]... [-o OUTFILESPEC] [-r] [REV]...'), |
|
2005 | _('[OPTION]... [-o OUTFILESPEC] [-r] [REV]...'), | |
2007 | helpcategory=command.CATEGORY_IMPORT_EXPORT, |
|
2006 | helpcategory=command.CATEGORY_IMPORT_EXPORT, | |
2008 | intents={INTENT_READONLY}) |
|
2007 | helpbasic=True, intents={INTENT_READONLY}) | |
2009 | def export(ui, repo, *changesets, **opts): |
|
2008 | def export(ui, repo, *changesets, **opts): | |
2010 | """dump the header and diffs for one or more changesets |
|
2009 | """dump the header and diffs for one or more changesets | |
2011 |
|
2010 | |||
@@ -2198,12 +2197,12 b' def files(ui, repo, *pats, **opts):' | |||||
2198 | return cmdutil.files(ui, ctx, m, fm, fmt, opts.get('subrepos')) |
|
2197 | return cmdutil.files(ui, ctx, m, fm, fmt, opts.get('subrepos')) | |
2199 |
|
2198 | |||
2200 | @command( |
|
2199 | @command( | |
2201 |
' |
|
2200 | 'forget', | |
2202 | [('i', 'interactive', None, _('use interactive mode')), |
|
2201 | [('i', 'interactive', None, _('use interactive mode')), | |
2203 | ] + walkopts + dryrunopts, |
|
2202 | ] + walkopts + dryrunopts, | |
2204 | _('[OPTION]... FILE...'), |
|
2203 | _('[OPTION]... FILE...'), | |
2205 | helpcategory=command.CATEGORY_WORKING_DIRECTORY, |
|
2204 | helpcategory=command.CATEGORY_WORKING_DIRECTORY, | |
2206 | inferrepo=True) |
|
2205 | helpbasic=True, inferrepo=True) | |
2207 | def forget(ui, repo, *pats, **opts): |
|
2206 | def forget(ui, repo, *pats, **opts): | |
2208 | """forget the specified files on the next commit |
|
2207 | """forget the specified files on the next commit | |
2209 |
|
2208 | |||
@@ -3549,9 +3548,9 b' def incoming(ui, repo, source="default",' | |||||
3549 | del repo._subtoppath |
|
3548 | del repo._subtoppath | |
3550 |
|
3549 | |||
3551 |
|
3550 | |||
3552 |
@command(' |
|
3551 | @command('init', remoteopts, _('[-e CMD] [--remotecmd CMD] [DEST]'), | |
3553 | helpcategory=command.CATEGORY_REPO_CREATION, |
|
3552 | helpcategory=command.CATEGORY_REPO_CREATION, | |
3554 | norepo=True) |
|
3553 | helpbasic=True, norepo=True) | |
3555 | def init(ui, dest=".", **opts): |
|
3554 | def init(ui, dest=".", **opts): | |
3556 | """create a new repository in the given directory |
|
3555 | """create a new repository in the given directory | |
3557 |
|
3556 | |||
@@ -3624,7 +3623,7 b' def locate(ui, repo, *pats, **opts):' | |||||
3624 |
|
3623 | |||
3625 | return ret |
|
3624 | return ret | |
3626 |
|
3625 | |||
3627 |
@command(' |
|
3626 | @command('log|history', | |
3628 | [('f', 'follow', None, |
|
3627 | [('f', 'follow', None, | |
3629 | _('follow changeset history, or file history across copies and renames')), |
|
3628 | _('follow changeset history, or file history across copies and renames')), | |
3630 | ('', 'follow-first', None, |
|
3629 | ('', 'follow-first', None, | |
@@ -3650,7 +3649,7 b' def locate(ui, repo, *pats, **opts):' | |||||
3650 | ] + logopts + walkopts, |
|
3649 | ] + logopts + walkopts, | |
3651 | _('[OPTION]... [FILE]'), |
|
3650 | _('[OPTION]... [FILE]'), | |
3652 | helpcategory=command.CATEGORY_CHANGE_NAVIGATION, |
|
3651 | helpcategory=command.CATEGORY_CHANGE_NAVIGATION, | |
3653 | inferrepo=True, |
|
3652 | helpbasic=True, inferrepo=True, | |
3654 | intents={INTENT_READONLY}) |
|
3653 | intents={INTENT_READONLY}) | |
3655 | def log(ui, repo, *pats, **opts): |
|
3654 | def log(ui, repo, *pats, **opts): | |
3656 | """show revision history of entire repository or files |
|
3655 | """show revision history of entire repository or files | |
@@ -3878,7 +3877,7 b' def manifest(ui, repo, node=None, rev=No' | |||||
3878 | fm.write('path', '%s\n', f) |
|
3877 | fm.write('path', '%s\n', f) | |
3879 | fm.end() |
|
3878 | fm.end() | |
3880 |
|
3879 | |||
3881 |
@command(' |
|
3880 | @command('merge', | |
3882 | [('f', 'force', None, |
|
3881 | [('f', 'force', None, | |
3883 | _('force a merge including outstanding changes (DEPRECATED)')), |
|
3882 | _('force a merge including outstanding changes (DEPRECATED)')), | |
3884 | ('r', 'rev', '', _('revision to merge'), _('REV')), |
|
3883 | ('r', 'rev', '', _('revision to merge'), _('REV')), | |
@@ -3887,7 +3886,7 b' def manifest(ui, repo, node=None, rev=No' | |||||
3887 | ('', 'abort', None, _('abort the ongoing merge')), |
|
3886 | ('', 'abort', None, _('abort the ongoing merge')), | |
3888 | ] + mergetoolopts, |
|
3887 | ] + mergetoolopts, | |
3889 | _('[-P] [[-r] REV]'), |
|
3888 | _('[-P] [[-r] REV]'), | |
3890 | helpcategory=command.CATEGORY_CHANGE_MANAGEMENT) |
|
3889 | helpcategory=command.CATEGORY_CHANGE_MANAGEMENT, helpbasic=True) | |
3891 | def merge(ui, repo, node=None, **opts): |
|
3890 | def merge(ui, repo, node=None, **opts): | |
3892 | """merge another revision into working directory |
|
3891 | """merge another revision into working directory | |
3893 |
|
3892 | |||
@@ -4305,7 +4304,7 b' def postincoming(ui, repo, modheads, opt' | |||||
4305 | elif not ui.configbool('commands', 'update.requiredest'): |
|
4304 | elif not ui.configbool('commands', 'update.requiredest'): | |
4306 | ui.status(_("(run 'hg update' to get a working copy)\n")) |
|
4305 | ui.status(_("(run 'hg update' to get a working copy)\n")) | |
4307 |
|
4306 | |||
4308 |
@command(' |
|
4307 | @command('pull', | |
4309 | [('u', 'update', None, |
|
4308 | [('u', 'update', None, | |
4310 | _('update to new branch head if new descendants were pulled')), |
|
4309 | _('update to new branch head if new descendants were pulled')), | |
4311 | ('f', 'force', None, _('run even when remote repository is unrelated')), |
|
4310 | ('f', 'force', None, _('run even when remote repository is unrelated')), | |
@@ -4315,7 +4314,8 b' def postincoming(ui, repo, modheads, opt' | |||||
4315 | _('BRANCH')), |
|
4314 | _('BRANCH')), | |
4316 | ] + remoteopts, |
|
4315 | ] + remoteopts, | |
4317 | _('[-u] [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [SOURCE]'), |
|
4316 | _('[-u] [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [SOURCE]'), | |
4318 |
helpcategory=command.CATEGORY_REMOTE_REPO_MANAGEMENT |
|
4317 | helpcategory=command.CATEGORY_REMOTE_REPO_MANAGEMENT, | |
|
4318 | helpbasic=True) | |||
4319 | def pull(ui, repo, source="default", **opts): |
|
4319 | def pull(ui, repo, source="default", **opts): | |
4320 | """pull changes from the specified source |
|
4320 | """pull changes from the specified source | |
4321 |
|
4321 | |||
@@ -4435,7 +4435,7 b' def pull(ui, repo, source="default", **o' | |||||
4435 | other.close() |
|
4435 | other.close() | |
4436 | return ret |
|
4436 | return ret | |
4437 |
|
4437 | |||
4438 |
@command(' |
|
4438 | @command('push', | |
4439 | [('f', 'force', None, _('force push')), |
|
4439 | [('f', 'force', None, _('force push')), | |
4440 | ('r', 'rev', [], |
|
4440 | ('r', 'rev', [], | |
4441 | _('a changeset intended to be included in the destination'), |
|
4441 | _('a changeset intended to be included in the destination'), | |
@@ -4447,7 +4447,8 b' def pull(ui, repo, source="default", **o' | |||||
4447 | ('', 'pushvars', [], _('variables that can be sent to server (ADVANCED)')), |
|
4447 | ('', 'pushvars', [], _('variables that can be sent to server (ADVANCED)')), | |
4448 | ] + remoteopts, |
|
4448 | ] + remoteopts, | |
4449 | _('[-f] [-r REV]... [-e CMD] [--remotecmd CMD] [DEST]'), |
|
4449 | _('[-f] [-r REV]... [-e CMD] [--remotecmd CMD] [DEST]'), | |
4450 |
helpcategory=command.CATEGORY_REMOTE_REPO_MANAGEMENT |
|
4450 | helpcategory=command.CATEGORY_REMOTE_REPO_MANAGEMENT, | |
|
4451 | helpbasic=True) | |||
4451 | def push(ui, repo, dest=None, **opts): |
|
4452 | def push(ui, repo, dest=None, **opts): | |
4452 | """push changes to the specified destination |
|
4453 | """push changes to the specified destination | |
4453 |
|
4454 | |||
@@ -4589,14 +4590,14 b' def recover(ui, repo):' | |||||
4589 | return hg.verify(repo) |
|
4590 | return hg.verify(repo) | |
4590 | return 1 |
|
4591 | return 1 | |
4591 |
|
4592 | |||
4592 |
@command(' |
|
4593 | @command('remove|rm', | |
4593 | [('A', 'after', None, _('record delete for missing files')), |
|
4594 | [('A', 'after', None, _('record delete for missing files')), | |
4594 | ('f', 'force', None, |
|
4595 | ('f', 'force', None, | |
4595 | _('forget added files, delete modified files')), |
|
4596 | _('forget added files, delete modified files')), | |
4596 | ] + subrepoopts + walkopts + dryrunopts, |
|
4597 | ] + subrepoopts + walkopts + dryrunopts, | |
4597 | _('[OPTION]... FILE...'), |
|
4598 | _('[OPTION]... FILE...'), | |
4598 | helpcategory=command.CATEGORY_WORKING_DIRECTORY, |
|
4599 | helpcategory=command.CATEGORY_WORKING_DIRECTORY, | |
4599 | inferrepo=True) |
|
4600 | helpbasic=True, inferrepo=True) | |
4600 | def remove(ui, repo, *pats, **opts): |
|
4601 | def remove(ui, repo, *pats, **opts): | |
4601 | """remove the specified files on the next commit |
|
4602 | """remove the specified files on the next commit | |
4602 |
|
4603 | |||
@@ -5132,7 +5133,7 b' def root(ui, repo):' | |||||
5132 | """ |
|
5133 | """ | |
5133 | ui.write(repo.root + "\n") |
|
5134 | ui.write(repo.root + "\n") | |
5134 |
|
5135 | |||
5135 |
@command(' |
|
5136 | @command('serve', | |
5136 | [('A', 'accesslog', '', _('name of access log file to write to'), |
|
5137 | [('A', 'accesslog', '', _('name of access log file to write to'), | |
5137 | _('FILE')), |
|
5138 | _('FILE')), | |
5138 | ('d', 'daemon', None, _('run server in background')), |
|
5139 | ('d', 'daemon', None, _('run server in background')), | |
@@ -5161,7 +5162,7 b' def root(ui, repo):' | |||||
5161 | + subrepoopts, |
|
5162 | + subrepoopts, | |
5162 | _('[OPTION]...'), |
|
5163 | _('[OPTION]...'), | |
5163 | helpcategory=command.CATEGORY_REMOTE_REPO_MANAGEMENT, |
|
5164 | helpcategory=command.CATEGORY_REMOTE_REPO_MANAGEMENT, | |
5164 | optionalrepo=True) |
|
5165 | helpbasic=True, optionalrepo=True) | |
5165 | def serve(ui, repo, **opts): |
|
5166 | def serve(ui, repo, **opts): | |
5166 | """start stand-alone webserver |
|
5167 | """start stand-alone webserver | |
5167 |
|
5168 | |||
@@ -5205,7 +5206,7 b' def serve(ui, repo, **opts):' | |||||
5205 |
|
5206 | |||
5206 | _NOTTERSE = 'nothing' |
|
5207 | _NOTTERSE = 'nothing' | |
5207 |
|
5208 | |||
5208 |
@command(' |
|
5209 | @command('status|st', | |
5209 | [('A', 'all', None, _('show status of all files')), |
|
5210 | [('A', 'all', None, _('show status of all files')), | |
5210 | ('m', 'modified', None, _('show only modified files')), |
|
5211 | ('m', 'modified', None, _('show only modified files')), | |
5211 | ('a', 'added', None, _('show only added files')), |
|
5212 | ('a', 'added', None, _('show only added files')), | |
@@ -5223,7 +5224,7 b' def serve(ui, repo, **opts):' | |||||
5223 | ] + walkopts + subrepoopts + formatteropts, |
|
5224 | ] + walkopts + subrepoopts + formatteropts, | |
5224 | _('[OPTION]... [FILE]...'), |
|
5225 | _('[OPTION]... [FILE]...'), | |
5225 | helpcategory=command.CATEGORY_WORKING_DIRECTORY, |
|
5226 | helpcategory=command.CATEGORY_WORKING_DIRECTORY, | |
5226 | inferrepo=True, |
|
5227 | helpbasic=True, inferrepo=True, | |
5227 | intents={INTENT_READONLY}) |
|
5228 | intents={INTENT_READONLY}) | |
5228 | def status(ui, repo, *pats, **opts): |
|
5229 | def status(ui, repo, *pats, **opts): | |
5229 | """show changed files in the working directory |
|
5230 | """show changed files in the working directory | |
@@ -5409,10 +5410,11 b' def status(ui, repo, *pats, **opts):' | |||||
5409 | cmdutil.morestatus(repo, fm) |
|
5410 | cmdutil.morestatus(repo, fm) | |
5410 | fm.end() |
|
5411 | fm.end() | |
5411 |
|
5412 | |||
5412 |
@command(' |
|
5413 | @command('summary|sum', | |
5413 | [('', 'remote', None, _('check for push and pull'))], |
|
5414 | [('', 'remote', None, _('check for push and pull'))], | |
5414 | '[--remote]', |
|
5415 | '[--remote]', | |
5415 | helpcategory=command.CATEGORY_WORKING_DIRECTORY, |
|
5416 | helpcategory=command.CATEGORY_WORKING_DIRECTORY, | |
|
5417 | helpbasic=True, | |||
5416 | intents={INTENT_READONLY}) |
|
5418 | intents={INTENT_READONLY}) | |
5417 | def summary(ui, repo, **opts): |
|
5419 | def summary(ui, repo, **opts): | |
5418 | """summarize working directory state |
|
5420 | """summarize working directory state | |
@@ -5927,7 +5929,7 b' def unbundle(ui, repo, fname1, *fnames, ' | |||||
5927 |
|
5929 | |||
5928 | return postincoming(ui, repo, modheads, opts.get(r'update'), None, None) |
|
5930 | return postincoming(ui, repo, modheads, opts.get(r'update'), None, None) | |
5929 |
|
5931 | |||
5930 |
@command(' |
|
5932 | @command('update|up|checkout|co', | |
5931 | [('C', 'clean', None, _('discard uncommitted changes (no backup)')), |
|
5933 | [('C', 'clean', None, _('discard uncommitted changes (no backup)')), | |
5932 | ('c', 'check', None, _('require clean working directory')), |
|
5934 | ('c', 'check', None, _('require clean working directory')), | |
5933 | ('m', 'merge', None, _('merge uncommitted changes')), |
|
5935 | ('m', 'merge', None, _('merge uncommitted changes')), | |
@@ -5935,7 +5937,8 b' def unbundle(ui, repo, fname1, *fnames, ' | |||||
5935 | ('r', 'rev', '', _('revision'), _('REV')) |
|
5937 | ('r', 'rev', '', _('revision'), _('REV')) | |
5936 | ] + mergetoolopts, |
|
5938 | ] + mergetoolopts, | |
5937 | _('[-C|-c|-m] [-d DATE] [[-r] REV]'), |
|
5939 | _('[-C|-c|-m] [-d DATE] [[-r] REV]'), | |
5938 |
helpcategory=command.CATEGORY_WORKING_DIRECTORY |
|
5940 | helpcategory=command.CATEGORY_WORKING_DIRECTORY, | |
|
5941 | helpbasic=True) | |||
5939 | def update(ui, repo, node=None, **opts): |
|
5942 | def update(ui, repo, node=None, **opts): | |
5940 | """update working directory (or switch revisions) |
|
5943 | """update working directory (or switch revisions) | |
5941 |
|
5944 |
@@ -516,16 +516,14 b' def help_(ui, commands, name, unknowncmd' | |||||
516 | f = fs[0] |
|
516 | f = fs[0] | |
517 | syns[f] = ', '.join(fs) |
|
517 | syns[f] = ', '.join(fs) | |
518 | func = e[0] |
|
518 | func = e[0] | |
519 | p = '' |
|
519 | if select and not select(f): | |
520 | if c.startswith("^"): |
|
|||
521 | p = '^' |
|
|||
522 | if select and not select(p + f): |
|
|||
523 | continue |
|
520 | continue | |
524 | if (not select and name != 'shortlist' and |
|
521 | if (not select and name != 'shortlist' and | |
525 | func.__module__ != commands.__name__): |
|
522 | func.__module__ != commands.__name__): | |
526 | continue |
|
523 | continue | |
527 |
if name == "shortlist" |
|
524 | if name == "shortlist": | |
528 | continue |
|
525 | if not getattr(func, 'helpbasic', False): | |
|
526 | continue | |||
529 | doc = pycompat.getdoc(func) |
|
527 | doc = pycompat.getdoc(func) | |
530 | if filtercmd(ui, f, name, doc): |
|
528 | if filtercmd(ui, f, name, doc): | |
531 | continue |
|
529 | continue |
@@ -1418,8 +1418,8 b' def help(web):' | |||||
1418 | if 'DEPRECATED' in doc or c.startswith('debug'): |
|
1418 | if 'DEPRECATED' in doc or c.startswith('debug'): | |
1419 | continue |
|
1419 | continue | |
1420 | cmd = primary(c) |
|
1420 | cmd = primary(c) | |
1421 | if cmd.startswith('^'): |
|
1421 | if getattr(e[0], 'helpbasic', False): | |
1422 |
early.append((cmd |
|
1422 | early.append((cmd, doc)) | |
1423 | else: |
|
1423 | else: | |
1424 | other.append((cmd, doc)) |
|
1424 | other.append((cmd, doc)) | |
1425 |
|
1425 |
@@ -185,12 +185,13 b' class command(_funcregistrarbase):' | |||||
185 |
|
185 | |||
186 | def _doregister(self, func, name, options=(), synopsis=None, |
|
186 | def _doregister(self, func, name, options=(), synopsis=None, | |
187 | norepo=False, optionalrepo=False, inferrepo=False, |
|
187 | norepo=False, optionalrepo=False, inferrepo=False, | |
188 | intents=None, helpcategory=None): |
|
188 | intents=None, helpcategory=None, helpbasic=False): | |
189 | func.norepo = norepo |
|
189 | func.norepo = norepo | |
190 | func.optionalrepo = optionalrepo |
|
190 | func.optionalrepo = optionalrepo | |
191 | func.inferrepo = inferrepo |
|
191 | func.inferrepo = inferrepo | |
192 | func.intents = intents or set() |
|
192 | func.intents = intents or set() | |
193 | func.helpcategory = helpcategory |
|
193 | func.helpcategory = helpcategory | |
|
194 | func.helpbasic = helpbasic | |||
194 | if synopsis: |
|
195 | if synopsis: | |
195 | self._table[name] = func, list(options), synopsis |
|
196 | self._table[name] = func, list(options), synopsis | |
196 | else: |
|
197 | else: |
@@ -231,23 +231,8 b' Show an error if we use --options with a' | |||||
231 | Show all commands + options |
|
231 | Show all commands + options | |
232 | $ hg debugcommands |
|
232 | $ hg debugcommands | |
233 | add: include, exclude, subrepos, dry-run |
|
233 | add: include, exclude, subrepos, dry-run | |
|
234 | addremove: similarity, subrepos, include, exclude, dry-run | |||
234 | annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, skip, ignore-all-space, ignore-space-change, ignore-blank-lines, ignore-space-at-eol, include, exclude, template |
|
235 | annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, skip, ignore-all-space, ignore-space-change, ignore-blank-lines, ignore-space-at-eol, include, exclude, template | |
235 | clone: noupdate, updaterev, rev, branch, pull, uncompressed, stream, ssh, remotecmd, insecure |
|
|||
236 | commit: addremove, close-branch, amend, secret, edit, interactive, include, exclude, message, logfile, date, user, subrepos |
|
|||
237 | diff: rev, change, text, git, binary, nodates, noprefix, show-function, reverse, ignore-all-space, ignore-space-change, ignore-blank-lines, ignore-space-at-eol, unified, stat, root, include, exclude, subrepos |
|
|||
238 | export: bookmark, output, switch-parent, rev, text, git, binary, nodates, template |
|
|||
239 | forget: interactive, include, exclude, dry-run |
|
|||
240 | init: ssh, remotecmd, insecure |
|
|||
241 | log: follow, follow-first, date, copies, keyword, rev, line-range, removed, only-merges, user, only-branch, branch, prune, patch, git, limit, no-merges, stat, graph, style, template, include, exclude |
|
|||
242 | merge: force, rev, preview, abort, tool |
|
|||
243 | pull: update, force, rev, bookmark, branch, ssh, remotecmd, insecure |
|
|||
244 | push: force, rev, bookmark, branch, new-branch, pushvars, ssh, remotecmd, insecure |
|
|||
245 | remove: after, force, subrepos, include, exclude, dry-run |
|
|||
246 | serve: accesslog, daemon, daemon-postexec, errorlog, port, address, prefix, name, web-conf, webdir-conf, pid-file, stdio, cmdserver, templates, style, ipv6, certificate, print-url, subrepos |
|
|||
247 | status: all, modified, added, removed, deleted, clean, unknown, ignored, no-status, terse, copies, print0, rev, change, include, exclude, subrepos, template |
|
|||
248 | summary: remote |
|
|||
249 | update: clean, check, merge, date, rev, tool |
|
|||
250 | addremove: similarity, subrepos, include, exclude, dry-run |
|
|||
251 | archive: no-decode, prefix, rev, type, subrepos, include, exclude |
|
236 | archive: no-decode, prefix, rev, type, subrepos, include, exclude | |
252 | backout: merge, commit, no-commit, parent, rev, edit, tool, include, exclude, message, logfile, date, user |
|
237 | backout: merge, commit, no-commit, parent, rev, edit, tool, include, exclude, message, logfile, date, user | |
253 | bisect: reset, good, bad, skip, extend, command, noupdate |
|
238 | bisect: reset, good, bad, skip, extend, command, noupdate | |
@@ -256,6 +241,8 b' Show all commands + options' | |||||
256 | branches: active, closed, template |
|
241 | branches: active, closed, template | |
257 | bundle: force, rev, branch, base, all, type, ssh, remotecmd, insecure |
|
242 | bundle: force, rev, branch, base, all, type, ssh, remotecmd, insecure | |
258 | cat: output, rev, decode, include, exclude, template |
|
243 | cat: output, rev, decode, include, exclude, template | |
|
244 | clone: noupdate, updaterev, rev, branch, pull, uncompressed, stream, ssh, remotecmd, insecure | |||
|
245 | commit: addremove, close-branch, amend, secret, edit, interactive, include, exclude, message, logfile, date, user, subrepos | |||
259 | config: untrusted, edit, local, global, template |
|
246 | config: untrusted, edit, local, global, template | |
260 | copy: after, force, include, exclude, dry-run |
|
247 | copy: after, force, include, exclude, dry-run | |
261 | debugancestor: |
|
248 | debugancestor: | |
@@ -317,7 +304,10 b' Show all commands + options' | |||||
317 | debugwhyunstable: |
|
304 | debugwhyunstable: | |
318 | debugwireargs: three, four, five, ssh, remotecmd, insecure |
|
305 | debugwireargs: three, four, five, ssh, remotecmd, insecure | |
319 | debugwireproto: localssh, peer, noreadstderr, nologhandshake, ssh, remotecmd, insecure |
|
306 | debugwireproto: localssh, peer, noreadstderr, nologhandshake, ssh, remotecmd, insecure | |
|
307 | diff: rev, change, text, git, binary, nodates, noprefix, show-function, reverse, ignore-all-space, ignore-space-change, ignore-blank-lines, ignore-space-at-eol, unified, stat, root, include, exclude, subrepos | |||
|
308 | export: bookmark, output, switch-parent, rev, text, git, binary, nodates, template | |||
320 | files: rev, print0, include, exclude, template, subrepos |
|
309 | files: rev, print0, include, exclude, template, subrepos | |
|
310 | forget: interactive, include, exclude, dry-run | |||
321 | graft: rev, continue, stop, abort, edit, log, no-commit, force, currentdate, currentuser, date, user, tool, dry-run |
|
311 | graft: rev, continue, stop, abort, edit, log, no-commit, force, currentdate, currentuser, date, user, tool, dry-run | |
322 | grep: print0, all, diff, text, follow, ignore-case, files-with-matches, line-number, rev, all-files, user, date, template, include, exclude |
|
312 | grep: print0, all, diff, text, follow, ignore-case, files-with-matches, line-number, rev, all-files, user, date, template, include, exclude | |
323 | heads: rev, topo, active, closed, style, template |
|
313 | heads: rev, topo, active, closed, style, template | |
@@ -325,22 +315,32 b' Show all commands + options' | |||||
325 | identify: rev, num, id, branch, tags, bookmarks, ssh, remotecmd, insecure, template |
|
315 | identify: rev, num, id, branch, tags, bookmarks, ssh, remotecmd, insecure, template | |
326 | import: strip, base, edit, force, no-commit, bypass, partial, exact, prefix, import-branch, message, logfile, date, user, similarity |
|
316 | import: strip, base, edit, force, no-commit, bypass, partial, exact, prefix, import-branch, message, logfile, date, user, similarity | |
327 | incoming: force, newest-first, bundle, rev, bookmarks, branch, patch, git, limit, no-merges, stat, graph, style, template, ssh, remotecmd, insecure, subrepos |
|
317 | incoming: force, newest-first, bundle, rev, bookmarks, branch, patch, git, limit, no-merges, stat, graph, style, template, ssh, remotecmd, insecure, subrepos | |
|
318 | init: ssh, remotecmd, insecure | |||
328 | locate: rev, print0, fullpath, include, exclude |
|
319 | locate: rev, print0, fullpath, include, exclude | |
|
320 | log: follow, follow-first, date, copies, keyword, rev, line-range, removed, only-merges, user, only-branch, branch, prune, patch, git, limit, no-merges, stat, graph, style, template, include, exclude | |||
329 | manifest: rev, all, template |
|
321 | manifest: rev, all, template | |
|
322 | merge: force, rev, preview, abort, tool | |||
330 | outgoing: force, rev, newest-first, bookmarks, branch, patch, git, limit, no-merges, stat, graph, style, template, ssh, remotecmd, insecure, subrepos |
|
323 | outgoing: force, rev, newest-first, bookmarks, branch, patch, git, limit, no-merges, stat, graph, style, template, ssh, remotecmd, insecure, subrepos | |
331 | parents: rev, style, template |
|
324 | parents: rev, style, template | |
332 | paths: template |
|
325 | paths: template | |
333 | phase: public, draft, secret, force, rev |
|
326 | phase: public, draft, secret, force, rev | |
|
327 | pull: update, force, rev, bookmark, branch, ssh, remotecmd, insecure | |||
|
328 | push: force, rev, bookmark, branch, new-branch, pushvars, ssh, remotecmd, insecure | |||
334 | recover: |
|
329 | recover: | |
|
330 | remove: after, force, subrepos, include, exclude, dry-run | |||
335 | rename: after, force, include, exclude, dry-run |
|
331 | rename: after, force, include, exclude, dry-run | |
336 | resolve: all, list, mark, unmark, no-status, re-merge, tool, include, exclude, template |
|
332 | resolve: all, list, mark, unmark, no-status, re-merge, tool, include, exclude, template | |
337 | revert: all, date, rev, no-backup, interactive, include, exclude, dry-run |
|
333 | revert: all, date, rev, no-backup, interactive, include, exclude, dry-run | |
338 | rollback: dry-run, force |
|
334 | rollback: dry-run, force | |
339 | root: |
|
335 | root: | |
|
336 | serve: accesslog, daemon, daemon-postexec, errorlog, port, address, prefix, name, web-conf, webdir-conf, pid-file, stdio, cmdserver, templates, style, ipv6, certificate, print-url, subrepos | |||
|
337 | status: all, modified, added, removed, deleted, clean, unknown, ignored, no-status, terse, copies, print0, rev, change, include, exclude, subrepos, template | |||
|
338 | summary: remote | |||
340 | tag: force, local, rev, remove, edit, message, date, user |
|
339 | tag: force, local, rev, remove, edit, message, date, user | |
341 | tags: template |
|
340 | tags: template | |
342 | tip: patch, git, style, template |
|
341 | tip: patch, git, style, template | |
343 | unbundle: update |
|
342 | unbundle: update | |
|
343 | update: clean, check, merge, date, rev, tool | |||
344 | verify: |
|
344 | verify: | |
345 | version: template |
|
345 | version: template | |
346 |
|
346 |
General Comments 0
You need to be logged in to leave comments.
Login now