Skip to content
  • Pierre-Yves David's avatar
    branchcache: explicitly track inheritence "state" · 82c1a388e86a
    Pierre-Yves David authored
    We move from a binary "dirty" flag to a three value "state": "clean", "inherited", "dirty".
    
    The "inherited" means that the branch cache is not only "clean", but it is a
    duplicate of its parent filter.
    
    If a branch cache is "inherited", we can non only skip writing its value on
    disk, but it is a good idea to delete any stale value on disk, as those will
    just waste time (and possibly induce bug) in the future.
    
    We only do this in the update related to transaction or explicit cache update
    (e.g `hg debugupdatecache`). Deleting the file when we simply detected a stall
    cache during a read only operation seems more dangerous.
    
    We rename `copy` to `inherit_for` to clarify we associate a stronger semantic
    to the operation.
    82c1a388e86a