Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/filelog.py @ 46727:f63299ee7e4d
revlog: add attribute on revlogs that specifies its kind
The sidedata logic needs to check whether the revlog it's working on is a
changelog, a manifest or a filelog.
Furthermore, future versions of the revlog format will most likely see a split
between the three types (i.e. they will store different information), so having
this will be useful for other future endeavors as well.
Differential Revision: https://phab.mercurial-scm.org/D10151
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Wed, 10 Mar 2021 19:33:18 +0100 |
parents | 6f4a481f182a |
children | 45f0d5297698 |
comparison
equal
deleted
inserted
replaced
46726:bc2519513ae0 | 46727:f63299ee7e4d |
---|---|
30 opener, b'/'.join((b'data', path + b'.i')), censorable=True | 30 opener, b'/'.join((b'data', path + b'.i')), censorable=True |
31 ) | 31 ) |
32 # Full name of the user visible file, relative to the repository root. | 32 # Full name of the user visible file, relative to the repository root. |
33 # Used by LFS. | 33 # Used by LFS. |
34 self._revlog.filename = path | 34 self._revlog.filename = path |
35 self._revlog.revlog_kind = b'filelog' | |
35 | 36 |
36 def __len__(self): | 37 def __len__(self): |
37 return len(self._revlog) | 38 return len(self._revlog) |
38 | 39 |
39 def __iter__(self): | 40 def __iter__(self): |