diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2022-07-20 15:49:29 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2022-07-26 09:19:23 +0200 |
commit | 650a225d66fba659164e6dcac3677caf1274f8b3 (patch) | |
tree | 04b3d451516e14b04ccea092fca8b1db1bb5bca0 /osc_fast_export.py | |
parent | e19073995f0073e5b05250e88399e5b20a60f4dc (diff) | |
download | osc-fast-export-650a225d66fba659164e6dcac3677caf1274f8b3.tar.gz |
Add also original-oid to each commit.
Diffstat (limited to 'osc_fast_export.py')
-rwxr-xr-x | osc_fast_export.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/osc_fast_export.py b/osc_fast_export.py index f07775a..2bfa4d6 100755 --- a/osc_fast_export.py +++ b/osc_fast_export.py @@ -10,7 +10,7 @@ from typing import List import xml.etree.ElementTree as ET -authorsfile = pathlib.PurePath(".git", "authorsfile.txt") +authorsfile = pathlib.Path(".git", "authorsfile.txt") # For reading section-less config files # https://stackoverflow.com/a/2819788/164233 @@ -69,6 +69,8 @@ def print_export(entry: LogEntry) -> int: print("commit refs/heads/master") print(f"mark :{mark}") + if entry.md5: + print(f"original-oid {entry.md5}") print(f"committer {author} {date} +0000") print(export_data(entry.msg)) if last_mark: @@ -77,6 +79,7 @@ def print_export(entry: LogEntry) -> int: print("deleteall") print("M 644 inline tralala") print(export_data("tralalala")) + print("") return mark |