[PATCH in crew] revset: don't abort when regex to tag() matches nothing (issue3850)
Kevin Bullock
kbullock+mercurial at ringworld.org
Mon Mar 18 16:25:12 CDT 2013
# HG changeset patch
# User Kevin Bullock <kbullock at ringworld.org>
# Date 1363640650 18000
# Node ID 9e39a717a23e5cf91593336b5949e01cc6958a93
# Parent 1ef89df2c2487d4957e6d6f8f0d96505eb58ccef
revset: don't abort when regex to tag() matches nothing (issue3850)
This makes the tag("re:...") revset consistent with branch("re:...").
diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -1496,8 +1496,6 @@ def tag(repo, subset, x):
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]
diff --git a/tests/test-revset.t b/tests/test-revset.t
--- a/tests/test-revset.t
+++ b/tests/test-revset.t
@@ -437,8 +437,6 @@ we can use patterns when searching for t
$ 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
More information about the Mercurial-devel
mailing list