comparison hgext/remotefilelog/shallowrepo.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 373aeede7352
children d98ec36be808
comparison
equal deleted inserted replaced
42496:ca1014ad3de4 42497:df1419c5756a
188 cmd = [procutil.hgexecutable(), '-R', repo.origroot, 'prefetch'] 188 cmd = [procutil.hgexecutable(), '-R', repo.origroot, 'prefetch']
189 if repack: 189 if repack:
190 cmd.append('--repack') 190 cmd.append('--repack')
191 if revs: 191 if revs:
192 cmd += ['-r', revs] 192 cmd += ['-r', revs]
193 procutil.runbgcommand(cmd, encoding.environ) 193 # We know this command will find a binary, so don't block
194 # on it starting.
195 procutil.runbgcommand(cmd, encoding.environ, ensurestart=False)
194 196
195 def prefetch(self, revs, base=None, pats=None, opts=None): 197 def prefetch(self, revs, base=None, pats=None, opts=None):
196 """Prefetches all the necessary file revisions for the given revs 198 """Prefetches all the necessary file revisions for the given revs
197 Optionally runs repack in background 199 Optionally runs repack in background
198 """ 200 """