Mercurial > hg
comparison mercurial/revset.py @ 18779:9e39a717a23e
revset: don't abort when regex to tag() matches nothing (issue3850)
This makes the tag("re:...") revset consistent with branch("re:...").
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Mon, 18 Mar 2013 16:04:10 -0500 |
parents | ae645d4f084c |
children | c1af1fb314bc |
comparison
equal
deleted
inserted
replaced
18778:1ef89df2c248 | 18779:9e39a717a23e |
---|---|
1494 if tn is None: | 1494 if tn is None: |
1495 raise util.Abort(_("tag '%s' does not exist") % pattern) | 1495 raise util.Abort(_("tag '%s' does not exist") % pattern) |
1496 s = set([repo[tn].rev()]) | 1496 s = set([repo[tn].rev()]) |
1497 else: | 1497 else: |
1498 s = set([cl.rev(n) for t, n in repo.tagslist() if matcher(t)]) | 1498 s = set([cl.rev(n) for t, n in repo.tagslist() if matcher(t)]) |
1499 if not s: | |
1500 raise util.Abort(_("no tags exist that match '%s'") % pattern) | |
1501 else: | 1499 else: |
1502 s = set([cl.rev(n) for t, n in repo.tagslist() if t != 'tip']) | 1500 s = set([cl.rev(n) for t, n in repo.tagslist() if t != 'tip']) |
1503 return [r for r in subset if r in s] | 1501 return [r for r in subset if r in s] |
1504 | 1502 |
1505 def tagged(repo, subset, x): | 1503 def tagged(repo, subset, x): |