[PATCH] Provide better context for custom Python encode/decode filters

Matt Mackall mpm at selenic.com
Sun Jan 27 15:50:20 CST 2008


On Sun, 2008-01-27 at 20:08 +0100, Patrick Mézard wrote:
> Jesse Glick a écrit :
> > Patrick Mézard wrote:
> >> Here is the rebased version of your patch assuming mine is pushed.
> >> Main differences:
> >> - exchanged filename/repo arguments positions. Most functions seem to take (ui, repo, ...).
> > 
> > Yes, fine.
> > 
> >> - moved the inspect logic in localrepo._filter() and run it one at every filter creation.
> > 
> > Not sure I understand why, but if it works then fine.
> 
> I could not find any compelling reason to keep registering this stuff
> in util.py, so it went in the most reduced scope by default,
> localrepo.py. It makes sense here to pass arguments like ui or repo. I
> don't like the idea of having util.filter handling opaque parameters
> only some obscure caller knows about. Let's do that when we really
> need it.

Yes, we definitely shouldn't have anything in util know about repo or ui
objects.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list