Patchwork subrepo: correct find fetch URL git repository in multilanguage system (issue5176)

login
register
mail settings
Submitter Aidar Sayfullin
Date April 16, 2016, 8:22 a.m.
Message ID <e272b83b632f0cc444fd.1460794963@home>
Download mbox | patch
Permalink /patch/14681/
State Changes Requested
Headers show

Comments

Aidar Sayfullin - April 16, 2016, 8:22 a.m.
# HG changeset patch
# User Aidar Sayfullin <aidar@saifoulline.ru>
# 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)

Patch

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])