Mercurial > hg
diff mercurial/revset.py @ 40534:7ed611c60168
revsets: make bookmark/named('re:nonexistent') not abort (issue6018) (BC)
Foozy documented the differences between revsets branch(), tag(),
bookmark(), and named() in eeb5d5ab14a6 (revset: raise RepoLookupError
to make present() predicate continue the query, 2015-01-31). He seemed
to want tag() to change behavior to not error out on non-matching
regular expressions. I think it's instead bookmark() and named() that
should not error out. So that's what this patch does.
Differential Revision: https://phab.mercurial-scm.org/D5220
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 05 Nov 2018 09:09:48 -0800 |
parents | d894d2372ffe |
children | e54bfde922f2 |
line wrap: on
line diff
--- a/mercurial/revset.py Mon Nov 05 16:05:45 2018 -0800 +++ b/mercurial/revset.py Mon Nov 05 09:09:48 2018 -0800 @@ -466,9 +466,6 @@ for name, bmrev in repo._bookmarks.iteritems(): if matcher(name): matchrevs.add(bmrev) - if not matchrevs: - raise error.RepoLookupError(_("no bookmarks exist" - " that match '%s'") % pattern) for bmrev in matchrevs: bms.add(repo[bmrev].rev()) else: @@ -1330,9 +1327,6 @@ for name, ns in repo.names.iteritems(): if matcher(name): namespaces.add(ns) - if not namespaces: - raise error.RepoLookupError(_("no namespace exists" - " that match '%s'") % pattern) names = set() for ns in namespaces: