[PATCH] patchbomb: treat address of "none" as no addresses

Matt Mackall mpm at selenic.com
Mon Jan 11 16:23:54 CST 2016


On Thu, 2016-01-07 at 11:00 -0800, Bryan O'Sullivan wrote:
> On Wed, Jan 6, 2016 at 11:52 AM, Sean Farley <sean at farley.io> wrote:
> 
> > Would it be too crazy to have:
> > 
> > [email]
> > cc =
> > 
> > i.e. the empty string?
> > 
> 
> That makes sense in theory. In practice, the config API has been broken for
> this kind of use basically forever: it is not possible to distinguish
> between a config that doesn't exist and one that was specified as empty.

The trick is to pass in a default value of None (or some other non-string
object). If you get it back, you know it's not set.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list