summaryrefslogtreecommitdiff
path: root/lorry
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-01-18 15:45:54 +0000
committerLorry <lorry@roadtrain.codethink.co.uk>2012-01-18 15:46:13 +0000
commitc7095904f90242b97f7af0691f141e04e4ec1a77 (patch)
tree51aff2a21570ac5e6a0694fb51fdd1758c1375bc /lorry
parent996edd5fc6a48c2c656fac1e8edbb9d4fad8e1c6 (diff)
downloadlorry-c7095904f90242b97f7af0691f141e04e4ec1a77.tar.gz
lorry: add a repack step
adds a repack setting so if it is too expensive an operation it can be turned off run git-repack after the gitify step, maybe it should check whether it needed updating but that may not be simple
Diffstat (limited to 'lorry')
-rwxr-xr-xlorry6
1 files changed, 6 insertions, 0 deletions
diff --git a/lorry b/lorry
index 3712e98..ba7dae2 100755
--- a/lorry
+++ b/lorry
@@ -42,6 +42,9 @@ class Lorry(cliapp.Application):
'gitorious')
self.settings.boolean(['verbose', 'v'],
'report what is going on to stdout')
+ self.settings.boolean(['repack'],
+ 'repack git repositories when an import has'
+ 'been updated')
def process_args(self, args):
for arg in args:
@@ -70,6 +73,9 @@ class Lorry(cliapp.Application):
os.mkdir(dirname)
gitdir = os.path.join(dirname, 'git')
table[vcstype](dirname, gitdir, spec)
+ if self.settings['repack']:
+ self.run_program(['git', 'repack', '-a', '-d', '--depth=250',
+ '--window=250'], cwd=gitdir)
if not self.settings['pull-only']:
self.push_to_gitorious(name, gitdir)