From patchwork Sat Apr 16 08:22:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: subrepo: correct find fetch URL git repository in multilanguage system (issue5176) From: Aidar Sayfullin X-Patchwork-Id: 14681 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Sat, 16 Apr 2016 11:22:43 +0300 # HG changeset patch # User Aidar Sayfullin # Date 1460794612 -10800 # Sat Apr 16 11:16:52 2016 +0300 # Node ID e272b83b632f0cc444fd9b520d40c8744e13d076 # Parent d9539959167df7cb3acd08c4ab53d8e8a7f027cb subrepo: correct find fetch URL git repository in multilanguage system (issue5176) diff -r d9539959167d -r e272b83b632f mercurial/subrepo.py --- a/mercurial/subrepo.py Fri Apr 15 20:37:11 2016 +0900 +++ b/mercurial/subrepo.py Sat Apr 16 11:16:52 2016 +0300 @@ -1431,8 +1431,8 @@ def _gitremote(self, remote): out = self._gitcommand(['remote', 'show', '-n', remote]) line = out.split('\n')[1] - i = line.index('URL: ') + len('URL: ') - return line[i:] + i = line.index(':') + len(':') + return line[i:].strip() def _githavelocally(self, revision): out, code = self._gitdir(['cat-file', '-e', revision])