##// END OF EJS Templates
revset: implement match() in terms of matchany()...
Gregory Szorc -
r29418:bcefb25a default
parent child Browse files
Show More
@@ -2528,13 +2528,10 b' def posttreebuilthook(tree, repo):'
2528 pass
2528 pass
2529
2529
2530 def match(ui, spec, repo=None):
2530 def match(ui, spec, repo=None):
2531 """Create a matcher for a single revision spec."""
2531 if not spec:
2532 if not spec:
2532 raise error.ParseError(_("empty query"))
2533 raise error.ParseError(_("empty query"))
2533 lookup = None
2534 return matchany(ui, [spec], repo=repo)
2534 if repo:
2535 lookup = repo.__contains__
2536 tree = parse(spec, lookup)
2537 return _makematcher(ui, tree, repo)
2538
2535
2539 def matchany(ui, specs, repo=None):
2536 def matchany(ui, specs, repo=None):
2540 """Create a matcher that will include any revisions matching one of the
2537 """Create a matcher that will include any revisions matching one of the
General Comments 0
You need to be logged in to leave comments. Login now