# HG changeset patch # User Augie Fackler # Date 1260804904 21600 # Node ID 4ce09bf4d382284c08a374a954d304a01eaf129c # Parent b5f24dd948aff87223bbc1fd4501a2b2017d94e5 wrappers: wrap version with a --svn flag diff --git a/hgsubversion/__init__.py b/hgsubversion/__init__.py --- a/hgsubversion/__init__.py +++ b/hgsubversion/__init__.py @@ -62,6 +62,8 @@ wrapcmds = { # cmd: generic, target, fix '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'), diff --git a/hgsubversion/wrappers.py b/hgsubversion/wrappers.py --- a/hgsubversion/wrappers.py +++ b/hgsubversion/wrappers.py @@ -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 """