D7465: filemerge: fix a missing attribute usage

dlax (Denis Laxalde) phabricator at mercurial-scm.org
Thu Nov 21 12:56:04 UTC 2019


dlax added inline comments.

INLINE COMMENTS

> mharbison72 wrote in filemerge.py:122
> I’m not sure how this works, but this was enough to make pytype happy.  Does it make any sense to compare an absent file to an absent file?
> 
> Maybe the right thing is to add a ctx attribute here?

> Does it make any sense to compare an absent file to an absent file?

Not sure, but due to lazy evaluation `fctx.ctx() == self.ctx()` would only be evaluated if `fctx` is an absent file, hence also lacking the `ctx()` method.
I suggested to use `changectx()` because this is already implemented and also part of the basefilectx interface.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7465/new/

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

To: mharbison72, #hg-reviewers
Cc: dlax, mercurial-devel


More information about the Mercurial-devel mailing list