comparison mercurial/filelog.py @ 52062:2876d077a796

filelog: drop the CamelCase name for `filelog.filelog` See 61557734c0ae for the reasoning.
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 23 Oct 2024 16:24:18 -0400
parents 9e94f9dbbbe8
children 4ef6dbc27a99
comparison
equal deleted inserted replaced
52061:9e94f9dbbbe8 52062:2876d077a796
4 # 4 #
5 # This software may be used and distributed according to the terms of the 5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version. 6 # GNU General Public License version 2 or any later version.
7 7
8 from __future__ import annotations 8 from __future__ import annotations
9
10 import typing
11 9
12 from typing import ( 10 from typing import (
13 Iterable, 11 Iterable,
14 Iterator, 12 Iterator,
15 ) 13 )
20 error, 18 error,
21 revlog, 19 revlog,
22 ) 20 )
23 from .interfaces import ( 21 from .interfaces import (
24 repository, 22 repository,
25 util as interfaceutil,
26 ) 23 )
27 from .utils import storageutil 24 from .utils import storageutil
28 from .revlogutils import ( 25 from .revlogutils import (
29 constants as revlog_constants, 26 constants as revlog_constants,
30 rewrite, 27 rewrite,
31 ) 28 )
32 29
33 30
34 class FileLog: 31 class filelog: # (repository.ifilestorage)
35 _revlog: revlog.revlog 32 _revlog: revlog.revlog
36 nullid: bytes 33 nullid: bytes
37 _fix_issue6528: bool 34 _fix_issue6528: bool
38 35
39 def __init__(self, opener, path, try_split=False): 36 def __init__(self, opener, path, try_split=False):
271 raise error.ProgrammingError(msg) 268 raise error.ProgrammingError(msg)
272 269
273 return self._revlog.clone(tr, destrevlog._revlog, **kwargs) 270 return self._revlog.clone(tr, destrevlog._revlog, **kwargs)
274 271
275 272
276 filelog = interfaceutil.implementer(repository.ifilestorage)(FileLog)
277
278 if typing.TYPE_CHECKING:
279 filelog = FileLog
280
281
282 class narrowfilelog(filelog): 273 class narrowfilelog(filelog):
283 """Filelog variation to be used with narrow stores.""" 274 """Filelog variation to be used with narrow stores."""
284 275
285 def __init__(self, opener, path, narrowmatch, try_split=False): 276 def __init__(self, opener, path, narrowmatch, try_split=False):
286 super(narrowfilelog, self).__init__(opener, path, try_split=try_split) 277 super(narrowfilelog, self).__init__(opener, path, try_split=try_split)