Submitter | Augie Fackler |
---|---|
Date | Oct. 7, 2016, 12:50 p.m. |
Message ID | <d7777ef3fe7f82524c29.1475844646@augie-macbookair2.roam.corp.google.com> |
Download | mbox | patch |
Permalink | /patch/16886/ |
State | Superseded |
Headers | show |
Comments
On Fri, Oct 7, 2016 at 2:50 PM, Augie Fackler <raf@durin42.com> wrote: > # HG changeset patch > # User Augie Fackler <augie@google.com> > # Date 1475842163 14400 > # Fri Oct 07 08:09:23 2016 -0400 > # Node ID d7777ef3fe7f82524c2925d9af6c3e1884a4188d > # Parent da814a1e51a7c97d0b4a1a7519bdca87802e4e6d > revset: define _symletters in terms of _syminitletters > > diff --git a/mercurial/revset.py b/mercurial/revset.py > --- a/mercurial/revset.py > +++ b/mercurial/revset.py > @@ -177,8 +177,7 @@ keywords = set(['and', 'or', 'not']) > if c.isalnum() or c in '._@' or ord(c) > 127) > > # default set of valid characters for non-initial letters of symbols > -_symletters = set(c for c in [chr(i) for i in xrange(256)] > - if c.isalnum() or c in '-._/@' or ord(c) > 127) > +_symletters = _syminitletters | set('-/') Need to add a u'' here that is set(u'-/') > > def tokenize(program, lookup=None, syminitletters=None, symletters=None): > ''' > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
On Fri, 7 Oct 2016 17:09:33 +0200, Pulkit Goyal wrote: > On Fri, Oct 7, 2016 at 2:50 PM, Augie Fackler <raf@durin42.com> wrote: > > # HG changeset patch > > # User Augie Fackler <augie@google.com> > > # Date 1475842163 14400 > > # Fri Oct 07 08:09:23 2016 -0400 > > # Node ID d7777ef3fe7f82524c2925d9af6c3e1884a4188d > > # Parent da814a1e51a7c97d0b4a1a7519bdca87802e4e6d > > revset: define _symletters in terms of _syminitletters > > > > diff --git a/mercurial/revset.py b/mercurial/revset.py > > --- a/mercurial/revset.py > > +++ b/mercurial/revset.py > > @@ -177,8 +177,7 @@ keywords = set(['and', 'or', 'not']) > > if c.isalnum() or c in '._@' or ord(c) > 127) > > > > # default set of valid characters for non-initial letters of symbols > > -_symletters = set(c for c in [chr(i) for i in xrange(256)] > > - if c.isalnum() or c in '-._/@' or ord(c) > 127) > > +_symletters = _syminitletters | set('-/') > Need to add a u'' here that is set(u'-/') A revset expression is bytes. Testing it against unicode would cause UnicodeDecodeError on Python 2 (and TypeError on Python 3.)
On Fri, 07 Oct 2016 08:50:46 -0400, Augie Fackler wrote: > # HG changeset patch > # User Augie Fackler <augie@google.com> > # Date 1475842163 14400 > # Fri Oct 07 08:09:23 2016 -0400 > # Node ID d7777ef3fe7f82524c2925d9af6c3e1884a4188d > # Parent da814a1e51a7c97d0b4a1a7519bdca87802e4e6d > revset: define _symletters in terms of _syminitletters Queued the first 2 patches, thanks.
Patch
diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -177,8 +177,7 @@ keywords = set(['and', 'or', 'not']) if c.isalnum() or c in '._@' or ord(c) > 127) # default set of valid characters for non-initial letters of symbols -_symletters = set(c for c in [chr(i) for i in xrange(256)] - if c.isalnum() or c in '-._/@' or ord(c) > 127) +_symletters = _syminitletters | set('-/') def tokenize(program, lookup=None, syminitletters=None, symletters=None): '''