Skip to content
Snippets Groups Projects
Commit 390a10b7843b authored by Ryan McElroy's avatar Ryan McElroy
Browse files

templatekw: display active bookmark more consistently (issue4552) (BC)

Previously, the template keyword '{activebookmark}' would only display the
active bookmark if it was also pointing to the working directory's parent.
Meanwhile, the '{active}' subkeyword of the '{bookmarks}' keyword displays
the active bookmark regardless of whether it also points to the working
directory's parent. This is confusing.

Consider the output of these two templates:

  $ hg log -T '{activebookmark}\n' -r indent

  $ hg log -T '{bookmarks % "{bookmark}"}\n' -r indent
  indent

This is the current behavior that can arise after, eg, a pull moves a bookmark
out from under you. After this patch, the first template will also return the
active bookmark that points to a revision, even if it is not the current
parent of the working directory. A test has been added to show the new behavior.
parent a5a95642144b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment