[PATCH 06 of 12 RFC v2] localrepo: add refreshui method

Matt Mackall mpm at selenic.com
Wed Jun 15 16:43:35 CDT 2011


On Thu, 2011-06-16 at 00:09 +0300, Idan Kamara wrote:
> # HG changeset patch
> # User Idan Kamara <idankk86 at gmail.com>
> # Date 1307443149 -10800
> # Node ID e07023e255e64145d73b2e709a0a7e92d9ff5191
> # Parent  4dbd17520d9cffe9823684ff4fd10195282bd805
> localrepo: add refreshui method
> 
> Allows cached repos to refresh their internal ui.
> This is mostly useful for changes that affect output, e.g. verbose/debug flags.
> 
> diff -r 4dbd17520d9c -r e07023e255e6 mercurial/localrepo.py
> --- a/mercurial/localrepo.py	Wed Jun 08 14:54:52 2011 +0300
> +++ b/mercurial/localrepo.py	Tue Jun 07 13:39:09 2011 +0300
> @@ -25,6 +25,18 @@
>      supported = supportedformats | set(('store', 'fncache', 'shared',
>                                          'dotencode'))
>  
> +    def refreshui(self, baseui):
> +        # in case cached properties have a reference to the old ui
> +        self.invalidate()

Ouch!

Can you be more detailed about why we need this patch?

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list