changeset 1100:91cf81a36236

svnexternals: import pathutil.canonpath if available hgsubversion broke with upstream Mercurial due to f962870712da. This fixes that.
author Siddharth Agarwal <sid0@fb.com>
date Fri, 22 Nov 2013 11:09:59 -0800
parents c6f7a8cfeca9
children 4a92eb1484ba
files hgsubversion/svnexternals.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnexternals.py
+++ b/hgsubversion/svnexternals.py
@@ -16,9 +16,13 @@ passpegrev = True # see svnsubrepo below
 try:
     canonpath = hgutil.canonpath
 except (ImportError, AttributeError):
-    from mercurial import scmutil
-    canonpath = scmutil.canonpath
     passpegrev = False
+    try:
+        from mercurial import scmutil
+        canonpath = scmutil.canonpath
+    except (ImportError, AttributeError):
+        from mercurial import pathutil
+        canonpath = pathutil.canonpath
 
 import util