diff options
author | Brian Harring <ferringb@google.com> | 2012-10-23 15:40:37 -0700 |
---|---|---|
committer | Brian Harring <ferringb@google.com> | 2012-10-23 15:40:37 -0700 |
commit | 1a4b332f01d2c924b0457b94919a83f2b66effdb (patch) | |
tree | 8395fea07834ad94924c92a0ef7a0c683985be68 | |
parent | Rework the blob rewriting of $Header. (diff) | |
download | git-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-x | rewrite-commit-dump.py | 2 |
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)) |