comparison mercurial/scmutil.py @ 39894:d739f423bf06

repo: look up nullrev context by revnum, not symbolic name I think lookup of the 'null' symbol should be done via scmutil.revsymbol() and repo['null'] is only supported for historical reasons. However, repo[nullrev] is fine, so we can switch to that instead of switching to scmutil.revsymbol('null'). Differential Revision: https://phab.mercurial-scm.org/D4780
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 26 Sep 2018 22:17:34 -0700
parents b99903534e06
children a477679f6323
comparison
equal deleted inserted replaced
39893:f6874567a93b 39894:d739f423bf06
19 from .i18n import _ 19 from .i18n import _
20 from .node import ( 20 from .node import (
21 bin, 21 bin,
22 hex, 22 hex,
23 nullid, 23 nullid,
24 nullrev,
24 short, 25 short,
25 wdirid, 26 wdirid,
26 wdirrev, 27 wdirrev,
27 ) 28 )
28 29
728 """ 729 """
729 parents = ctx.parents() 730 parents = ctx.parents()
730 if len(parents) > 1: 731 if len(parents) > 1:
731 return parents 732 return parents
732 if repo.ui.debugflag: 733 if repo.ui.debugflag:
733 return [parents[0], repo['null']] 734 return [parents[0], repo[nullrev]]
734 if parents[0].rev() >= intrev(ctx) - 1: 735 if parents[0].rev() >= intrev(ctx) - 1:
735 return [] 736 return []
736 return parents 737 return parents
737 738
738 def expandpats(pats): 739 def expandpats(pats):