subrepo: recognize scp-style paths as git URLs stable
authorEric Eisner <ede@mit.edu>
Thu, 17 Mar 2011 16:29:09 -0400
branchstable
changeset 13692 a7c9735307bd
parent 13686 c97ad3bd0b8d
child 13693 adf3c4401c5d
subrepo: recognize scp-style paths as git URLs
mercurial/subrepo.py
--- 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)