From a35e300298ead171062412f767536f69241bedd3 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Sat, 15 Jan 2022 12:42:36 +0000 Subject: Create the gitdir regardless of no new archive/lfs content --- lorry | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lorry') diff --git a/lorry b/lorry index 3e7135e..bc97350 100755 --- a/lorry +++ b/lorry @@ -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) -- cgit v1.2.1