[PATCH 2 of 2] revset: strip off "literal:" prefix from bookmark not found error

Augie Fackler raf at durin42.com
Thu Oct 8 12:53:53 CDT 2015


On Fri, Oct 09, 2015 at 12:39:12AM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1444226671 -32400
> #      Wed Oct 07 23:04:31 2015 +0900
> # Node ID 89b4acf69d7619220dda12fc8a9482587746310d
> # Parent  972718693a474e8cba92c1f36cbd52f969d99242
> revset: strip off "literal:" prefix from bookmark not found error

queued, thanks

>
> This is what branch() and tag() do.
>
> diff --git a/mercurial/revset.py b/mercurial/revset.py
> --- a/mercurial/revset.py
> +++ b/mercurial/revset.py
> @@ -696,7 +696,7 @@ def bookmark(repo, subset, x):
>              bmrev = repo._bookmarks.get(pattern, None)
>              if not bmrev:
>                  raise error.RepoLookupError(_("bookmark '%s' does not exist")
> -                                            % bm)
> +                                            % pattern)
>              bms.add(repo[bmrev].rev())
>          else:
>              matchrevs = set()
> diff --git a/tests/test-bookmarks.t b/tests/test-bookmarks.t
> --- a/tests/test-bookmarks.t
> +++ b/tests/test-bookmarks.t
> @@ -135,6 +135,9 @@ bookmarks revset
>    $ hg log -r 'bookmark(unknown)'
>    abort: bookmark 'unknown' does not exist!
>    [255]
> +  $ hg log -r 'bookmark("literal:unknown")'
> +  abort: bookmark 'unknown' does not exist!
> +  [255]
>    $ hg log -r 'bookmark("re:unknown")'
>    abort: no bookmarks exist that match 'unknown'!
>    [255]
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list