contrib/automation/hgautomation/windows.py
branchstable
changeset 42660 24cd5b0ba5b3
parent 42601 862f6bddacce
child 42684 9e0f1c80cddb
equal deleted inserted replaced
42659:701341f57ceb 42660:24cd5b0ba5b3
   178             '--config', 'ui.remotecmd=c:/hgdev/venv-bootstrap/Scripts/hg.exe',
   178             '--config', 'ui.remotecmd=c:/hgdev/venv-bootstrap/Scripts/hg.exe',
   179             'push', '-f', '-r', full_revision,
   179             'push', '-f', '-r', full_revision,
   180             'ssh://%s/c:/hgdev/src' % public_ip,
   180             'ssh://%s/c:/hgdev/src' % public_ip,
   181         ]
   181         ]
   182 
   182 
   183         subprocess.run(args, cwd=str(hg_repo), env=env, check=True)
   183         res = subprocess.run(args, cwd=str(hg_repo), env=env)
       
   184 
       
   185         # Allow 1 (no-op) to not trigger error.
       
   186         if res.returncode not in (0, 1):
       
   187             res.check_returncode()
   184 
   188 
   185         run_powershell(winrm_client,
   189         run_powershell(winrm_client,
   186                        HG_UPDATE_CLEAN.format(revision=full_revision))
   190                        HG_UPDATE_CLEAN.format(revision=full_revision))
   187 
   191 
   188         # TODO detect dirty local working directory and synchronize accordingly.
   192         # TODO detect dirty local working directory and synchronize accordingly.