From 9f9616a2b8afeee1cb833fa83caa0e64b70e8b53 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 19 May 2026 17:22:02 +0200 Subject: [PATCH] pick-complete-translations.py: only pick files from current locale Sometimes a translator will work on more than one language, and both will end up in the same commit. If one of those languages is not a supported locale, then it can cause the cherry-pick to fail. In that case, then reset all the other files that don't belong to the current locale --- locale/pick-complete-translations.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/locale/pick-complete-translations.py b/locale/pick-complete-translations.py index be11426c..6e102478 100755 --- a/locale/pick-complete-translations.py +++ b/locale/pick-complete-translations.py @@ -74,7 +74,16 @@ for locale in active: reverse=True, ): print(f'{locale}: git cherry-pick', commit) - repo.git.cherry_pick(commit) + try: + repo.git.cherry_pick(commit) + except git.exc.GitCommandError as e: + for line in repo.git.status(porcelain=True).splitlines(): + status, path = line.split() + if status == 'UU': + print('Resetting conflict:', path) + repo.git.reset('--', path) + repo.git.checkout('--', path) + repo.git.cherry_pick('--continue') with open(manifest_file, 'a') as fp: for line in manifest_lines: