[PATCH 1 of 4 V3] hgweb: add dynamic search function selection, depending on the query

Alexander Plavin alexander at plav.in
Mon Sep 2 12:36:07 CDT 2013

02.09.2013, 00:18, "Martin Geisler" <martin at geisler.net>:
> Alexander Plavin <alexander at plav.in> writes:
>>  01.09.2013, 08:45, "Kevin Bullock" <kbullock+mercurial at ringworld.org>:
>>>  On 28 Aug 2013, at 7:24 AM, Augie Fackler wrote:
>>>>   On Wed, Aug 28, 2013 at 5:37 AM, Alexander Plavin <alexander at plav.in> wrote:
>>>>>   I haven't noticed a place where such thing is used in Mercurial, could you please point at one of them (if there are any)?
>>>>   I guess there aren't. Hm. Kevin, do you have an opinion?
>>>  I always have an opinion; sometimes it's even warranted :P
>>>  A symbolic name would guard against typos in the string literal. I'm
>>>  in favor.
>>  Would it, really? Due to Python being interpreted, an exception would
>>  be raised only when the line of code executes, with both methods (a
>>  separate constant, or a string literal).
> That is true, but Pyflakes can detect undefined variables most of the
> time.

Hm, may be this really makes some sense... How would it be better to do this? Just have the constants defined at the top, and use them in the code? I ask because there is no place where such technique is used in hg now.

> --
> Martin Geisler

More information about the Mercurial-devel mailing list