caches: move the 'updating the branch cache' message in 'updatecaches'
We are about to remove the branchmap cache update in changegroup application.
There is a debug message alongside this update that we do not want to loose. We
move the message beforehand to simplify the test update in the next changeset.
The message move is quite noisy and isolating that noise is useful.
Most tests update are just line reordering since the message is issued at a
later point during the transaction.
After this changes, the message is displayed in more case since local commit
creation also issue it.
--- a/mercurial/changegroup.py Tue May 02 18:56:07 2017 +0200
+++ b/mercurial/changegroup.py Tue May 02 22:27:44 2017 +0200
@@ -409,7 +409,6 @@
# coming call to `destroyed` will repair it.
# In other case we can safely update cache on
# disk.
- repo.ui.debug('updating the branch cache\n')
branchmap.updatecache(repo.filtered('served'))
def runhooks():
--- a/mercurial/localrepo.py Tue May 02 18:56:07 2017 +0200
+++ b/mercurial/localrepo.py Tue May 02 22:27:44 2017 +0200
@@ -1246,6 +1246,7 @@
if tr is None or tr.changes['revs']:
# updating the unfiltered branchmap should refresh all the others,
+ self.ui.debug('updating the branch cache\n')
branchmap.updatecache(self.filtered('served'))
def invalidatecaches(self):
--- a/tests/test-acl.t Tue May 02 18:56:07 2017 +0200
+++ b/tests/test-acl.t Tue May 02 22:27:44 2017 +0200
@@ -112,11 +112,11 @@
adding foo/file.txt revisions
adding quux/file.py revisions
added 3 changesets with 3 changes to 3 files
- updating the branch cache
bundle2-input-part: total payload size 1553
bundle2-input-part: "pushkey" (params: 4 mandatory) supported
pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955"
bundle2-input-bundle: 3 parts total
+ updating the branch cache
bundle2-output-bundle: "HG20", 2 parts total
bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload
bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload
@@ -177,11 +177,11 @@
added 3 changesets with 3 changes to 3 files
calling hook pretxnchangegroup.acl: hgext.acl.hook
acl: changes have source "push" - skipping
- updating the branch cache
bundle2-input-part: total payload size 1553
bundle2-input-part: "pushkey" (params: 4 mandatory) supported
pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955"
bundle2-input-bundle: 3 parts total
+ updating the branch cache
bundle2-output-bundle: "HG20", 2 parts total
bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload
bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload
@@ -253,11 +253,11 @@
acl: path access granted: "f9cafe1212c8"
acl: branch access granted: "911600dab2ae" on branch "default"
acl: path access granted: "911600dab2ae"
- updating the branch cache
bundle2-input-part: total payload size 1553
bundle2-input-part: "pushkey" (params: 4 mandatory) supported
pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955"
bundle2-input-bundle: 3 parts total
+ updating the branch cache
bundle2-output-bundle: "HG20", 2 parts total
bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload
bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload
@@ -743,11 +743,11 @@
acl: path access granted: "f9cafe1212c8"
acl: branch access granted: "911600dab2ae" on branch "default"
acl: path access granted: "911600dab2ae"
- updating the branch cache
bundle2-input-part: total payload size 1553
bundle2-input-part: "pushkey" (params: 4 mandatory) supported
pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955"
bundle2-input-bundle: 3 parts total
+ updating the branch cache
bundle2-output-bundle: "HG20", 2 parts total
bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload
bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload
@@ -1061,11 +1061,11 @@
acl: path access granted: "f9cafe1212c8"
acl: branch access granted: "911600dab2ae" on branch "default"
acl: path access granted: "911600dab2ae"
- updating the branch cache
bundle2-input-part: total payload size 1553
bundle2-input-part: "pushkey" (params: 4 mandatory) supported
pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955"
bundle2-input-bundle: 3 parts total
+ updating the branch cache
bundle2-output-bundle: "HG20", 2 parts total
bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload
bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload
@@ -1147,11 +1147,11 @@
acl: path access granted: "f9cafe1212c8"
acl: branch access granted: "911600dab2ae" on branch "default"
acl: path access granted: "911600dab2ae"
- updating the branch cache
bundle2-input-part: total payload size 1553
bundle2-input-part: "pushkey" (params: 4 mandatory) supported
pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955"
bundle2-input-bundle: 3 parts total
+ updating the branch cache
bundle2-output-bundle: "HG20", 2 parts total
bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload
bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload
@@ -1306,11 +1306,11 @@
acl: path access granted: "f9cafe1212c8"
acl: branch access granted: "911600dab2ae" on branch "default"
acl: path access granted: "911600dab2ae"
- updating the branch cache
bundle2-input-part: total payload size 1553
bundle2-input-part: "pushkey" (params: 4 mandatory) supported
pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955"
bundle2-input-bundle: 3 parts total
+ updating the branch cache
bundle2-output-bundle: "HG20", 2 parts total
bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload
bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload
@@ -1508,13 +1508,13 @@
acl: path access granted: "911600dab2ae"
acl: branch access granted: "e8fc755d4d82" on branch "foobar"
acl: path access granted: "e8fc755d4d82"
- updating the branch cache
bundle2-input-part: total payload size 2068
bundle2-input-part: "pushkey" (params: 4 mandatory) supported
pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955"
bundle2-input-part: "pushkey" (params: 4 mandatory) supported
pushing key for "phases:e8fc755d4d8217ee5b0c2bb41558c40d43b92c01"
bundle2-input-bundle: 4 parts total
+ updating the branch cache
bundle2-output-bundle: "HG20", 3 parts total
bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload
bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload
@@ -1804,13 +1804,13 @@
acl: path access granted: "911600dab2ae"
acl: branch access granted: "e8fc755d4d82" on branch "foobar"
acl: path access granted: "e8fc755d4d82"
- updating the branch cache
bundle2-input-part: total payload size 2068
bundle2-input-part: "pushkey" (params: 4 mandatory) supported
pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955"
bundle2-input-part: "pushkey" (params: 4 mandatory) supported
pushing key for "phases:e8fc755d4d8217ee5b0c2bb41558c40d43b92c01"
bundle2-input-bundle: 4 parts total
+ updating the branch cache
bundle2-output-bundle: "HG20", 3 parts total
bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload
bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload
@@ -1897,13 +1897,13 @@
acl: path access granted: "911600dab2ae"
acl: branch access granted: "e8fc755d4d82" on branch "foobar"
acl: path access granted: "e8fc755d4d82"
- updating the branch cache
bundle2-input-part: total payload size 2068
bundle2-input-part: "pushkey" (params: 4 mandatory) supported
pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955"
bundle2-input-part: "pushkey" (params: 4 mandatory) supported
pushing key for "phases:e8fc755d4d8217ee5b0c2bb41558c40d43b92c01"
bundle2-input-bundle: 4 parts total
+ updating the branch cache
bundle2-output-bundle: "HG20", 3 parts total
bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload
bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload
@@ -2058,13 +2058,13 @@
acl: path access granted: "911600dab2ae"
acl: branch access granted: "e8fc755d4d82" on branch "foobar"
acl: path access granted: "e8fc755d4d82"
- updating the branch cache
bundle2-input-part: total payload size 2068
bundle2-input-part: "pushkey" (params: 4 mandatory) supported
pushing key for "phases:911600dab2ae7a9baff75958b84fe606851ce955"
bundle2-input-part: "pushkey" (params: 4 mandatory) supported
pushing key for "phases:e8fc755d4d8217ee5b0c2bb41558c40d43b92c01"
bundle2-input-bundle: 4 parts total
+ updating the branch cache
bundle2-output-bundle: "HG20", 3 parts total
bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload
bundle2-output-part: "reply:pushkey" (params: 0 advisory) empty payload
--- a/tests/test-convert-svn-encoding.t Tue May 02 18:56:07 2017 +0200
+++ b/tests/test-convert-svn-encoding.t Tue May 02 22:27:44 2017 +0200
@@ -53,6 +53,7 @@
source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@1
converting: 0/6 revisions (0.00%)
committing changelog
+ updating the branch cache
4 hello
source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@2
converting: 1/6 revisions (16.67%)
@@ -67,6 +68,7 @@
getting files: \xc3\xa9 2/2 files (100.00%) (esc)
committing manifest
committing changelog
+ updating the branch cache
3 copy files
source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@3
converting: 2/6 revisions (33.33%)
@@ -93,6 +95,7 @@
\xc3\xb9/e\xcc\x81: copy \xc3\xa0/e\xcc\x81:a9092a3d84a37b9993b5c73576f6de29b7ea50f6 (esc)
committing manifest
committing changelog
+ updating the branch cache
2 remove files
source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/trunk@4
converting: 3/6 revisions (50.00%)
@@ -109,18 +112,21 @@
committing files:
committing manifest
committing changelog
+ updating the branch cache
1 branch to branch?
source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/branches/branch?@5
converting: 4/6 revisions (66.67%)
reparent to file://*/svn-repo/branches/branch%C3%A9 (glob)
scanning paths: /branches/branch\xc3\xa9 0/1 paths (0.00%) (esc)
committing changelog
+ updating the branch cache
0 branch to branch?e
source: svn:afeb9c47-92ff-4c0c-9f72-e1f6eb8ac9af/branches/branch?e@6
converting: 5/6 revisions (83.33%)
reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
scanning paths: /branches/branch\xc3\xa9e 0/1 paths (0.00%) (esc)
committing changelog
+ updating the branch cache
reparent to file://*/svn-repo (glob)
reparent to file://*/svn-repo/branches/branch%C3%A9e (glob)
reparent to file://*/svn-repo (glob)
@@ -130,6 +136,7 @@
.hgtags
committing manifest
committing changelog
+ updating the branch cache
run hg sink post-conversion action
$ cd A-hg
$ hg up
--- a/tests/test-copy.t Tue May 02 18:56:07 2017 +0200
+++ b/tests/test-copy.t Tue May 02 22:27:44 2017 +0200
@@ -32,6 +32,7 @@
b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
committing manifest
committing changelog
+ updating the branch cache
committed changeset 1:93580a2c28a50a56f63526fb305067e6fbf739c4
we should see two history entries
--- a/tests/test-debugcommands.t Tue May 02 18:56:07 2017 +0200
+++ b/tests/test-debugcommands.t Tue May 02 22:27:44 2017 +0200
@@ -114,6 +114,7 @@
$ rm -rf .hg/cache/
$ hg debugupdatecaches --debug
+ updating the branch cache
$ ls -r .hg/cache/*
.hg/cache/rbc-revs-v1
.hg/cache/rbc-names-v1
--- a/tests/test-graft.t Tue May 02 18:56:07 2017 +0200
+++ b/tests/test-graft.t Tue May 02 22:27:44 2017 +0200
@@ -177,6 +177,7 @@
b
committing manifest
committing changelog
+ updating the branch cache
grafting 5:97f8bfe72746 "5"
searching for copies back to rev 1
unmatched files in other (from topological common ancestor):
@@ -190,6 +191,7 @@
e
committing manifest
committing changelog
+ updating the branch cache
$ HGEDITOR=cat hg graft 4 3 --log --debug
scanning for duplicate grafts
grafting 4:9c233e8e184d "4"
--- a/tests/test-hook.t Tue May 02 18:56:07 2017 +0200
+++ b/tests/test-hook.t Tue May 02 22:27:44 2017 +0200
@@ -648,6 +648,7 @@
foo
committing manifest
committing changelog
+ updating the branch cache
committed changeset 1:52998019f6252a2b893452765fcb0a47351a5708
calling hook commit.auto: hgext_hookext.autohook
Automatically installed hook
--- a/tests/test-issue1175.t Tue May 02 18:56:07 2017 +0200
+++ b/tests/test-issue1175.t Tue May 02 22:27:44 2017 +0200
@@ -33,6 +33,7 @@
warning: can't find ancestor for 'b' copied from 'a'!
committing manifest
committing changelog
+ updating the branch cache
committed changeset 5:83a687e8a97c80992ba385bbfd766be181bfb1d1
$ hg verify
--- a/tests/test-keyword.t Tue May 02 18:56:07 2017 +0200
+++ b/tests/test-keyword.t Tue May 02 22:27:44 2017 +0200
@@ -178,6 +178,7 @@
committing manifest
committing changelog
overwriting a expanding keywords
+ updating the branch cache
committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9
running hook commit.test: cp a hooktest
$ hg status
@@ -650,6 +651,7 @@
committing manifest
committing changelog
overwriting c expanding keywords
+ updating the branch cache
committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d
$ cat a c
expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
@@ -823,6 +825,7 @@
committing manifest
committing changelog
overwriting a expanding keywords
+ updating the branch cache
committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
$ rm log
@@ -866,6 +869,7 @@
committing files:
committing manifest
committing changelog
+ updating the branch cache
committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
$ hg status
? c
@@ -941,6 +945,7 @@
committing manifest
committing changelog
overwriting a expanding keywords
+ updating the branch cache
committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082
$ hg export -o ../rejecttest.diff tip
$ cd ../Test
@@ -985,6 +990,7 @@
committing manifest
committing changelog
overwriting x/a expanding keywords
+ updating the branch cache
committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4
$ cat a
expand $Id: x/a b4560182a3f9 Thu, 01 Jan 1970 00:00:03 +0000 user $
--- a/tests/test-mq-symlinks.t Tue May 02 18:56:07 2017 +0200
+++ b/tests/test-mq-symlinks.t Tue May 02 22:27:44 2017 +0200
@@ -51,6 +51,7 @@
a
committing manifest
committing changelog
+ updating the branch cache
now at: updatelink
$ readlink.py a
a -> c
--- a/tests/test-obsolete-changeset-exchange.t Tue May 02 18:56:07 2017 +0200
+++ b/tests/test-obsolete-changeset-exchange.t Tue May 02 22:27:44 2017 +0200
@@ -144,11 +144,11 @@
adding file changes
adding foo revisions
added 1 changesets with 1 changes to 1 files (+1 heads)
- updating the branch cache
bundle2-input-part: total payload size 476
bundle2-input-part: "listkeys" (params: 1 mandatory) supported
bundle2-input-part: total payload size 58
bundle2-input-part: "listkeys" (params: 1 mandatory) supported
bundle2-input-bundle: 2 parts total
checking for updated bookmarks
+ updating the branch cache
(run 'hg heads' to see heads, 'hg merge' to merge)
--- a/tests/test-rebase-conflicts.t Tue May 02 18:56:07 2017 +0200
+++ b/tests/test-rebase-conflicts.t Tue May 02 22:27:44 2017 +0200
@@ -268,6 +268,7 @@
rebased as 2a7f09cac94c
rebase merging completed
rebase status stored
+ updating the branch cache
update back to initial working directory parent
resolving manifests
branchmerge: False, force: False, partial: False
@@ -303,6 +304,7 @@
added 2 changesets with 2 changes to 1 files
bundle2-input-part: total payload size 1686
bundle2-input-bundle: 0 parts total
+ updating the branch cache
invalid branchheads cache (served): tip differs
history modification detected - truncating revision branch cache to revision 9
rebase completed
--- a/tests/test-strip.t Tue May 02 18:56:07 2017 +0200
+++ b/tests/test-strip.t Tue May 02 22:27:44 2017 +0200
@@ -841,6 +841,7 @@
bundle2-output-bundle: "HG20", (1 params) 1 parts total
bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/6625a5168474-345bb43d-backup.hg (glob)
+ updating the branch cache
invalid branchheads cache (served): tip differs
truncating cache/rbc-revs-v1 to 24
$ hg log -G