mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
wrappers: wrap version with a --svn flag
This commit is contained in:
parent
b93a29dc3e
commit
6701a5e7ab
@ -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'),
|
||||
|
@ -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
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user