revset: don't abort when regex to tag() matches nothing (
issue3850)
This makes the tag("re:...") revset consistent with branch("re:...").
--- a/mercurial/revset.py Fri Mar 15 11:23:29 2013 -0700
+++ b/mercurial/revset.py Mon Mar 18 16:04:10 2013 -0500
@@ -1496,8 +1496,6 @@
s = set([repo[tn].rev()])
else:
s = set([cl.rev(n) for t, n in repo.tagslist() if matcher(t)])
- if not s:
- raise util.Abort(_("no tags exist that match '%s'") % pattern)
else:
s = set([cl.rev(n) for t, n in repo.tagslist() if t != 'tip'])
return [r for r in subset if r in s]
--- a/tests/test-revset.t Fri Mar 15 11:23:29 2013 -0700
+++ b/tests/test-revset.t Mon Mar 18 16:04:10 2013 -0500
@@ -437,8 +437,6 @@
$ log 'tag("literal:1.0")'
6
$ log 'tag("re:0..*")'
- abort: no tags exist that match '0..*'
- [255]
$ log 'tag(unknown)'
abort: tag 'unknown' does not exist