Correct getGitwebUrl

This had a tail in some places and not others.  Standardize on the
tail version since it's not part of the connection interface, and
instead is a private method shared between the gerrit connection
and source.

Change-Id: I614fd74177bb0f832f02f44c094109faff39373b
This commit is contained in:
James E. Blair 2017-02-14 14:33:56 -08:00
parent fdc212404b
commit c6d76400dc
3 changed files with 2 additions and 5 deletions

View File

@ -474,9 +474,6 @@ class FakeGerritConnection(gerritconnection.GerritConnection):
def getGitUrl(self, project):
return os.path.join(self.upstream_root, project.name)
def _getGitwebUrl(self, project, sha=None):
return self.getGitwebUrl(project, sha)
class BuildHistory(object):
def __init__(self, **kw):

View File

@ -758,7 +758,7 @@ class GerritConnection(BaseConnection):
project.name)
return url
def getGitwebUrl(self, project, sha=None):
def _getGitwebUrl(self, project, sha=None):
url = '%s/gitweb?p=%s.git' % (self.baseurl, project)
if sha:
url += ';a=commitdiff;h=' + sha

View File

@ -48,4 +48,4 @@ class GerritSource(BaseSource):
return self.connection.getGitUrl(project)
def _getGitwebUrl(self, project, sha=None):
return self.connection.getGitwebUrl(project, sha)
return self.connection._getGitwebUrl(project, sha)