[PATCH v2] notify: support revset selection for subscriptions

Martin Geisler mg at aragost.com
Wed Jun 20 06:58:04 CDT 2012


David Champion <dgc at uchicago.edu> writes:

> Clearly some fixes are in order.  Since this has been pushed to crew,
> what's the protocol?  Patch crew, or refactor this from main?

You should send further patches based on crew -- Matt will pull from
crew regularly.

> * On 19 Jun 2012, Greg Ward wrote: 

>> > +            revs = self.repo.revs('%r and %d:', spec, ctx.rev())
>> > +            if len(revs):
>> 
>> Why not just "if revs"? If you want to be explicit, do it right: "if
>> len(revs) > 0" ... which IMHO is overkill.
>
> Style again; if this is preferred I'll go along.

Yeah, some prefer the explicit 'if len(revs)' or 'if len(revs) > 0'
style. We normally just use 'if revs' -- I like that style since it does
exactly what we want (test for emptyness) without doing more (looking up
the length).

-- 
Martin Geisler

aragost Trifork
Commercial Mercurial support
http://aragost.com/mercurial/


More information about the Mercurial-devel mailing list