comparison mercurial/tagmerge.py @ 47012:d55b71393907

node: replace nullid and friends with nodeconstants class The introduction of 256bit hashes require changes to nullid and other constant magic values. Start pushing them down from repository and revlog where sensible. Differential Revision: https://phab.mercurial-scm.org/D9465
author Joerg Sonnenberger <joerg@bec.de>
date Mon, 29 Mar 2021 01:52:06 +0200
parents 59fa3890d40a
children 6000f5b25c9b
comparison
equal deleted inserted replaced
46992:5fa019ceb499 47012:d55b71393907
72 # - write the tag blocks in the sorted order 72 # - write the tag blocks in the sorted order
73 73
74 from __future__ import absolute_import 74 from __future__ import absolute_import
75 75
76 from .i18n import _ 76 from .i18n import _
77 from .node import (
78 nullhex,
79 )
80 from . import ( 77 from . import (
81 tags as tagsmod, 78 tags as tagsmod,
82 util, 79 util,
83 ) 80 )
84 81
241 for n, pntags in enumerate((p1tags, p2tags)): 238 for n, pntags in enumerate((p1tags, p2tags)):
242 pntagset = set(pntags) 239 pntagset = set(pntags)
243 pnlosttagset = basetagset - pntagset 240 pnlosttagset = basetagset - pntagset
244 for t in pnlosttagset: 241 for t in pnlosttagset:
245 pntags[t] = basetags[t] 242 pntags[t] = basetags[t]
246 if pntags[t][-1][0] != nullhex: 243 if pntags[t][-1][0] != repo.nodeconstants.nullhex:
247 pntags[t].append([nullhex, None]) 244 pntags[t].append([repo.nodeconstants.nullhex, None])
248 245
249 conflictedtags = [] # for reporting purposes 246 conflictedtags = [] # for reporting purposes
250 mergedtags = util.sortdict(p1tags) 247 mergedtags = util.sortdict(p1tags)
251 # sortdict does not implement iteritems() 248 # sortdict does not implement iteritems()
252 for tname, p2nodes in p2tags.items(): 249 for tname, p2nodes in p2tags.items():