D674: filemerge: use arbitraryfilectx for backup files
phillco (Phil Cohen)
phabricator at mercurial-scm.org
Wed Sep 13 14:05:17 EDT 2017
phillco added inline comments.
INLINE COMMENTS
> martinvonz wrote in filemerge.py:744
> Can we not simply make arbitraryfilectx.cmp() something like
>
> def cmp(self, fctx):
> if isinstance(fctx, arbitraryfilectx):
> return filecmp.cmp(self.path(), fctx.path())
> return self.data() != otherfilectx.data()
`fcd` is a `workingfilectx`, so it'd need to need to be something like:
return filecmp.cmp(self.path(), self._repo.wjoin(fctx.path()))
and `arbitraryfilectx` doesn't have a `_repo` because we use it in `contrib/simplemerge`. Maybe we could make it an optional property and raise in this case if it's missing? `contrib/simplemerge` doesn't need it.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D674
To: phillco, #hg-reviewers
Cc: sid0, martinvonz, mercurial-devel
More information about the Mercurial-devel
mailing list