Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treescript: include all l10n changes in l10n_bump.diff (bug 1938581) #1110

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions treescript/src/treescript/gecko/merges.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,16 +277,19 @@ async def do_merge(config, task, repo_path, l10n_bump_action):

async def _bump_l10n(config, task, repo_path, l10n_bump_action):
if l10n_bump_action == "l10n_bump":
await l10n_bump(config, task, repo_path)
commits = await l10n_bump(config, task, repo_path)
elif l10n_bump_action == "l10n_bump_github":
await l10n_bump_github(config, task, repo_path)
commits = await l10n_bump_github(config, task, repo_path)
else:
# This should be unreachable as we validate this before we get here,
# but that may change in the future...
raise TreeScriptError(f"Unknown l10n_bump_action: '{l10n_bump_action}'")

output = await run_hg_command(config, "log", "--patch", "--verbose", "-r", ".", repo_path=repo_path, return_output=True, expected_exit_codes=(0, 1))
path = os.path.join(config["artifact_dir"], "public", "logs", "l10n_bump.diff")
makedirs(os.path.dirname(path))
with open(path, "w") as fh:
fh.write(output)
if commits:
output = await run_hg_command(
config, "log", "--patch", "--verbose", "--follow", "--limit", f"{commits}", repo_path=repo_path, return_output=True, expected_exit_codes=(0, 1)
)
path = os.path.join(config["artifact_dir"], "public", "logs", "l10n_bump.diff")
makedirs(os.path.dirname(path))
with open(path, "w") as fh:
fh.write(output)
1 change: 1 addition & 0 deletions treescript/tests/test_gecko_merges.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ async def mocked_run_hg_command(config, *arguments, repo_path=None, **kwargs):

async def noop_l10n_bump(*arguments, **kwargs):
called_args.append("l10n_bump")
return 1

orig_commit = merges.commit

Expand Down