Mercurial > public > mercurial-scm > hg
comparison mercurial/simplemerge.py @ 46113:59fa3890d40a
node: import symbols explicitly
There is no point in lazy importing mercurial.node, it is used all over
the place anyway. So consistently import the used symbols directly.
Fix one file using symbols indirectly via mercurial.revlog.
Differential Revision: https://phab.mercurial-scm.org/D9480
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Tue, 01 Dec 2020 21:54:46 +0100 |
parents | bdc2bf68f19e |
children | 98e3a693061a |
comparison
equal
deleted
inserted
replaced
46112:d6afa9c149c3 | 46113:59fa3890d40a |
---|---|
17 # s: "i hate that." | 17 # s: "i hate that." |
18 | 18 |
19 from __future__ import absolute_import | 19 from __future__ import absolute_import |
20 | 20 |
21 from .i18n import _ | 21 from .i18n import _ |
22 from .node import nullid | |
22 from . import ( | 23 from . import ( |
23 error, | 24 error, |
24 mdiff, | 25 mdiff, |
25 node as nodemod, | |
26 pycompat, | 26 pycompat, |
27 util, | 27 util, |
28 ) | 28 ) |
29 from .utils import stringutil | 29 from .utils import stringutil |
30 | 30 |
450 | 450 |
451 | 451 |
452 def is_not_null(ctx): | 452 def is_not_null(ctx): |
453 if not util.safehasattr(ctx, "node"): | 453 if not util.safehasattr(ctx, "node"): |
454 return False | 454 return False |
455 return ctx.node() != nodemod.nullid | 455 return ctx.node() != nullid |
456 | 456 |
457 | 457 |
458 def _mergediff(m3, name_a, name_b, name_base): | 458 def _mergediff(m3, name_a, name_b, name_base): |
459 lines = [] | 459 lines = [] |
460 conflicts = False | 460 conflicts = False |