[PATCH 02 of 11] filectx: make renamed a property cache
Sean Farley
sean at farley.io
Wed May 10 13:09:39 EDT 2017
Jun Wu <quark at fb.com> writes:
> # HG changeset patch
> # User Jun Wu <quark at fb.com>
> # Date 1494384537 25200
> # Tue May 09 19:48:57 2017 -0700
> # Node ID 8fe9241cb76e0e1b91d6deaa9af81de3e97f696e
> # Parent e4403b22312ef8d7a0d4cded7f23f5fc0753d50c
> # Available At https://bitbucket.org/quark-zju/hg-draft
> # hg pull https://bitbucket.org/quark-zju/hg-draft -r 8fe9241cb76e
> filectx: make renamed a property cache
>
> See previous patch for context - mainly to avoid code duplication.
>
> diff --git a/mercurial/context.py b/mercurial/context.py
> --- a/mercurial/context.py
> +++ b/mercurial/context.py
> @@ -798,4 +798,6 @@ class basefilectx(object):
> def changectx(self):
> return self._changectx
> + def renamed(self):
> + return self._copied
> def repo(self):
> return self._repo
> @@ -1150,5 +1152,6 @@ class filectx(basefilectx):
> return self._filelog.size(self._filerev)
>
> - def renamed(self):
> + @propertycache
> + def _copied(self):
Am I reading this right that this is _copied and not 'renamed'? Or is
the diff hunk misaligned?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170510/712a8ddd/attachment.sig>
More information about the Mercurial-devel
mailing list