changeset 804:6beca5b97dc7

wrappers: fix revpair after hg.b33f3e35efb0
author Patrick Mezard <pmezard@gmail.com>
date Sat, 14 May 2011 21:44:07 +0200
parents 6b1ad75f8cda
children a3f727c41c1d
files hgsubversion/wrappers.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
@@ -15,6 +15,11 @@ import svnwrap
 import svnrepo
 import util
 
+try:
+    from mercurial.scmutil import revpair
+except ImportError:
+    from cmdutil import revpair
+
 pullfuns = {
     True: replay.convert_rev,
     False: stupidmod.convert_rev,
@@ -104,7 +109,7 @@ def diff(orig, ui, repo, *args, **opts):
         if o_r:
             parent = repo[o_r[-1]].parents()[0]
         opts['rev'] = ['%s:.' % node.hex(parent.node()), ]
-    node1, node2 = cmdutil.revpair(repo, opts['rev'])
+    node1, node2 = revpair(repo, opts['rev'])
     baserev, _junk = hashes.get(node1, (-1, 'junk'))
     newrev, _junk = hashes.get(node2, (-1, 'junk'))
     it = patch.diff(repo, node1, node2,