branchmap: move validity logic in the object itself stable
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Mon, 24 Dec 2012 02:49:59 +0100
branchstable
changeset 1177 8870dc73f441
parent 1175 62cc0851c70f
child 1178 bcbe606f2bc6
branchmap: move validity logic in the object itself In several place, We check if a branchcache is still valid regarding the current state of the repository. This changeset puts this logic in a method of the object that can be reused when necessary. A branch map is considered valid whenever it is up to date or a strict subset of the repository state. The change will help making branchcache aware of filtered revision. The change in keyword is expected. the branch cache is actually invalid after the amend. The previous check did not detected it. [ original upstream message ]
tests/test-keyword.t
--- a/tests/test-keyword.t	Wed Dec 12 15:17:18 2012 -0800
+++ b/tests/test-keyword.t	Mon Dec 24 02:49:59 2012 +0100
@@ -507,6 +507,7 @@
   $ hg -q commit -d '14 1' -m 'prepare amend'
 
   $ hg --debug commit --amend -d '15 1' -m 'amend without changes' | grep keywords
+  invalidating branch cache (tip differs)
   overwriting a expanding keywords
   $ hg -q id
   67d8c481a6be