[Updated] D12115: merge-actions: gather all created action into a set

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Fri Feb 4 10:30:38 UTC 2022


Closed by commit rHG773ad0f5152d: merge-actions: gather all created action into a set (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D12115?vs=32011&id=32073

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D12115/new/

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, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220204/202e00e3/attachment-0002.html>


More information about the Mercurial-patches mailing list