Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/context.py @ 12731:95514b58709d
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.
author | Christian Ebert <blacktrash@gmx.net> |
---|---|
date | Thu, 14 Oct 2010 22:47:50 +0200 |
parents | 4147a292c508 |
children | 4832717aed98 acd69df118ab |
comparison
equal
deleted
inserted
replaced
12730:33e1fd2aeb3c | 12731:95514b58709d |
---|---|
355 def cmp(self, fctx): | 355 def cmp(self, fctx): |
356 """compare with other file context | 356 """compare with other file context |
357 | 357 |
358 returns True if different than fctx. | 358 returns True if different than fctx. |
359 """ | 359 """ |
360 if not self._repo._encodefilterpats and self.size() != fctx.size(): | 360 if (fctx._filerev is None and self._repo._encodefilterpats |
361 return True | 361 or self.size() == fctx.size()): |
362 | 362 return self._filelog.cmp(self._filenode, fctx.data()) |
363 return self._filelog.cmp(self._filenode, fctx.data()) | 363 |
364 return True | |
364 | 365 |
365 def renamed(self): | 366 def renamed(self): |
366 """check if file was actually renamed in this changeset revision | 367 """check if file was actually renamed in this changeset revision |
367 | 368 |
368 If rename logged in file revision, we report copy for changeset only | 369 If rename logged in file revision, we report copy for changeset only |