hgext/remotefilelog/repack.py
branchstable
changeset 43849 63bb6dc62f24
parent 43115 4aa72cdf616f
child 43854 612b4b63fb22
--- a/hgext/remotefilelog/repack.py	Mon Dec 09 09:53:43 2019 +0100
+++ b/hgext/remotefilelog/repack.py	Mon Dec 09 09:54:27 2019 +0100
@@ -48,7 +48,13 @@
         cmd.append(b'--packsonly')
     repo.ui.warn(msg)
     # We know this command will find a binary, so don't block on it starting.
-    procutil.runbgcommand(cmd, encoding.environ, ensurestart=ensurestart)
+    kwargs = {}
+    if repo.ui.configbool(b'devel', b'remotefilelog.bg-wait'):
+        kwargs['record_wait'] = repo.ui.atexit
+
+    procutil.runbgcommand(
+        cmd, encoding.environ, ensurestart=ensurestart, **kwargs
+    )
 
 
 def fullrepack(repo, options=None):