D1622: transaction: Use intbitset for implementing changes['phase']

joerg.sonnenberger (Joerg Sonnenberger) phabricator at mercurial-scm.org
Sat Dec 9 00:06:43 UTC 2017


joerg.sonnenberger created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1622

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -15,6 +15,8 @@
 import time
 import weakref
 
+from intbitset import intbitset
+
 from .i18n import _
 from .node import (
     hex,
@@ -1278,7 +1280,7 @@
                                      checkambigfiles=_cachedfiles)
         tr.changes['revs'] = xrange(0, 0)
         tr.changes['obsmarkers'] = set()
-        tr.changes['phases'] = [set() for i in range(7)]
+        tr.changes['phases'] = [intbitset() for i in range(6)]
         tr.changes['bookmarks'] = {}
 
         tr.hookargs['txnid'] = txnid



To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list