[PATCH 3 of 3 stable] extdiff: fix wrong comment about regexp ordering - regexps are just greedy

Matt Mackall mpm at selenic.com
Tue Jan 27 16:38:31 CST 2015


On Tue, 2015-01-27 at 03:15 +0100, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <madski at unity3d.com>
> # Date 1422324901 -3600
> #      Tue Jan 27 03:15:01 2015 +0100
> # Branch stable
> # Node ID 02b0b226f33ba22df7e820d27fe93a79b69ad24a
> # Parent  bf99a88b77b67ac4c88674ba5d1d19dd97092426
> extdiff: fix wrong comment about regexp ordering - regexps are just greedy

Confused, is the regex buggy? If so, what is the bug? If not, why is it
changing?

> -        # Match parent2 first, so 'parent1?' will match both parent1 and parent
>          regex = (r'''(['"]?)([^ '"]*)?'''
> -                 r'\$(parent2|parent1?|child|plabel1|plabel2|clabel|root)\1')
> +                 r'\$(parent1?|parent2|child|plabel1|plabel2|clabel|root)\1')

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list