equal
deleted
inserted
replaced
60 calcsize = struct.calcsize |
60 calcsize = struct.calcsize |
61 pack_into = struct.pack_into |
61 pack_into = struct.pack_into |
62 unpack_from = struct.unpack_from |
62 unpack_from = struct.unpack_from |
63 |
63 |
64 |
64 |
65 class BranchMapCache(object): |
65 class BranchMapCache: |
66 """mapping of filtered views of repo with their branchcache""" |
66 """mapping of filtered views of repo with their branchcache""" |
67 |
67 |
68 def __init__(self): |
68 def __init__(self): |
69 self._per_filter = {} |
69 self._per_filter = {} |
70 |
70 |
167 return b'branch cache (%s)' % repo.filtername |
167 return b'branch cache (%s)' % repo.filtername |
168 else: |
168 else: |
169 return b'branch cache' |
169 return b'branch cache' |
170 |
170 |
171 |
171 |
172 class branchcache(object): |
172 class branchcache: |
173 """A dict like object that hold branches heads cache. |
173 """A dict like object that hold branches heads cache. |
174 |
174 |
175 This cache is used to avoid costly computations to determine all the |
175 This cache is used to avoid costly computations to determine all the |
176 branch heads of a repo. |
176 branch heads of a repo. |
177 |
177 |
629 _rbcnodelen = 4 |
629 _rbcnodelen = 4 |
630 _rbcbranchidxmask = 0x7FFFFFFF |
630 _rbcbranchidxmask = 0x7FFFFFFF |
631 _rbccloseflag = 0x80000000 |
631 _rbccloseflag = 0x80000000 |
632 |
632 |
633 |
633 |
634 class revbranchcache(object): |
634 class revbranchcache: |
635 """Persistent cache, mapping from revision number to branch name and close. |
635 """Persistent cache, mapping from revision number to branch name and close. |
636 This is a low level cache, independent of filtering. |
636 This is a low level cache, independent of filtering. |
637 |
637 |
638 Branch names are stored in rbc-names in internal encoding separated by 0. |
638 Branch names are stored in rbc-names in internal encoding separated by 0. |
639 rbc-names is append-only, and each branch name is only stored once and will |
639 rbc-names is append-only, and each branch name is only stored once and will |