Show More
@@ -683,6 +683,12 b' def debugancestor(ui, repo, *args):' | |||||
683 | a = r.ancestor(lookup(rev1), lookup(rev2)) |
|
683 | a = r.ancestor(lookup(rev1), lookup(rev2)) | |
684 | ui.write("%d:%s\n" % (r.rev(a), hex(a))) |
|
684 | ui.write("%d:%s\n" % (r.rev(a), hex(a))) | |
685 |
|
685 | |||
|
686 | def debugcommands(ui, cmd='', *args): | |||
|
687 | for cmd, vals in util.sort(table.iteritems()): | |||
|
688 | cmd = cmd.split('|')[0].strip('^') | |||
|
689 | opts = ', '.join([i[1] for i in vals[1]]) | |||
|
690 | ui.write('%s: %s\n' % (cmd, opts)) | |||
|
691 | ||||
686 | def debugcomplete(ui, cmd='', **opts): |
|
692 | def debugcomplete(ui, cmd='', **opts): | |
687 | """returns the completion list associated with the given command""" |
|
693 | """returns the completion list associated with the given command""" | |
688 |
|
694 | |||
@@ -3134,6 +3140,7 b' table = {' | |||||
3134 | _('[OPTION]... [SOURCE]... DEST')), |
|
3140 | _('[OPTION]... [SOURCE]... DEST')), | |
3135 | "debugancestor": (debugancestor, [], _('[INDEX] REV1 REV2')), |
|
3141 | "debugancestor": (debugancestor, [], _('[INDEX] REV1 REV2')), | |
3136 | "debugcheckstate": (debugcheckstate, []), |
|
3142 | "debugcheckstate": (debugcheckstate, []), | |
|
3143 | "debugcommands": (debugcommands, [], _('[COMMAND]')), | |||
3137 | "debugcomplete": |
|
3144 | "debugcomplete": | |
3138 | (debugcomplete, |
|
3145 | (debugcomplete, | |
3139 | [('o', 'options', None, _('show the command options'))], |
|
3146 | [('o', 'options', None, _('show the command options'))], | |
@@ -3416,6 +3423,6 b' table = {' | |||||
3416 | "version": (version_, []), |
|
3423 | "version": (version_, []), | |
3417 | } |
|
3424 | } | |
3418 |
|
3425 | |||
3419 | norepo = ("clone init version help debugcomplete debugdata" |
|
3426 | norepo = ("clone init version help debugcommands debugcomplete debugdata" | |
3420 | " debugindex debugindexdot debugdate debuginstall debugfsinfo") |
|
3427 | " debugindex debugindexdot debugdate debuginstall debugfsinfo") | |
3421 | optionalrepo = ("identify paths serve showconfig debugancestor") |
|
3428 | optionalrepo = ("identify paths serve showconfig debugancestor") |
@@ -36,4 +36,8 b' echo' | |||||
36 | echo '% Show an error if we use --options with an ambiguous abbreviation' |
|
36 | echo '% Show an error if we use --options with an ambiguous abbreviation' | |
37 | hg debugcomplete --options s |
|
37 | hg debugcomplete --options s | |
38 |
|
38 | |||
|
39 | echo | |||
|
40 | echo '% Show all commands + options' | |||
|
41 | hg debugcommands | |||
|
42 | ||||
39 | exit 0 |
|
43 | exit 0 |
@@ -60,6 +60,7 b' diff' | |||||
60 | % Show debug commands if there are no other candidates |
|
60 | % Show debug commands if there are no other candidates | |
61 | debugancestor |
|
61 | debugancestor | |
62 | debugcheckstate |
|
62 | debugcheckstate | |
|
63 | debugcommands | |||
63 | debugcomplete |
|
64 | debugcomplete | |
64 | debugconfig |
|
65 | debugconfig | |
65 | debugdata |
|
66 | debugdata | |
@@ -160,3 +161,69 b' rawcommit' | |||||
160 | % Show an error if we use --options with an ambiguous abbreviation |
|
161 | % Show an error if we use --options with an ambiguous abbreviation | |
161 | hg: command 's' is ambiguous: |
|
162 | hg: command 's' is ambiguous: | |
162 | serve showconfig status |
|
163 | serve showconfig status | |
|
164 | ||||
|
165 | % Show all commands + options | |||
|
166 | add: include, exclude, dry-run | |||
|
167 | annotate: rev, follow, text, user, date, number, changeset, line-number, include, exclude | |||
|
168 | clone: noupdate, rev, pull, uncompressed, ssh, remotecmd | |||
|
169 | commit: addremove, close-branch, include, exclude, message, logfile, date, user | |||
|
170 | diff: rev, change, text, git, nodates, show-function, ignore-all-space, ignore-space-change, ignore-blank-lines, unified, include, exclude | |||
|
171 | export: output, switch-parent, text, git, nodates | |||
|
172 | init: ssh, remotecmd | |||
|
173 | log: follow, follow-first, date, copies, keyword, rev, removed, only-merges, user, only-branch, prune, patch, git, limit, no-merges, style, template, include, exclude | |||
|
174 | merge: force, rev | |||
|
175 | parents: rev, style, template | |||
|
176 | pull: update, force, rev, ssh, remotecmd | |||
|
177 | push: force, rev, ssh, remotecmd | |||
|
178 | remove: after, force, include, exclude | |||
|
179 | serve: accesslog, daemon, daemon-pipefds, errorlog, port, address, prefix, name, webdir-conf, pid-file, stdio, templates, style, ipv6, certificate | |||
|
180 | status: all, modified, added, removed, deleted, clean, unknown, ignored, no-status, copies, print0, rev, include, exclude | |||
|
181 | update: clean, date, rev | |||
|
182 | addremove: similarity, include, exclude, dry-run | |||
|
183 | archive: no-decode, prefix, rev, type, include, exclude | |||
|
184 | backout: merge, parent, rev, include, exclude, message, logfile, date, user | |||
|
185 | bisect: reset, good, bad, skip, command, noupdate | |||
|
186 | branch: force, clean | |||
|
187 | branches: active | |||
|
188 | bundle: force, rev, base, all, type, ssh, remotecmd | |||
|
189 | cat: output, rev, decode, include, exclude | |||
|
190 | copy: after, force, include, exclude, dry-run | |||
|
191 | debugancestor: | |||
|
192 | debugcheckstate: | |||
|
193 | debugcommands: | |||
|
194 | debugcomplete: options | |||
|
195 | debugdata: | |||
|
196 | debugdate: extended | |||
|
197 | debugfsinfo: | |||
|
198 | debugindex: | |||
|
199 | debugindexdot: | |||
|
200 | debuginstall: | |||
|
201 | debugrawcommit: parent, files, message, logfile, date, user | |||
|
202 | debugrebuildstate: rev | |||
|
203 | debugrename: rev | |||
|
204 | debugsetparents: | |||
|
205 | debugstate: nodates | |||
|
206 | debugwalk: include, exclude | |||
|
207 | grep: print0, all, follow, ignore-case, files-with-matches, line-number, rev, user, date, include, exclude | |||
|
208 | heads: rev, active, style, template | |||
|
209 | help: | |||
|
210 | identify: rev, num, id, branch, tags | |||
|
211 | import: strip, base, force, no-commit, exact, import-branch, message, logfile, date, user, similarity | |||
|
212 | incoming: force, newest-first, bundle, rev, patch, git, limit, no-merges, style, template, ssh, remotecmd | |||
|
213 | locate: rev, print0, fullpath, include, exclude | |||
|
214 | manifest: rev | |||
|
215 | outgoing: force, rev, newest-first, patch, git, limit, no-merges, style, template, ssh, remotecmd | |||
|
216 | paths: | |||
|
217 | recover: | |||
|
218 | rename: after, force, include, exclude, dry-run | |||
|
219 | resolve: all, list, mark, unmark, include, exclude | |||
|
220 | revert: all, date, rev, no-backup, include, exclude, dry-run | |||
|
221 | rollback: | |||
|
222 | root: | |||
|
223 | showconfig: untrusted | |||
|
224 | tag: force, local, rev, remove, message, date, user | |||
|
225 | tags: | |||
|
226 | tip: patch, git, style, template | |||
|
227 | unbundle: update | |||
|
228 | verify: | |||
|
229 | version: |
General Comments 0
You need to be logged in to leave comments.
Login now