aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2022-07-20 15:49:29 +0200
committerMatěj Cepl <mcepl@cepl.eu>2022-07-26 09:19:23 +0200
commit650a225d66fba659164e6dcac3677caf1274f8b3 (patch)
tree04b3d451516e14b04ccea092fca8b1db1bb5bca0
parente19073995f0073e5b05250e88399e5b20a60f4dc (diff)
downloadosc-fast-export-650a225d66fba659164e6dcac3677caf1274f8b3.tar.gz
Add also original-oid to each commit.
-rwxr-xr-xosc_fast_export.py5
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