Changeset View
Changeset View
Standalone View
Standalone View
mercurial/changelog.py
Show First 20 Lines • Show All 390 Lines • ▼ Show 20 Line(s) | def __init__(self, opener, trypending=False, concurrencychecker=None): | ||||
revision) data for a transaction that hasn't been finalized yet. | revision) data for a transaction that hasn't been finalized yet. | ||||
It exists in a separate file to facilitate readers (such as | It exists in a separate file to facilitate readers (such as | ||||
hooks processes) accessing data before a transaction is finalized. | hooks processes) accessing data before a transaction is finalized. | ||||
``concurrencychecker`` will be passed to the revlog init function, see | ``concurrencychecker`` will be passed to the revlog init function, see | ||||
the documentation there. | the documentation there. | ||||
""" | """ | ||||
if trypending and opener.exists(b'00changelog.i.a'): | |||||
postfix = b'a' | |||||
else: | |||||
postfix = None | |||||
revlog.revlog.__init__( | revlog.revlog.__init__( | ||||
self, | self, | ||||
opener, | opener, | ||||
target=(revlog_constants.KIND_CHANGELOG, None), | target=(revlog_constants.KIND_CHANGELOG, None), | ||||
radix=b'00changelog', | radix=b'00changelog', | ||||
postfix=postfix, | |||||
checkambig=True, | checkambig=True, | ||||
mmaplargeindex=True, | mmaplargeindex=True, | ||||
persistentnodemap=opener.options.get(b'persistent-nodemap', False), | persistentnodemap=opener.options.get(b'persistent-nodemap', False), | ||||
concurrencychecker=concurrencychecker, | concurrencychecker=concurrencychecker, | ||||
trypending=trypending, | |||||
) | ) | ||||
if self._initempty and (self._format_version == revlog.REVLOGV1): | if self._initempty and (self._format_version == revlog.REVLOGV1): | ||||
# changelogs don't benefit from generaldelta. | # changelogs don't benefit from generaldelta. | ||||
self._format_flags &= ~revlog.FLAG_GENERALDELTA | self._format_flags &= ~revlog.FLAG_GENERALDELTA | ||||
self._generaldelta = False | self._generaldelta = False | ||||
▲ Show 20 Lines • Show All 209 Lines • Show Last 20 Lines |