# HG changeset patch # User Brodie Rao # Date 2013-11-16 04:18:08 # Node ID b9515fb9e72a0dcf9342ae4208564acc54b8d10a # Parent 969148b49fc6dcdb1136e21318c263898c7337e4 branchmap: add documentation on the branchcache on-disk format diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py --- a/mercurial/branchmap.py +++ b/mercurial/branchmap.py @@ -94,7 +94,22 @@ def updatecache(repo): repo._branchcaches[repo.filtername] = partial class branchcache(dict): - """A dict like object that hold branches heads cache""" + """A dict like object that hold branches heads cache. + + This cache is used to avoid costly computations to determine all the + branch heads of a repo. + + The cache is serialized on disk in the following format: + + [optional filtered repo hex hash] + + + ... + + The first line is used to check if the cache is still valid. If the + branch cache is for a filtered repo view, an optional third hash is + included that hashes the hashes of all filtered revisions. + """ def __init__(self, entries=(), tipnode=nullid, tiprev=nullrev, filteredhash=None):