[PATCH 4 of 4] templatekw: display non-current bookmarks (issue4552) (BC)
Augie Fackler
raf at durin42.com
Fri May 29 15:00:36 CDT 2015
On Fri, May 29, 2015 at 10:22:53AM -0700, Ryan McElroy wrote:
> # HG changeset patch
> # User Ryan McElroy <rmcelroy at fb.com>
> # Date 1429114074 25200
> # Wed Apr 15 09:07:54 2015 -0700
> # Node ID 95b095fb5d865ff5d357bd82905c21145fd4af65
> # Parent 4dc7e32d957bcddb9dfe86c6d9443ba1c09fe1ac
> templatekw: display non-current bookmarks (issue4552) (BC)
I'm...not sure what this accomplishes? Can I get some sort of
before-and-after that demonstrates the BC easily?
>
> Today, the terms 'active' and 'current' are interchangeably used throughout the
> codebase in reference to the active bookmark (the bookmark that will be updated
> with the next commit). This leads to confusion among developers and users.
> This patch is part of a series to standardize the usage to 'active' throughout
> the mercurial codebase and user interface.
>
> diff --git a/README b/README
> --- a/README
> +++ b/README
> @@ -18,3 +18,4 @@ Running without installing:
>
> See http://mercurial.selenic.com/ for detailed installation
> instructions, platform-specific notes, and Mercurial user information.
> +
Your stray whitespace change is confusing.
> diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
> --- a/mercurial/templatekw.py
> +++ b/mercurial/templatekw.py
> @@ -230,12 +230,9 @@ def showcurrentbookmark(**args):
> def showactivebookmark(**args):
> """:activetbookmark: String. The active bookmark, if it is
> associated with the changeset"""
> - import bookmarks as bookmarks # to avoid circular import issues
> - repo = args['repo']
> - if bookmarks.isactivewdirparent(repo):
> - active = repo._activebookmark
> - if active in args['ctx'].bookmarks():
> - return active
> + active = args['repo']._activebookmark
> + if active and active in args['ctx'].bookmarks():
> + return active
> return ''
>
> def showdate(repo, ctx, templ, **args):
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list