Patchwork D2952: infinitepush: delete infinitepush.fillmetadatabranchpattern config option

login
register
mail settings
Submitter phabricator
Date March 27, 2018, 12:37 p.m.
Message ID <differential-rev-PHID-DREV-qcrzeuij626zsneqkgjz-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/29901/
State Superseded
Headers show

Comments

phabricator - March 27, 2018, 12:37 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This patch deletes the config option infinitepush.fillmetadatabranchpattern
  which if set to true sets a background process which will save metadata in
  infinitepush index.
  
  This series is meant to have a state where we can use it for CI purposes.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/infinitepush/__init__.py
  tests/test-infinitepush.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-infinitepush.t b/tests/test-infinitepush.t
--- a/tests/test-infinitepush.t
+++ b/tests/test-infinitepush.t
@@ -288,31 +288,3 @@ 
   $ hg debugfillinfinitepushmetadata --node 09904fb20c53ff351bd3b1d47681f569a4dab7e5 --config infinitepush.metadatafilelimit=2
   $ cat .hg/scratchbranches/index/nodemetadatamap/09904fb20c53ff351bd3b1d47681f569a4dab7e5
   {"changed_files": {"file": {"adds": 1, "isbinary": false, "removes": 0, "status": "added"}, "file1": {"adds": 1, "isbinary": false, "removes": 0, "status": "added"}}, "changed_files_truncated": true} (no-eol)
-
-Test infinitepush.fillmetadatabranchpattern
-  $ cd ../repo
-  $ cat >> .hg/hgrc << EOF
-  > [infinitepush]
-  > fillmetadatabranchpattern=re:scratch/fillmetadata/.*
-  > EOF
-  $ cd ../client
-  $ echo tofillmetadata > tofillmetadata
-  $ hg ci -Aqm "tofillmetadata"
-  $ hg log -r . -T '{node}\n'
-  d2b0410d4da084bc534b1d90df0de9eb21583496
-  $ hg push -r . -B scratch/fillmetadata/fill
-  pushing to ssh://user@dummy/repo
-  searching for changes
-  remote: pushing 6 commits:
-  remote:     33910bfe6ffe  testpullbycommithash1
-  remote:     d8fde0ddfc96  testpullbycommithash2
-  remote:     3edfe7e9089a  add and rm files
-  remote:     c7ac39f638c6  cpfile and mvfile
-  remote:     09904fb20c53  add many files
-  remote:     d2b0410d4da0  tofillmetadata
-
-Make sure background process finished
-  $ sleep 3
-  $ cd ../repo
-  $ cat .hg/scratchbranches/index/nodemetadatamap/d2b0410d4da084bc534b1d90df0de9eb21583496
-  {"changed_files": {"tofillmetadata": {"adds": 1, "isbinary": false, "removes": 0, "status": "added"}}} (no-eol)
diff --git a/hgext/infinitepush/__init__.py b/hgext/infinitepush/__init__.py
--- a/hgext/infinitepush/__init__.py
+++ b/hgext/infinitepush/__init__.py
@@ -68,12 +68,6 @@ 
     # patterns to list if no patterns are specified.
     defaultremotepatterns = ['*']
 
-    # Server-side option. If bookmark that was pushed matches
-    # `fillmetadatabranchpattern` then background
-    # `hg debugfillinfinitepushmetadata` process will save metadata
-    # in infinitepush index for nodes that are ancestor of the bookmark.
-    fillmetadatabranchpattern = ''
-
     # Instructs infinitepush to forward all received bundle2 parts to the
     # bundle for storage. Defaults to False.
     storeallparts = True
@@ -154,9 +148,6 @@ 
 configitem('infinitepush', 'indexpath',
     default='',
 )
-configitem('infinitepush', 'fillmetadatabranchpattern',
-    default='',
-)
 configitem('infinitepush', 'storeallparts',
     default=False,
 )
@@ -1082,13 +1073,6 @@ 
         log(scratchbranchparttype, eventtype='success',
             elapsedms=(time.time() - parthandlerstart) * 1000)
 
-        fillmetadatabranchpattern = op.repo.ui.config(
-            'infinitepush', 'fillmetadatabranchpattern', '')
-        if bookmark and fillmetadatabranchpattern:
-            __, __, matcher = util.stringmatcher(fillmetadatabranchpattern)
-            if matcher(bookmark):
-                _asyncsavemetadata(op.repo.root,
-                                   [ctx.hex() for ctx in nodesctx])
     except Exception as e:
         log(scratchbranchparttype, eventtype='failure',
             elapsedms=(time.time() - parthandlerstart) * 1000,