Mercurial > public > mercurial-scm > hg-stable
comparison contrib/automation/hgautomation/linux.py @ 42651:24cd5b0ba5b3 stable
automation: allow exit code of 1 for `hg push`
`hg push` exits 1 for no-ops. No-op pushes should be fine in the
context of automation.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 28 Jul 2019 18:16:08 -0700 |
parents | 65b3ef162b39 |
children | 9e0f1c80cddb |
comparison
equal
deleted
inserted
replaced
42650:701341f57ceb | 42651:24cd5b0ba5b3 |
---|---|
487 '--config', 'ui.remotecmd=/hgdev/venv-bootstrap/bin/hg', | 487 '--config', 'ui.remotecmd=/hgdev/venv-bootstrap/bin/hg', |
488 'push', '-f', '-r', full_revision, | 488 'push', '-f', '-r', full_revision, |
489 'ssh://%s//hgwork/src' % public_ip, | 489 'ssh://%s//hgwork/src' % public_ip, |
490 ] | 490 ] |
491 | 491 |
492 subprocess.run(args, cwd=str(source_path), env=env, check=True) | 492 res = subprocess.run(args, cwd=str(source_path), env=env) |
493 | |
494 # Allow 1 (no-op) to not trigger error. | |
495 if res.returncode not in (0, 1): | |
496 res.check_returncode() | |
493 | 497 |
494 # TODO support synchronizing dirty working directory. | 498 # TODO support synchronizing dirty working directory. |
495 | 499 |
496 sftp = ec2_instance.ssh_client.open_sftp() | 500 sftp = ec2_instance.ssh_client.open_sftp() |
497 | 501 |