diff mercurial/subrepo.py @ 9219:3f650f6aa130

merge with crew-stable
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Thu, 23 Jul 2009 20:44:26 +0200
parents 9aebeea7ac00 f783bb979fb3
children e2fd9b62349b
line wrap: on
line diff
--- a/mercurial/subrepo.py	Thu Jul 23 00:26:42 2009 +0200
+++ b/mercurial/subrepo.py	Thu Jul 23 20:44:26 2009 +0200
@@ -107,7 +107,12 @@
         source = repo._subsource
         if source.startswith('/') or '://' in source:
             return source
-        return os.path.join(_abssource(repo._subparent), repo._subsource)
+        parent = _abssource(repo._subparent)
+        if '://' in parent:
+            if parent[-1] == '/':
+                parent = parent[:-1]
+            return parent + '/' + source
+        return os.path.join(parent, repo._subsource)
     if push and repo.ui.config('paths', 'default-push'):
         return repo.ui.config('paths', 'default-push', repo.root)
     return repo.ui.config('paths', 'default', repo.root)