Commit d80b1adc authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Git.getRemoteUrl() returns pushurl if exists, else url.

parent ce81d96a
......@@ -172,7 +172,8 @@ class Git(WorkingCopy):
def getRemoteUrl(self):
remote = self._getBranch()[1]
if remote:
url, = self['remote.%s.url' % remote.split('/', 1)[0]]
remote_name = remote.split('/', 1)[0]
url, = self['remote.%s.pushurl' % remote_name] or self['remote.%s.url' % remote_name]
return url
def getRemoteComment(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment