infinitepush: delete infinitepush.fillmetadatabranchpattern config option
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.
Differential Revision: https://phab.mercurial-scm.org/D2952
--- a/hgext/infinitepush/__init__.py Fri Feb 09 15:49:46 2018 +0530
+++ b/hgext/infinitepush/__init__.py Tue Mar 27 18:04:05 2018 +0530
@@ -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,
--- a/tests/test-infinitepush.t Fri Feb 09 15:49:46 2018 +0530
+++ b/tests/test-infinitepush.t Tue Mar 27 18:04:05 2018 +0530
@@ -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)