comparison mercurial/merge.py @ 37174:daef13da66fe

context: avoid using a context object as a changeid I find it misleading to pass changeid=changectx. It currently works to do that because there's weird (IMO) handling of it in basectx.__new__. I'm planning on removing that code. Passing changeid as "changeid" and context as "context" makes it more readable. Note that the documentation of filectx.__init__ doesn't even seem to be aware that a changeid can be a context ("changeset revision, node, or tag"). Differential Revision: https://phab.mercurial-scm.org/D2967
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 29 Mar 2018 21:29:15 -0700
parents 6f570c501e3e
children 7269b87f817c
comparison
equal deleted inserted replaced
37173:d7f3fdab94c4 37174:daef13da66fe
559 else: 559 else:
560 actx = None 560 actx = None
561 fcd = self._filectxorabsent(hash, wctx, dfile) 561 fcd = self._filectxorabsent(hash, wctx, dfile)
562 fco = self._filectxorabsent(onode, octx, ofile) 562 fco = self._filectxorabsent(onode, octx, ofile)
563 # TODO: move this to filectxorabsent 563 # TODO: move this to filectxorabsent
564 fca = self._repo.filectx(afile, fileid=anode, changeid=actx) 564 fca = self._repo.filectx(afile, fileid=anode, changectx=actx)
565 # "premerge" x flags 565 # "premerge" x flags
566 flo = fco.flags() 566 flo = fco.flags()
567 fla = fca.flags() 567 fla = fca.flags()
568 if 'x' in flags + flo + fla and 'l' not in flags + flo + fla: 568 if 'x' in flags + flo + fla and 'l' not in flags + flo + fla:
569 if fca.node() == nullid and flags != flo: 569 if fca.node() == nullid and flags != flo: