# HG changeset patch # User Christian Ebert # Date 2010-10-14 20:47:50 # Node ID 95514b58709d87d14c183e6c23aa03a9df9bade6 # Parent 33e1fd2aeb3cb23a8c918969d0a4b735f0570e36 context: narrow down filter special case in filectx.cmp() cmp via filelog when encode filters are present, but only when actually comparing to the working directory. diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -357,10 +357,11 @@ class filectx(object): returns True if different than fctx. """ - if not self._repo._encodefilterpats and self.size() != fctx.size(): - return True + if (fctx._filerev is None and self._repo._encodefilterpats + or self.size() == fctx.size()): + return self._filelog.cmp(self._filenode, fctx.data()) - return self._filelog.cmp(self._filenode, fctx.data()) + return True def renamed(self): """check if file was actually renamed in this changeset revision