changeset 803:6b1ad75f8cda

svnexternals: fix canonpath import after hg.bfeaa88b875d
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
date Sat, 14 May 2011 21:44:07 +0200
parents d50858a8a17b
children 6beca5b97dc7
files hgsubversion/svnexternals.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnexternals.py
+++ b/hgsubversion/svnexternals.py
@@ -12,6 +12,11 @@ try:
 except (ImportError, AttributeError), e:
     subrepo = None
 
+try:
+    from mercurial.scmutil import canonpath
+except (ImportError, AttributeError):
+    from hgutil import canonpath
+
 import util
 
 class externalsfile(dict):
@@ -151,7 +156,7 @@ def parsedefinitions(ui, repo, svnroot, 
             if source is None:
                 continue
             wpath = hgutil.pconvert(os.path.join(base, path))
-            wpath = hgutil.canonpath(repo.root, '', wpath)
+            wpath = canonpath(repo.root, '', wpath)
             defs.append((wpath, rev, source, pegrev, norevline, base))
     # Check target dirs are not nested
     defs.sort()