localrepo: remove a XXX comment about metalog

Summary:
It's no longer true - we're doing metalog commit in transaction.py, not lock
release. Also rename the function to clarify.

Reviewed By: DurhamG

Differential Revision: D25984806

fbshipit-source-id: b17a3f635210be7855341fc8a47fed6411599164
This commit is contained in:
Jun Wu 2021-01-21 17:40:23 -08:00 committed by Facebook GitHub Bot
parent 9ddf80bb86
commit 9166540443

View File

@ -2056,10 +2056,8 @@ class localrepository(object):
)
releasefn = None
if self.ui.configbool("experimental", "metalog"):
# XXX: metalog.commit should ideally be only called by a transaction
# close. However, there are misuses across the code base, so we
# cannot really rely on transaction now.
def metalogcommit():
def metalogdirtycheck():
metalog = svfs.__dict__.pop("metalog", None)
# |<- A ->|<----------- repo lock --------->|
# |<- B ->|<- transaction ->|<- C ->|
@ -2069,7 +2067,7 @@ class localrepository(object):
"metalog change outside a transaction is unsupported"
)
releasefn = metalogcommit
releasefn = metalogdirtycheck
l = self._lock(
self.svfs,