fix: handle empty svn commit output (no-op) gracefully
This commit is contained in:
@@ -500,7 +500,28 @@ def _sync_git_to_svn_impl(mirror: Mirror) -> int:
|
||||
input=message.encode("utf-8"),
|
||||
wc=wc, timeout=120, auth_args=auth_args,
|
||||
)
|
||||
try:
|
||||
new_rev = _parse_commit_revision(result)
|
||||
except GitToSVNError:
|
||||
logger.warning(
|
||||
"svn commit no-op for %s on %s – recording HEAD",
|
||||
commit_hash[:8], svn_branch,
|
||||
)
|
||||
info = subprocess.run(
|
||||
["svnversion", str(wc)],
|
||||
capture_output=True, text=True, timeout=30,
|
||||
env={**os.environ, "LC_ALL": "C"},
|
||||
)
|
||||
rev_text = (info.stdout or "").strip().split(":")[0]
|
||||
try:
|
||||
new_rev = int(rev_text)
|
||||
except (ValueError, TypeError):
|
||||
logger.warning(
|
||||
"Cannot determine current SVN revision for %s – "
|
||||
"skipping mapping",
|
||||
svn_branch,
|
||||
)
|
||||
continue
|
||||
|
||||
# Restore the real author as svn:author revprop
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user