comparison mercurial/commands.py @ 14496:ffcb7e4d719f stable

revset: report a parse error if a revset is not parsed completely (issue2654)
author Bernhard Leiner <bleiner@gmail.com>
date Wed, 16 Mar 2011 23:09:14 +0100
parents ab687820c4cc
children 4f695345979c
comparison
equal deleted inserted replaced
14479:c63cc5eccbff 14496:ffcb7e4d719f
1212 v.encode('string-escape'))) 1212 v.encode('string-escape')))
1213 1213
1214 def debugrevspec(ui, repo, expr): 1214 def debugrevspec(ui, repo, expr):
1215 '''parse and apply a revision specification''' 1215 '''parse and apply a revision specification'''
1216 if ui.verbose: 1216 if ui.verbose:
1217 tree = revset.parse(expr) 1217 tree = revset.parse(expr)[0]
1218 ui.note(tree, "\n") 1218 ui.note(tree, "\n")
1219 func = revset.match(expr) 1219 func = revset.match(expr)
1220 for c in func(repo, range(len(repo))): 1220 for c in func(repo, range(len(repo))):
1221 ui.write("%s\n" % c) 1221 ui.write("%s\n" % c)
1222 1222