Closed by commit rHG612b4b63fb22: remotefilelog: remove the `ensurestart` usage 
(authored by marmoute).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs 
Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7590?vs=18557&id=18615

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

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

AFFECTED FILES
  hgext/remotefilelog/__init__.py
  hgext/remotefilelog/repack.py
  hgext/remotefilelog/shallowrepo.py
  tests/test-remotefilelog-bgprefetch.t
  tests/test-remotefilelog-repack-fast.t
  tests/test-remotefilelog-repack.t

CHANGE DETAILS

diff --git a/tests/test-remotefilelog-repack.t 
b/tests/test-remotefilelog-repack.t
--- a/tests/test-remotefilelog-repack.t
+++ b/tests/test-remotefilelog-repack.t
@@ -1,11 +1,8 @@
 #require no-windows
 
   $ . "$TESTDIR/remotefilelog-library.sh"
-# devel.remotefilelog.ensurestart: reduce race condition with
-# waiton{repack/prefetch}
   $ cat >> $HGRCPATH <<EOF
   > [devel]
-  > remotefilelog.ensurestart=True
   > remotefilelog.bg-wait=True
   > EOF
 
diff --git a/tests/test-remotefilelog-repack-fast.t 
b/tests/test-remotefilelog-repack-fast.t
--- a/tests/test-remotefilelog-repack-fast.t
+++ b/tests/test-remotefilelog-repack-fast.t
@@ -1,13 +1,11 @@
 #require no-windows
 
   $ . "$TESTDIR/remotefilelog-library.sh"
-# devel.remotefilelog.ensurestart: reduce race condition with
-# waiton{repack/prefetch}
+
   $ cat >> $HGRCPATH <<EOF
   > [remotefilelog]
   > fastdatapack=True
   > [devel]
-  > remotefilelog.ensurestart=True
   > remotefilelog.bg-wait=True
   > EOF
 
diff --git a/tests/test-remotefilelog-bgprefetch.t 
b/tests/test-remotefilelog-bgprefetch.t
--- a/tests/test-remotefilelog-bgprefetch.t
+++ b/tests/test-remotefilelog-bgprefetch.t
@@ -1,11 +1,8 @@
 #require no-windows
 
   $ . "$TESTDIR/remotefilelog-library.sh"
-# devel.remotefilelog.ensurestart: reduce race condition with
-# waiton{repack/prefetch}
   $ cat >> $HGRCPATH <<EOF
   > [devel]
-  > remotefilelog.ensurestart=True
   > remotefilelog.bg-wait=True
   > EOF
 
diff --git a/hgext/remotefilelog/shallowrepo.py 
b/hgext/remotefilelog/shallowrepo.py
--- a/hgext/remotefilelog/shallowrepo.py
+++ b/hgext/remotefilelog/shallowrepo.py
@@ -215,13 +215,7 @@
             )
 
         def backgroundprefetch(
-            self,
-            revs,
-            base=None,
-            repack=False,
-            pats=None,
-            opts=None,
-            ensurestart=False,
+            self, revs, base=None, repack=False, pats=None, opts=None
         ):
             """Runs prefetch in background with optional repack
             """
@@ -237,7 +231,7 @@
                 kwargs['record_wait'] = repo.ui.atexit
 
             procutil.runbgcommand(
-                cmd, encoding.environ, ensurestart=ensurestart, **kwargs
+                cmd, encoding.environ, ensurestart=False, **kwargs
             )
 
         def prefetch(self, revs, base=None, pats=None, opts=None):
diff --git a/hgext/remotefilelog/repack.py b/hgext/remotefilelog/repack.py
--- a/hgext/remotefilelog/repack.py
+++ b/hgext/remotefilelog/repack.py
@@ -36,9 +36,7 @@
     pass
 
 
-def backgroundrepack(
-    repo, incremental=True, packsonly=False, ensurestart=False
-):
+def backgroundrepack(repo, incremental=True, packsonly=False):
     cmd = [procutil.hgexecutable(), b'-R', repo.origroot, b'repack']
     msg = _(b"(running background repack)\n")
     if incremental:
@@ -52,9 +50,7 @@
     if repo.ui.configbool(b'devel', b'remotefilelog.bg-wait'):
         kwargs['record_wait'] = repo.ui.atexit
 
-    procutil.runbgcommand(
-        cmd, encoding.environ, ensurestart=ensurestart, **kwargs
-    )
+    procutil.runbgcommand(cmd, encoding.environ, ensurestart=False, **kwargs)
 
 
 def fullrepack(repo, options=None):
diff --git a/hgext/remotefilelog/__init__.py b/hgext/remotefilelog/__init__.py
--- a/hgext/remotefilelog/__init__.py
+++ b/hgext/remotefilelog/__init__.py
@@ -229,7 +229,6 @@
 configitem(b'packs', b'maxpacksize', default=0)
 configitem(b'packs', b'maxchainlen', default=1000)
 
-configitem(b'devel', b'remotefilelog.ensurestart', default=False)
 configitem(b'devel', b'remotefilelog.bg-wait', default=False)
 
 #  default TTL limit is 30 days
@@ -1085,26 +1084,19 @@
         prefetchrevset = ui.config(b'remotefilelog', b'pullprefetch')
         bgrepack = repo.ui.configbool(b'remotefilelog', b'backgroundrepack')
         bgprefetch = repo.ui.configbool(b'remotefilelog', 
b'backgroundprefetch')
-        ensurestart = repo.ui.configbool(b'devel', 
b'remotefilelog.ensurestart')
 
         if prefetchrevset:
             ui.status(_(b"prefetching file contents\n"))
             revs = scmutil.revrange(repo, [prefetchrevset])
             base = repo[b'.'].rev()
             if bgprefetch:
-                repo.backgroundprefetch(
-                    prefetchrevset, repack=bgrepack, ensurestart=ensurestart
-                )
+                repo.backgroundprefetch(prefetchrevset, repack=bgrepack)
             else:
                 repo.prefetch(revs, base=base)
                 if bgrepack:
-                    repackmod.backgroundrepack(
-                        repo, incremental=True, ensurestart=ensurestart
-                    )
+                    repackmod.backgroundrepack(repo, incremental=True)
         elif bgrepack:
-            repackmod.backgroundrepack(
-                repo, incremental=True, ensurestart=ensurestart
-            )
+            repackmod.backgroundrepack(repo, incremental=True)
 
     return result
 
@@ -1255,13 +1247,9 @@
     revs = scmutil.revrange(repo, opts.get(b'rev'))
     repo.prefetch(revs, opts.get(b'base'), pats, opts)
 
-    ensurestart = repo.ui.configbool(b'devel', b'remotefilelog.ensurestart')
-
     # Run repack in background
     if opts.get(b'repack'):
-        repackmod.backgroundrepack(
-            repo, incremental=True, ensurestart=ensurestart
-        )
+        repackmod.backgroundrepack(repo, incremental=True)
 
 
 @command(
@@ -1281,12 +1269,10 @@
 )
 def repack_(ui, repo, *pats, **opts):
     if opts.get(r'background'):
-        ensurestart = repo.ui.configbool(b'devel', 
b'remotefilelog.ensurestart')
         repackmod.backgroundrepack(
             repo,
             incremental=opts.get(r'incremental'),
             packsonly=opts.get(r'packsonly', False),
-            ensurestart=ensurestart,
         )
         return
 



To: marmoute, #hg-reviewers, durin42
Cc: durin42, mjpieters, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to