robustcheckout: ensure progress bars are printed (
bug 1305903); r?dustin
Some machines in automation don't have progress bars enabled. This was
causing job no activity timeouts on some really slow machines. Also,
not having progress bars makes it difficult to understand how certain
operations progressed (from the "shape" of the progress bars you can
see things like if operations started slow, finished slow, etc).
Let's force enable them during `hg robustcheckout`.
MozReview-Commit-ID: 99FBIflB1H
--- a/hgext/robustcheckout/__init__.py
+++ b/hgext/robustcheckout/__init__.py
@@ -138,16 +138,26 @@ def robustcheckout(ui, url, dest, upstre
if not sharebase:
raise error.Abort('share base directory not defined; refusing to operate',
hint='define share.pool config option or pass --sharebase')
# worker.backgroundclose only makes things faster if running anti-virus,
# which our automation doesn't. Disable it.
ui.setconfig('worker', 'backgroundclose', False)
+ # By default the progress bar starts after 3s and updates every 0.1s. We
+ # change this so it shows and updates every 1.0s.
+ # We also tell progress to assume a TTY is present so updates are printed
+ # even if there is no known TTY.
+ # We make the config change here instead of in a config file because
+ # otherwise we're at the whim of whatever configs are used in automation.
+ ui.setconfig('progress', 'delay', 1.0)
+ ui.setconfig('progress', 'refresh', 1.0)
+ ui.setconfig('progress', 'assume-tty', True)
+
sharebase = os.path.realpath(sharebase)
return _docheckout(ui, url, dest, upstream, revision, branch, purge,
sharebase)
def _docheckout(ui, url, dest, upstream, revision, branch, purge, sharebase):
def callself():
return _docheckout(ui, url, dest, upstream, revision, branch, purge,