Mercurial > public > mercurial-scm > hg
comparison mercurial/subrepo.py @ 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 | 42a34c0aeddc |
children | 4f5ed2bd1724 71ea5b2b9517 |
comparison
equal
deleted
inserted
replaced
13686:c97ad3bd0b8d | 13692:a7c9735307bd |
---|---|
755 tracking['refs/remotes/%s/%s' % | 755 tracking['refs/remotes/%s/%s' % |
756 (remote, ref.split('/', 2)[2])] = b | 756 (remote, ref.split('/', 2)[2])] = b |
757 return tracking | 757 return tracking |
758 | 758 |
759 def _abssource(self, source): | 759 def _abssource(self, source): |
760 if '://' not in source: | |
761 # recognize the scp syntax as an absolute source | |
762 colon = source.find(':') | |
763 if colon != -1 and '/' not in source[:colon]: | |
764 return source | |
760 self._subsource = source | 765 self._subsource = source |
761 return _abssource(self) | 766 return _abssource(self) |
762 | 767 |
763 def _fetch(self, source, revision): | 768 def _fetch(self, source, revision): |
764 if self._gitmissing(): | 769 if self._gitmissing(): |