diff mercurial/subrepo.py @ 14766:4f56b7530eab stable

subrepos: be smarter about what's an absolute path (issue2808)
author Matt Mackall <mpm@selenic.com>
date Wed, 29 Jun 2011 16:01:06 -0500
parents 0ae98cd2a83f
children 7ef125fa9b35
line wrap: on
line diff
--- a/mercurial/subrepo.py	Wed Jun 29 13:04:00 2011 +0200
+++ b/mercurial/subrepo.py	Wed Jun 29 16:01:06 2011 -0500
@@ -198,9 +198,9 @@
     or on the top repo config. Abort or return None if no source found."""
     if hasattr(repo, '_subparent'):
         source = util.url(repo._subsource)
+        if source.isabs():
+            return str(source)
         source.path = posixpath.normpath(source.path)
-        if posixpath.isabs(source.path) or source.scheme:
-            return str(source)
         parent = _abssource(repo._subparent, push, abort=False)
         if parent:
             parent = util.url(parent)