revset: don't abort when regex to tag() matches nothing (issue3850)
authorKevin Bullock <kbullock@ringworld.org>
Mon, 18 Mar 2013 16:04:10 -0500
changeset 18779 9e39a717a23e
parent 18778 1ef89df2c248
child 18780 0705ad73e878
revset: don't abort when regex to tag() matches nothing (issue3850) This makes the tag("re:...") revset consistent with branch("re:...").
mercurial/revset.py
tests/test-revset.t
--- 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