# HG changeset patch # User Nicolas Dumazet # Date 2010-07-29 01:39:59 # Node ID 55a2af02e45cd3b182717bf38b7584c65f307a33 # Parent eb07fbc21e9c3ff6536e72df9fa00f423490436a context: reuse filecontext.cmp in workingfilecontext.cmp Same code path should mean less mistakes, and hopefully, better caching. diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -940,7 +940,9 @@ class workingfilectx(filectx): 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().