[PATCH stable V2] subrepo: recognize scp-style paths as git URLs

Eric Eisner ede at MIT.EDU
Thu Mar 17 15:30:10 CDT 2011


# HG changeset patch
# User Eric Eisner <ede at mit.edu>
# Date 1300393749 14400
# Branch stable
# Node ID a7c9735307bda4f43fd7f5452a3eb71095e01020
# Parent  c97ad3bd0b8df64d6be92e279d7cb6f5bf57b373
subrepo: recognize scp-style paths as git URLs

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -757,6 +757,11 @@ class gitsubrepo(abstractsubrepo):
         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)
 


More information about the Mercurial-devel mailing list