Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 40295:fa88170c10bb
help: adding a proper declaration for shortlist/basic commands (API)
We previously used the '^' prefix to indicate that a command
should be shown on the short list (shown for just "hg"), but
that's a horrible hack, so I'm removing it.
Differential Revision: https://phab.mercurial-scm.org/D5069
author | Rodrigo Damazio <rdamazio@google.com> |
---|---|
date | Fri, 12 Oct 2018 18:49:11 +0200 |
parents | 57500950f40e |
children | 943248e47864 |
comparison
equal
deleted
inserted
replaced
40294:fabbf9310025 | 40295:fa88170c10bb |
---|---|
183 originalchunks: | 183 originalchunks: |
184 newlyaddedandmodifiedfiles.add(chunk.header.filename()) | 184 newlyaddedandmodifiedfiles.add(chunk.header.filename()) |
185 return newlyaddedandmodifiedfiles | 185 return newlyaddedandmodifiedfiles |
186 | 186 |
187 def parsealiases(cmd): | 187 def parsealiases(cmd): |
188 return cmd.lstrip("^").split("|") | 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 |
192 def wrapwrite(orig, *args, **kw): | 192 def wrapwrite(orig, *args, **kw): |
193 label = kw.pop(r'label', '') | 193 label = kw.pop(r'label', '') |
671 """ | 671 """ |
672 choice = {} | 672 choice = {} |
673 debugchoice = {} | 673 debugchoice = {} |
674 | 674 |
675 if cmd in table: | 675 if cmd in table: |
676 # short-circuit exact matches, "log" alias beats "^log|history" | 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() |
680 | 680 |
681 allcmds = [] | 681 allcmds = [] |