marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches.
REVISION SUMMARY This is mostly to demonstrate we can do this before we start adding more specialized set. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12115 AFFECTED FILES mercurial/mergestate.py CHANGE DETAILS diff --git a/mercurial/mergestate.py b/mercurial/mergestate.py --- a/mercurial/mergestate.py +++ b/mercurial/mergestate.py @@ -4,6 +4,7 @@ import errno import shutil import struct +import weakref from .i18n import _ from .node import ( @@ -106,8 +107,11 @@ _short: internal representation used to identify each action """ + ALL_ACTIONS = weakref.WeakSet() + def __init__(self, short): self._short = short + self.ALL_ACTIONS.add(self) def __hash__(self): return hash(self._short) To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel