diff options
-rwxr-xr-x | lorry | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -803,6 +803,7 @@ class Lorry(cliapp.Application): def gitify_raw_file(self, project_name, dirname, gitdir, spec): raw_file_branch = 'master' raw_file_refspecs = 'refs/heads/{branch}:refs/heads/{branch}'.format(branch=raw_file_branch) + self.ensure_gitdir(gitdir) # Fetch the files new_files = {} for src in spec['urls']: @@ -838,7 +839,6 @@ class Lorry(cliapp.Application): self.progress('.. no need to run, nothing to do') return - self.ensure_gitdir(gitdir) # Ensure the repo is up-to-date pullurl = "%s/%s.git" % (self.settings['mirror-base-url-push'], project_name) try: @@ -860,6 +860,7 @@ class Lorry(cliapp.Application): url_path = urllib.parse.urlparse(url)[2] basename = os.path.basename(url_path) archive_dest = os.path.join(dirname, basename) + self.ensure_gitdir(gitdir) self.progress('.. checking if we need to fetch %s' % basename) if file_missing_or_empty(archive_dest): self.progress('.. attempting to fetch.') @@ -883,7 +884,6 @@ class Lorry(cliapp.Application): else: self.progress('.. no need to run, nothing to do') return - self.ensure_gitdir(gitdir) cmdline = ["%s.%s-importer" % (lorry_path, archive_type), archive_dest] self.run_program(cmdline, cwd=gitdir) |