Patchwork D6539: remotefilelog: tell runbgcommand to not block on child process startup

login
register
mail settings
Submitter phabricator
Date June 18, 2019, 3:40 p.m.
Message ID <c7984418f6dacb5858718090452d9036@localhost.localdomain>
Download mbox | patch
Permalink /patch/40585/
State Not Applicable
Headers show

Comments

phabricator - June 18, 2019, 3:40 p.m.
Closed by commit rHGdf1419c5756a: remotefilelog: tell runbgcommand to not block on child process startup (authored by durin42).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6539?vs=15574&id=15578

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6539/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6539

AFFECTED FILES
  hgext/remotefilelog/repack.py
  hgext/remotefilelog/shallowrepo.py

CHANGE DETAILS




To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/hgext/remotefilelog/shallowrepo.py b/hgext/remotefilelog/shallowrepo.py
--- a/hgext/remotefilelog/shallowrepo.py
+++ b/hgext/remotefilelog/shallowrepo.py
@@ -190,7 +190,9 @@ 
                 cmd.append('--repack')
             if revs:
                 cmd += ['-r', revs]
-            procutil.runbgcommand(cmd, encoding.environ)
+            # We know this command will find a binary, so don't block
+            # on it starting.
+            procutil.runbgcommand(cmd, encoding.environ, ensurestart=False)
 
         def prefetch(self, revs, base=None, pats=None, opts=None):
             """Prefetches all the necessary file revisions for the given revs
diff --git a/hgext/remotefilelog/repack.py b/hgext/remotefilelog/repack.py
--- a/hgext/remotefilelog/repack.py
+++ b/hgext/remotefilelog/repack.py
@@ -43,7 +43,8 @@ 
     if packsonly:
         cmd.append('--packsonly')
     repo.ui.warn(msg)
-    procutil.runbgcommand(cmd, encoding.environ)
+    # We know this command will find a binary, so don't block on it starting.
+    procutil.runbgcommand(cmd, encoding.environ, ensurestart=False)
 
 def fullrepack(repo, options=None):
     """If ``packsonly`` is True, stores creating only loose objects are skipped.