branchmap: update cache of 'unserved' filter on new changesets stable
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Wed, 16 Jan 2013 00:08:08 +0100
branchstable
changeset 1197 10e27c438792
parent 1196 c0daf79e5680
child 1198 ed05e4372751
branchmap: update cache of 'unserved' filter on new changesets The `commitctx` and `addchangegroup` methods of repo upgrade branchcache after completion. This behavior aims to keep the branchcache in sync for read only process as hgweb. See ee317dbfb9d0 for details. Since changelog filtering is used, those calls only update the cache for unfiltered repo. One of no interest for typical read only process like hgweb. Note: By chance in basic case, `repo.unfiltered() == repo.filtered('unserved')` This changesets have the "unserved" cache updated instead. I think this is the only cache that matter for hgweb. We could imagine updating all possible branchcaches instead but: - I'm not sure it would have any benefit impact. It may even increase the odd of all cache being invalidated. - This is more complicated change. So I'm going for updating a single cache only which is already better that updating a cache nobody cares about. This changeset have a few expected impact on the testsuite are different cache are updated. [ original upstream message ]
tests/test-keyword.t
--- a/tests/test-keyword.t	Tue Jan 15 23:30:10 2013 +0100
+++ b/tests/test-keyword.t	Wed Jan 16 00:08:08 2013 +0100
@@ -579,6 +579,7 @@
   invalid branchheads cache (served): tip differs
   c
    c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
+  invalid branchheads cache (served): tip differs
   overwriting c expanding keywords
   committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d
   $ cat a c
@@ -762,7 +763,6 @@
   $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
   invalid branchheads cache (served): tip differs
   a
-  invalid branchheads cache: tip differs
   invalid branchheads cache (served): tip differs
   overwriting a expanding keywords
   committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
@@ -805,7 +805,6 @@
   $ hg debugrebuildstate
   $ hg remove a
   $ hg --debug commit -m rma
-  invalid branchheads cache: tip differs
   committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
   $ hg status
   ? c
@@ -918,7 +917,6 @@
   $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>'
   x/a
    x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
-  invalid branchheads cache: tip differs
   overwriting x/a expanding keywords
   committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4
   $ cat a