Mercurial > public > mercurial-scm > hg
comparison mercurial/context.py @ 40986:328557af18eb stable
context: reimplement memfilectx.cmp()
If I added a sanity check to basefilectx, test-context.py exploded. This
patch copies the naive implementation from overlayworkingfilectx.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 16 Dec 2018 17:08:46 +0900 |
parents | 1c8c54cf9725 |
children | e10adebf8176 |
comparison
equal
deleted
inserted
replaced
40940:120ecb17242b | 40986:328557af18eb |
---|---|
2290 self._flags = '' | 2290 self._flags = '' |
2291 self._copied = None | 2291 self._copied = None |
2292 if copied: | 2292 if copied: |
2293 self._copied = (copied, nullid) | 2293 self._copied = (copied, nullid) |
2294 | 2294 |
2295 def cmp(self, fctx): | |
2296 return self.data() != fctx.data() | |
2297 | |
2295 def data(self): | 2298 def data(self): |
2296 return self._data | 2299 return self._data |
2297 | 2300 |
2298 def remove(self, ignoremissing=False): | 2301 def remove(self, ignoremissing=False): |
2299 """wraps unlink for a repo's working directory""" | 2302 """wraps unlink for a repo's working directory""" |