mercurial/revsetlang.py
changeset 35882 87416288be98
parent 35822 4269971b0d26
child 36685 2a258985ffeb
equal deleted inserted replaced
35881:fa993c3c8462 35882:87416288be98
   715     return _hashre.match(symbol)
   715     return _hashre.match(symbol)
   716 
   716 
   717 def gethashlikesymbols(tree):
   717 def gethashlikesymbols(tree):
   718     """returns the list of symbols of the tree that look like hashes
   718     """returns the list of symbols of the tree that look like hashes
   719 
   719 
   720     >>> gethashlikesymbols(('dagrange', ('symbol', '3'), ('symbol', 'abe3ff')))
   720     >>> gethashlikesymbols(parse(b'3::abe3ff'))
   721     ['3', 'abe3ff']
   721     ['3', 'abe3ff']
   722     >>> gethashlikesymbols(('func', ('symbol', 'precursors'), ('symbol', '.')))
   722     >>> gethashlikesymbols(parse(b'precursors(.)'))
   723     []
   723     []
   724     >>> gethashlikesymbols(('func', ('symbol', 'precursors'), ('symbol', '34')))
   724     >>> gethashlikesymbols(parse(b'precursors(34)'))
   725     ['34']
   725     ['34']
   726     >>> gethashlikesymbols(('symbol', 'abe3ffZ'))
   726     >>> gethashlikesymbols(parse(b'abe3ffZ'))
   727     []
   727     []
   728     """
   728     """
   729     if not tree:
   729     if not tree:
   730         return []
   730         return []
   731 
   731