wrappers: wrap version with a --svn flag

This commit is contained in:
Augie Fackler 2009-12-14 09:35:04 -06:00
parent b93a29dc3e
commit 6701a5e7ab
2 changed files with 11 additions and 0 deletions

View File

@ -62,6 +62,8 @@ wrapcmds = { # cmd: generic, target, fixdoc, ppopts, opts
'pull': (True, 'sources', True, True, []),
'push': (True, 'destinations', True, True, []),
'incoming': (False, 'sources', True, True, []),
'version': (False, None, False, False, [
('', 'svn', None, 'print hgsubversion information as well')]),
'clone': (False, 'sources', True, True, [
('T', 'tagpaths', '',
'list of paths to search for tags in Subversion repositories'),

View File

@ -29,6 +29,15 @@ revmeta = [
('message', 'message'),
]
def version(orig, ui, *args, **opts):
svn = opts.pop('svn', None)
orig(ui, *args, **opts)
if svn:
ui.status('\nsvn bindings: %s\n' % svnwrap.version())
ui.status('hgsubversion: %s\n' % util.version(ui))
def parents(orig, ui, repo, *args, **opts):
"""show Mercurial & Subversion parents of the working dir or revision
"""