aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Harring <ferringb@google.com>2012-10-23 15:40:37 -0700
committerBrian Harring <ferringb@google.com>2012-10-23 15:40:37 -0700
commit1a4b332f01d2c924b0457b94919a83f2b66effdb (patch)
tree8395fea07834ad94924c92a0ef7a0c683985be68
parentRework the blob rewriting of $Header. (diff)
downloadgit-conversion-tools-1a4b332f01d2c924b0457b94919a83f2b66effdb.tar.gz
git-conversion-tools-1a4b332f01d2c924b0457b94919a83f2b66effdb.tar.bz2
git-conversion-tools-1a4b332f01d2c924b0457b94919a83f2b66effdb.zip
enforce an ordering in commits w/ the same timestamp
-rwxr-xr-xrewrite-commit-dump.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rewrite-commit-dump.py b/rewrite-commit-dump.py
index 148a9a3..ca8a9ae 100755
--- a/rewrite-commit-dump.py
+++ b/rewrite-commit-dump.py
@@ -196,7 +196,7 @@ def serialize_records(records, handle, target='refs/heads/master', progress=100)
total = len(records)
total_len = len(str(total))
progress_interval = max(1, total // progress)
- for idx, record in enumerate(records, 1):
+ for idx, record in enumerate(sorted(records, key=lambda x:(x.timestamp,sorted(x.files),x.author,x.footerless_msg)), 1):
if idx % progress_interval == 0:
write('progress %s%%: %s of %i commits\n'
% (str(int(100 * (float(idx)/total))).rjust(2), str(idx).rjust(total_len), total))