[PATCH] scmutil: allow access to filecache descriptor on class

Yuya Nishihara yuya at tcha.org
Sun Jun 19 06:34:48 EDT 2016


On Fri, 17 Jun 2016 23:03:21 +0100, Martijn Pieters wrote:
> # HG changeset patch
> # User Martijn Pieters <mjpieters at fb.com>
> # Date 1466190369 -3600
> #      Fri Jun 17 20:06:09 2016 +0100
> # Node ID 57d69d0a0309af0cc3f6e7f63d92a61343c2600d
> # Parent  3ddf4d0c41702904a4966edba78765582f35bea5
> scmutil: allow access to filecache descriptor on class
> 
> To make it easier to patch the wrapped function, make it possible to access the
> filecache descriptor directly on the class (rather than have to use
> ClassObject.__dict__['attributename']). Returning `self` when the first
> argument to `__get__` is `None` makes the descriptor behave the same way
> `property` objects do.

Good catch. Queued, thanks.


More information about the Mercurial-devel mailing list