summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2015-07-14 15:31:32 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2015-07-14 17:41:35 +0100
commit11ec0d4026cbbaa3850fc88e2a8d46ef5248cf7a (patch)
tree243c389b9d42a62d2c9a8d5977bb8ce57281cd5c
parent357996b08a106f41b4cc0bb82e2c5681f7bbb72c (diff)
downloadlorry-11ec0d4026cbbaa3850fc88e2a8d46ef5248cf7a.tar.gz
Tweaks to Lorry Zip importer
Include only the basename of the file, to make the commit message (and thus commit SHA1s) deterministic. Mention Lorry in the committer name and email address. Change-Id: Id9d29bbe9f12514213b4b4eafd35b08b017e4246
-rwxr-xr-xlorry.zip-importer7
1 files changed, 4 insertions, 3 deletions
diff --git a/lorry.zip-importer b/lorry.zip-importer
index c177d43..d2d5493 100755
--- a/lorry.zip-importer
+++ b/lorry.zip-importer
@@ -26,8 +26,8 @@ if len(argv) < 2:
branch_name = 'master'
branch_ref = 'refs/heads/%s' % branch_name
-committer_name = 'Z Ip Creator'
-committer_email = 'zip@example.com'
+committer_name = 'Lorry Zip Importer'
+committer_email = 'lorry-zip-importer@lorry'
fast_import = popen('git fast-import --quiet', 'w')
def printlines(list):
@@ -65,8 +65,9 @@ for zipfile in argv[1:]:
committer = committer_name + ' <' + committer_email + '> %d +0000' % \
mktime(commit_time + (0, 0, 0))
+ zipfile_basename = path.basename(zipfile)
printlines(('commit ' + branch_ref, 'committer ' + committer, \
- 'data <<EOM', 'Imported from ' + zipfile + '.', 'EOM', \
+ 'data <<EOM', 'Imported from ' + zipfile_basename + '.', 'EOM', \
'', 'deleteall'))
for name in mark.keys():