diff options
Diffstat (limited to 'lorry')
-rwxr-xr-x | lorry | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -523,6 +523,13 @@ class Lorry(cliapp.Application): pushrefspecs=['refs/heads/*:refs/heads/*', 'refs/tags/*:refs/tags/*']): pushurl = "%s/%s.git" % (self.settings['mirror-base-url-push'], name) + + # If pushing to local filesystem, check if repo exists + if pushurl.startswith('/'): + if not os.path.isdir(pushurl): + self.progress('.. creating local repo for %s in %s' % (name, pushurl)) + self.run_program(['git', 'init', '--bare', pushurl], cwd=gitdir) + self.progress('.. pushing %s to mirror server %s' % (name, pushurl)) self.run_program(['git', 'push', pushurl]+pushrefspecs, cwd=gitdir) |