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

Eric Eisner ede at MIT.EDU
Thu Mar 17 12:40:36 CDT 2011


# HG changeset patch
# User Eric Eisner <ede at mit.edu>
# Date 1300383507 14400
# Branch stable
# Node ID 6ecd20483e25f0cdf36709dc44fec14ec7028b42
# 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,9 @@ class gitsubrepo(abstractsubrepo):
         return tracking
 
     def _abssource(self, source):
+        # recognize the scp syntax as an absolute source
+        if '://' not in source and ':' in source:
+            return source
         self._subsource = source
         return _abssource(self)
 


More information about the Mercurial-devel mailing list