Mercurial > hg-stable
changeset 11703:55a2af02e45c
context: reuse filecontext.cmp in workingfilecontext.cmp
Same code path should mean less mistakes, and hopefully, better
caching.
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Thu, 29 Jul 2010 10:39:59 +0900 |
parents | eb07fbc21e9c |
children | e95bacedae12 |
files | mercurial/context.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Tue Jul 27 23:40:46 2010 +0900 +++ b/mercurial/context.py Thu Jul 29 10:39:59 2010 +0900 @@ -940,7 +940,9 @@ returns True if different than fctx. """ - return self._repo.wread(self._path) != fctx.data() + # fctx should be a filectx (not a wfctx) + # invert comparison to reuse the same code path + return fctx.cmp(self) class memctx(object): """Use memctx to perform in-memory commits via localrepo.commitctx().