changeset 13692:a7c9735307bd stable

subrepo: recognize scp-style paths as git URLs
author Eric Eisner <ede@mit.edu>
date Thu, 17 Mar 2011 16:29:09 -0400
parents c97ad3bd0b8d
children adf3c4401c5d
files mercurial/subrepo.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/subrepo.py	Wed Mar 16 17:42:42 2011 +0100
+++ b/mercurial/subrepo.py	Thu Mar 17 16:29:09 2011 -0400
@@ -757,6 +757,11 @@
         return tracking
 
     def _abssource(self, source):
+        if '://' not in source:
+            # recognize the scp syntax as an absolute source
+            colon = source.find(':')
+            if colon != -1 and '/' not in source[:colon]:
+                return source
         self._subsource = source
         return _abssource(self)