Show More
@@ -108,17 +108,6 b' def setremoteconfig(ui, opts):' | |||
|
108 | 108 | if opts.get('remotecmd'): |
|
109 | 109 | ui.setconfig("ui", "remotecmd", opts['remotecmd']) |
|
110 | 110 | |
|
111 | def show_version(ui): | |
|
112 | """output version and copyright information""" | |
|
113 | ui.write(_("Mercurial Distributed SCM (version %s)\n") | |
|
114 | % version.get_version()) | |
|
115 | ui.status(_( | |
|
116 | "\nCopyright (C) 2005, 2006 Matt Mackall <mpm@selenic.com>\n" | |
|
117 | "This is free software; see the source for copying conditions. " | |
|
118 | "There is NO\nwarranty; " | |
|
119 | "not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" | |
|
120 | )) | |
|
121 | ||
|
122 | 111 | def help_(ui, name=None, with_version=False): |
|
123 | 112 | """show help for a command, extension, or list of commands |
|
124 | 113 | |
@@ -132,7 +121,7 b' def help_(ui, name=None, with_version=Fa' | |||
|
132 | 121 | |
|
133 | 122 | def helpcmd(name): |
|
134 | 123 | if with_version: |
|
135 |
|
|
|
124 | version_(ui) | |
|
136 | 125 | ui.write('\n') |
|
137 | 126 | aliases, i = findcmd(ui, name) |
|
138 | 127 | # synopsis |
@@ -213,7 +202,7 b' def help_(ui, name=None, with_version=Fa' | |||
|
213 | 202 | else: |
|
214 | 203 | # program name |
|
215 | 204 | if ui.verbose or with_version: |
|
216 |
|
|
|
205 | version_(ui) | |
|
217 | 206 | else: |
|
218 | 207 | ui.status(_("Mercurial Distributed SCM\n")) |
|
219 | 208 | ui.status('\n') |
@@ -2380,6 +2369,17 b' def verify(ui, repo):' | |||
|
2380 | 2369 | """ |
|
2381 | 2370 | return hg.verify(repo) |
|
2382 | 2371 | |
|
2372 | def version_(ui): | |
|
2373 | """output version and copyright information""" | |
|
2374 | ui.write(_("Mercurial Distributed SCM (version %s)\n") | |
|
2375 | % version.get_version()) | |
|
2376 | ui.status(_( | |
|
2377 | "\nCopyright (C) 2005, 2006 Matt Mackall <mpm@selenic.com>\n" | |
|
2378 | "This is free software; see the source for copying conditions. " | |
|
2379 | "There is NO\nwarranty; " | |
|
2380 | "not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" | |
|
2381 | )) | |
|
2382 | ||
|
2383 | 2383 | # Command options and aliases are listed here, alphabetically |
|
2384 | 2384 | |
|
2385 | 2385 | globalopts = [ |
@@ -2759,7 +2759,7 b' table = {' | |||
|
2759 | 2759 | ('f', 'force', None, _('force a merge with outstanding changes'))], |
|
2760 | 2760 | _('hg update [-C] [-f] [REV]')), |
|
2761 | 2761 | "verify": (verify, [], _('hg verify')), |
|
2762 |
"version": ( |
|
|
2762 | "version": (version_, [], _('hg version')), | |
|
2763 | 2763 | } |
|
2764 | 2764 | |
|
2765 | 2765 | norepo = ("clone init version help debugancestor debugcomplete debugdata" |
@@ -2981,7 +2981,7 b' def dispatch(args):' | |||
|
2981 | 2981 | if options['help']: |
|
2982 | 2982 | return help_(u, cmd, options['version']) |
|
2983 | 2983 | elif options['version']: |
|
2984 |
return |
|
|
2984 | return version_(u) | |
|
2985 | 2985 | elif not cmd: |
|
2986 | 2986 | return help_(u, 'shortlist') |
|
2987 | 2987 |
General Comments 0
You need to be logged in to leave comments.
Login now