diff --git a/contrib/automation/hgautomation/linux.py b/contrib/automation/hgautomation/linux.py --- a/contrib/automation/hgautomation/linux.py +++ b/contrib/automation/hgautomation/linux.py @@ -489,7 +489,11 @@ def synchronize_hg(source_path: pathlib. 'ssh://%s//hgwork/src' % public_ip, ] - subprocess.run(args, cwd=str(source_path), env=env, check=True) + res = subprocess.run(args, cwd=str(source_path), env=env) + + # Allow 1 (no-op) to not trigger error. + if res.returncode not in (0, 1): + res.check_returncode() # TODO support synchronizing dirty working directory. diff --git a/contrib/automation/hgautomation/windows.py b/contrib/automation/hgautomation/windows.py --- a/contrib/automation/hgautomation/windows.py +++ b/contrib/automation/hgautomation/windows.py @@ -180,7 +180,11 @@ def synchronize_hg(hg_repo: pathlib.Path 'ssh://%s/c:/hgdev/src' % public_ip, ] - subprocess.run(args, cwd=str(hg_repo), env=env, check=True) + res = subprocess.run(args, cwd=str(hg_repo), env=env) + + # Allow 1 (no-op) to not trigger error. + if res.returncode not in (0, 1): + res.check_returncode() run_powershell(winrm_client, HG_UPDATE_CLEAN.format(revision=full_revision))