##// END OF EJS Templates
remotefilelog: add a developer option to wait for background processes...
marmoute -
r44298:63bb6dc6 stable
parent child Browse files
Show More
@@ -230,6 +230,7 b" configitem(b'packs', b'maxpacksize', def"
230 230 configitem(b'packs', b'maxchainlen', default=1000)
231 231
232 232 configitem(b'devel', b'remotefilelog.ensurestart', default=False)
233 configitem(b'devel', b'remotefilelog.bg-wait', default=False)
233 234
234 235 # default TTL limit is 30 days
235 236 _defaultlimit = 60 * 60 * 24 * 30
@@ -48,7 +48,13 b' def backgroundrepack('
48 48 cmd.append(b'--packsonly')
49 49 repo.ui.warn(msg)
50 50 # We know this command will find a binary, so don't block on it starting.
51 procutil.runbgcommand(cmd, encoding.environ, ensurestart=ensurestart)
51 kwargs = {}
52 if repo.ui.configbool(b'devel', b'remotefilelog.bg-wait'):
53 kwargs['record_wait'] = repo.ui.atexit
54
55 procutil.runbgcommand(
56 cmd, encoding.environ, ensurestart=ensurestart, **kwargs
57 )
52 58
53 59
54 60 def fullrepack(repo, options=None):
@@ -232,8 +232,12 b' def wraprepo(repo):'
232 232 cmd += [b'-r', revs]
233 233 # We know this command will find a binary, so don't block
234 234 # on it starting.
235 kwargs = {}
236 if repo.ui.configbool(b'devel', b'remotefilelog.bg-wait'):
237 kwargs['record_wait'] = repo.ui.atexit
238
235 239 procutil.runbgcommand(
236 cmd, encoding.environ, ensurestart=ensurestart
240 cmd, encoding.environ, ensurestart=ensurestart, **kwargs
237 241 )
238 242
239 243 def prefetch(self, revs, base=None, pats=None, opts=None):
General Comments 0
You need to be logged in to leave comments. Login now