diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2011-10-28 15:38:53 +0100 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2011-10-28 15:38:53 +0100 |
commit | be989e4496606bf6709fda60f83bfebb61416784 (patch) | |
tree | 1e67bf6adee72679493cf1a76a2780991b84468e /lorry | |
parent | 1f123d8b44cd54d90d1e72294ebd99aa9b419e96 (diff) | |
download | lorry-be989e4496606bf6709fda60f83bfebb61416784.tar.gz |
Do not read in the whole bzr fast export
That's a good way to DoS yourself.
Diffstat (limited to 'lorry')
-rwxr-xr-x | lorry | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -88,10 +88,9 @@ class Lorry(cliapp.Application): os.mkdir(gitdir) self.run_program(['git', 'init', '.'], cwd=gitdir) self.progress('.. reading fast-export data') - with open(export) as f: - data = f.read() self.progress('.. fast-importing into git') - self.run_program(['git', 'fast-import'], stdin=data, cwd=gitdir) + self.run_program(['sh', '-c', 'git fast-import < ../fast-import'], + cwd=gitdir) def gitify_svn(self, dirname, gitdir, spec): if not os.path.exists(gitdir): |