Mercurial > hg
comparison hgext/remotefilelog/shallowrepo.py @ 43854:612b4b63fb22 stable
remotefilelog: remove the `ensurestart` usage
The option does not seems to do what we want since it does not wait on the background
process actually starting (eg: taking the lock). And the race have been dealt
with another way anyway.
This effectively back out changeset 2c74337e6483.
Differential Revision: https://phab.mercurial-scm.org/D7590
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 09 Dec 2019 12:29:46 +0100 |
parents | 63bb6dc62f24 |
children | 89a2afe31e82 |
comparison
equal
deleted
inserted
replaced
43853:4f40dc190f63 | 43854:612b4b63fb22 |
---|---|
213 return super(shallowrepository, self).commitctx( | 213 return super(shallowrepository, self).commitctx( |
214 ctx, error=error, origctx=origctx | 214 ctx, error=error, origctx=origctx |
215 ) | 215 ) |
216 | 216 |
217 def backgroundprefetch( | 217 def backgroundprefetch( |
218 self, | 218 self, revs, base=None, repack=False, pats=None, opts=None |
219 revs, | |
220 base=None, | |
221 repack=False, | |
222 pats=None, | |
223 opts=None, | |
224 ensurestart=False, | |
225 ): | 219 ): |
226 """Runs prefetch in background with optional repack | 220 """Runs prefetch in background with optional repack |
227 """ | 221 """ |
228 cmd = [procutil.hgexecutable(), b'-R', repo.origroot, b'prefetch'] | 222 cmd = [procutil.hgexecutable(), b'-R', repo.origroot, b'prefetch'] |
229 if repack: | 223 if repack: |
235 kwargs = {} | 229 kwargs = {} |
236 if repo.ui.configbool(b'devel', b'remotefilelog.bg-wait'): | 230 if repo.ui.configbool(b'devel', b'remotefilelog.bg-wait'): |
237 kwargs['record_wait'] = repo.ui.atexit | 231 kwargs['record_wait'] = repo.ui.atexit |
238 | 232 |
239 procutil.runbgcommand( | 233 procutil.runbgcommand( |
240 cmd, encoding.environ, ensurestart=ensurestart, **kwargs | 234 cmd, encoding.environ, ensurestart=False, **kwargs |
241 ) | 235 ) |
242 | 236 |
243 def prefetch(self, revs, base=None, pats=None, opts=None): | 237 def prefetch(self, revs, base=None, pats=None, opts=None): |
244 """Prefetches all the necessary file revisions for the given revs | 238 """Prefetches all the necessary file revisions for the given revs |
245 Optionally runs repack in background | 239 Optionally runs repack in background |