Mercurial > hg
comparison hgext/remotefilelog/repack.py @ 42497:df1419c5756a
remotefilelog: tell runbgcommand to not block on child process startup
These two invocations will always find a binary because they're
re-running hg. As a result, we can skip waiting for the subprocess to
start running and save a little bit of wall-time.
Differential Revision: https://phab.mercurial-scm.org/D6539
author | Augie Fackler <augie@google.com> |
---|---|
date | Tue, 18 Jun 2019 09:57:06 -0400 |
parents | 566daffc607d |
children | 2c74337e6483 |
comparison
equal
deleted
inserted
replaced
42496:ca1014ad3de4 | 42497:df1419c5756a |
---|---|
41 cmd.append('--incremental') | 41 cmd.append('--incremental') |
42 msg = _("(running background incremental repack)\n") | 42 msg = _("(running background incremental repack)\n") |
43 if packsonly: | 43 if packsonly: |
44 cmd.append('--packsonly') | 44 cmd.append('--packsonly') |
45 repo.ui.warn(msg) | 45 repo.ui.warn(msg) |
46 procutil.runbgcommand(cmd, encoding.environ) | 46 # We know this command will find a binary, so don't block on it starting. |
47 procutil.runbgcommand(cmd, encoding.environ, ensurestart=False) | |
47 | 48 |
48 def fullrepack(repo, options=None): | 49 def fullrepack(repo, options=None): |
49 """If ``packsonly`` is True, stores creating only loose objects are skipped. | 50 """If ``packsonly`` is True, stores creating only loose objects are skipped. |
50 """ | 51 """ |
51 if util.safehasattr(repo, 'shareddatastores'): | 52 if util.safehasattr(repo, 'shareddatastores'): |