Show More
@@ -134,7 +134,7 b' def show_changeset(ui, repo, rev=0, chan' | |||||
134 | ui.status("summary: %s\n" % description.splitlines()[0]) |
|
134 | ui.status("summary: %s\n" % description.splitlines()[0]) | |
135 | ui.status("\n") |
|
135 | ui.status("\n") | |
136 |
|
136 | |||
137 | def version(ui): |
|
137 | def show_version(ui): | |
138 | """output version and copyright information""" |
|
138 | """output version and copyright information""" | |
139 | ui.write("Mercurial version %s\n" % version.get_version()) |
|
139 | ui.write("Mercurial version %s\n" % version.get_version()) | |
140 | ui.status( |
|
140 | ui.status( | |
@@ -167,18 +167,22 b' def help(ui, cmd=None):' | |||||
167 | sys.exit(0) |
|
167 | sys.exit(0) | |
168 | else: |
|
168 | else: | |
169 | if not ui.quiet: |
|
169 | if not ui.quiet: | |
170 | version(ui) |
|
170 | show_version(ui) | |
171 | ui.write('\n') |
|
171 | ui.write('\n') | |
172 | ui.write('hg commands:\n\n') |
|
172 | ui.write('hg commands:\n\n') | |
173 |
|
173 | |||
174 | h = {} |
|
174 | h = {} | |
175 |
for e in table. |
|
175 | for c,e in table.items(): | |
176 |
f = |
|
176 | f = c | |
177 | if f.__name__.startswith("debug"): continue |
|
177 | aliases = None | |
|
178 | if "|" in f: | |||
|
179 | l = f.split("|") | |||
|
180 | f, aliases = l[0], l[1:] | |||
|
181 | if f.startswith("debug"): continue | |||
178 | d = "" |
|
182 | d = "" | |
179 |
if |
|
183 | if e[0].__doc__: | |
180 |
d = |
|
184 | d = e[0].__doc__.splitlines(0)[0].rstrip() | |
181 |
h[f |
|
185 | h[f] = d | |
182 |
|
186 | |||
183 | fns = h.keys() |
|
187 | fns = h.keys() | |
184 | fns.sort() |
|
188 | fns.sort() | |
@@ -772,7 +776,7 b' table = {' | |||||
772 | ('C', 'clean', None, 'overwrite locally modified files')], |
|
776 | ('C', 'clean', None, 'overwrite locally modified files')], | |
773 | 'hg update [options] [node]'), |
|
777 | 'hg update [options] [node]'), | |
774 | "verify": (verify, [], 'hg verify'), |
|
778 | "verify": (verify, [], 'hg verify'), | |
775 | "version": (version, [], 'hg version'), |
|
779 | "version": (show_version, [], 'hg version'), | |
776 | } |
|
780 | } | |
777 |
|
781 | |||
778 | norepo = "init version help debugindex debugindexdot" |
|
782 | norepo = "init version help debugindex debugindexdot" | |
@@ -815,7 +819,7 b' def dispatch(args):' | |||||
815 | not options["noninteractive"]) |
|
819 | not options["noninteractive"]) | |
816 |
|
820 | |||
817 | if options["version"]: |
|
821 | if options["version"]: | |
818 | version(u) |
|
822 | show_version(u) | |
819 | sys.exit(0) |
|
823 | sys.exit(0) | |
820 |
|
824 | |||
821 | try: |
|
825 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now