diff --git a/gertty/config.py b/gertty/config.py index a657105..7d20d70 100644 --- a/gertty/config.py +++ b/gertty/config.py @@ -184,7 +184,7 @@ class Config(object): # And this is to allow Git callouts os.environ['GIT_SSL_CAINFO'] = self.ssl_ca_path self.git_root = os.path.expanduser(server['git-root']) - git_url = server.get('git-url', self.url + 'p/') + git_url = server.get('git-url', self.url) if not git_url.endswith('/'): git_url += '/' self.git_url = git_url diff --git a/gertty/sync.py b/gertty/sync.py index 386aca1..0811024 100644 --- a/gertty/sync.py +++ b/gertty/sync.py @@ -1673,6 +1673,9 @@ class Sync(object): if len(parts) > 2: micro = int(parts[2]) self.version = (major, minor, micro) + if self.version < (3,0,0): + # version 3 doesn't use a /p/ prefix. + self.app.config.git_url = self.app.config.git_url + 'p/' self.log.info("Remote version is: %s (parsed as %s)" % (version, self.version)) def query(self, queries):