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