comparison tests/test-phases.t @ 18394:5010448197bc

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.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Wed, 16 Jan 2013 00:08:08 +0100
parents f3b21beb9802
children 593eb3786165
comparison
equal deleted inserted replaced
18393:a38039ef7312 18394:5010448197bc
175 175
176 check that branch cache with "unserved" filter are properly computed and stored 176 check that branch cache with "unserved" filter are properly computed and stored
177 177
178 $ ls ../push-dest/.hg/cache/branchheads* 178 $ ls ../push-dest/.hg/cache/branchheads*
179 ../push-dest/.hg/cache/branchheads-served 179 ../push-dest/.hg/cache/branchheads-served
180 $ cat ../push-dest/.hg/cache/branchheads-served
181 6d6770faffce199f1fddd1cf87f6f026138cf061 6 465891ffab3c47a3c23792f7dc84156e19a90722
182 b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e default
183 6d6770faffce199f1fddd1cf87f6f026138cf061 default
184 $ hg heads -R ../push-dest --template '{rev}:{node} {phase}\n' #update visible cache too
185 6:6d6770faffce199f1fddd1cf87f6f026138cf061 draft
186 5:2713879da13d6eea1ff22b442a5a87cb31a7ce6a secret
187 3:b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e draft
188 $ ls ../push-dest/.hg/cache/branchheads*
189 ../push-dest/.hg/cache/branchheads-served
180 ../push-dest/.hg/cache/branchheads-visible 190 ../push-dest/.hg/cache/branchheads-visible
191 $ cat ../push-dest/.hg/cache/branchheads-served
192 6d6770faffce199f1fddd1cf87f6f026138cf061 6 465891ffab3c47a3c23792f7dc84156e19a90722
193 b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e default
194 6d6770faffce199f1fddd1cf87f6f026138cf061 default
181 $ cat ../push-dest/.hg/cache/branchheads-visible 195 $ cat ../push-dest/.hg/cache/branchheads-visible
182 6d6770faffce199f1fddd1cf87f6f026138cf061 6 196 6d6770faffce199f1fddd1cf87f6f026138cf061 6
183 b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e default 197 b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e default
184 2713879da13d6eea1ff22b442a5a87cb31a7ce6a default 198 2713879da13d6eea1ff22b442a5a87cb31a7ce6a default
185 6d6770faffce199f1fddd1cf87f6f026138cf061 default 199 6d6770faffce199f1fddd1cf87f6f026138cf061 default
186 $ cat ../push-dest/.hg/cache/branchheads-served
187 cf9fe039dfd67e829edf6522a45de057b5c86519 4
188 b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e default
189 cf9fe039dfd67e829edf6522a45de057b5c86519 default
190 200
191 201
192 Restore condition prior extra insertion. 202 Restore condition prior extra insertion.
193 $ hg -q --config extensions.mq= strip . 203 $ hg -q --config extensions.mq= strip .
194 $ hg up -q 7 204 $ hg up -q 7