mercurial/bundlerepo.py
changeset 13826 e574207e3bcd
parent 13742 7abab875e647
child 14004 97ed99d1f419
--- a/mercurial/bundlerepo.py	Wed Mar 30 20:02:17 2011 -0700
+++ b/mercurial/bundlerepo.py	Wed Mar 30 20:03:05 2011 -0700
@@ -15,7 +15,7 @@
 from i18n import _
 import os, struct, tempfile, shutil
 import changegroup, util, mdiff, discovery
-import localrepo, changelog, manifest, filelog, revlog, error
+import localrepo, changelog, manifest, filelog, revlog, error, url
 
 class bundlerevlog(revlog.revlog):
     def __init__(self, opener, indexfile, bundle,
@@ -274,9 +274,9 @@
             cwd = os.path.join(cwd,'')
             if parentpath.startswith(cwd):
                 parentpath = parentpath[len(cwd):]
-    path = util.drop_scheme('file', path)
-    if path.startswith('bundle:'):
-        path = util.drop_scheme('bundle', path)
+    u = url.url(path)
+    path = u.localpath()
+    if u.scheme == 'bundle':
         s = path.split("+", 1)
         if len(s) == 1:
             repopath, bundlename = parentpath, s[0]