# HG changeset patch # User Yuya Nishihara # Date 2018-01-27 05:17:26 # Node ID 87416288be9837689ac12607413cbe7f4c5f369a # Parent fa993c3c84623523cb011217b5840a082df46c13 tests: make doctest py3-compatible again A parsed tree is replaced with parse(expr) because it sucks to add b'' to every string literal. diff --git a/mercurial/revsetlang.py b/mercurial/revsetlang.py --- a/mercurial/revsetlang.py +++ b/mercurial/revsetlang.py @@ -717,13 +717,13 @@ def _ishashlikesymbol(symbol): def gethashlikesymbols(tree): """returns the list of symbols of the tree that look like hashes - >>> gethashlikesymbols(('dagrange', ('symbol', '3'), ('symbol', 'abe3ff'))) + >>> gethashlikesymbols(parse(b'3::abe3ff')) ['3', 'abe3ff'] - >>> gethashlikesymbols(('func', ('symbol', 'precursors'), ('symbol', '.'))) + >>> gethashlikesymbols(parse(b'precursors(.)')) [] - >>> gethashlikesymbols(('func', ('symbol', 'precursors'), ('symbol', '34'))) + >>> gethashlikesymbols(parse(b'precursors(34)')) ['34'] - >>> gethashlikesymbols(('symbol', 'abe3ffZ')) + >>> gethashlikesymbols(parse(b'abe3ffZ')) [] """ if not tree: