Commit Graph

13 Commits

Author SHA1 Message Date
Augie Fackler
653b207160 revsetlang: fix _quote on int on python3
Thanks to Yuya for spotting the need.
2017-03-26 16:48:29 -04:00
Augie Fackler
b00133b3e1 revsetlang: perform quoting using ui.escapestr instead of repr()
This changes one of the doctest results, but I'm pretty sure on
inspection that it's an equivalent result.
2017-03-23 10:46:50 -04:00
Augie Fackler
7257c843f2 revsetlang: add docstring with some tests to _quote 2017-03-23 10:41:34 -04:00
Augie Fackler
434ea09250 revsetlang: move quoting function to not be a closure
I'm about to change the implementation here and I'd like to add some
doctests, which means this needs to not be hidden inside another
function.
2017-03-19 01:14:19 -04:00
Augie Fackler
9acabc5cd1 revsetlang: portably bytestring-ify another pair of int() calls 2017-03-23 10:33:20 -04:00
Augie Fackler
656aa696dc revsetlang: portably turn int into bytestring 2017-03-19 01:03:53 -04:00
Yuya Nishihara
eea0ef4b6e py3: use bytestr wrapper in revsetlang.tokenize()
This backs out a2d8ce9531e1 and wraps program by bytestr() instead.
2017-03-16 21:36:21 +09:00
Yuya Nishihara
a665b1ac40 py3: use bytestr wrapper in revsetlang.formatspec()
This backs out e6d1d689544f and wraps expr by bytestr() instead.
2017-03-16 21:33:25 +09:00
Yuya Nishihara
0b54547397 py3: fix slicing of bytes in revset.formatspec() 2017-03-12 17:16:43 -07:00
Yuya Nishihara
ce52228976 py3: make set of revset operators and quotes in bytes 2017-03-12 17:13:54 -07:00
Yuya Nishihara
b72ea4927a py3: convert set of revset initial symbols back to bytes
Otherwise tokenize() would fail due to comparison between unicode and bytes.
2017-03-12 17:10:14 -07:00
Augie Fackler
9d7c26df45 revsetlang: slice out single bytes instead of indexing
For portability with Python 3.
2017-03-12 00:46:59 -05:00
Yuya Nishihara
b2229f5117 revset: split language services to revsetlang module (API)
New revsetlang module hosts parser, tokenizer, and miscellaneous functions
working on parsed tree. It does not include functions for evaluation such as
getset() and match().

  2288 mercurial/revset.py
   684 mercurial/revsetlang.py
  2972 total

get*() functions are aliased since they are common in revset.py.
2017-02-19 18:19:33 +09:00