summaryrefslogtreecommitdiff
path: root/lorry
diff options
context:
space:
mode:
authorBen Brown <ben@demerara.io>2022-01-15 12:42:36 +0000
committerBen Brown <ben@demerara.io>2022-01-15 12:42:43 +0000
commita35e300298ead171062412f767536f69241bedd3 (patch)
tree9384d79444d84d930cc44e4806871b112feef511 /lorry
parent502b8276f95dc3de57f21c44431db8adb3009e79 (diff)
downloadlorry-a35e300298ead171062412f767536f69241bedd3.tar.gz
Create the gitdir regardless of no new archive/lfs content
Diffstat (limited to 'lorry')
-rwxr-xr-xlorry4
1 files changed, 2 insertions, 2 deletions
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)