[Request] [+ ] D8973: log: add support for bookmarks

sebhtml (Sébastien Boisvert) phabricator at mercurial-scm.org
Mon Aug 31 02:07:33 UTC 2020


sebhtml created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  A bookmark can already be pushed with 'hg push origin -B topic-foo'.
  The pull command also supports bookmarks.
  
  This patch adds support for bookmarks using the '_opt2logrevset' code path.
  
  The list of changesets for a bookmark can now be obtained simply with:
  'hg log -B topic-foo'.
  
  Reviewed-by: Elenie Godzaridis <arangradient at gmail.com>

REPOSITORY
  rHG Mercurial

BRANCH
  sebhtml

REVISION DETAIL
  https://phab.mercurial-scm.org/D8973

AFFECTED FILES
  mercurial/commands.py
  mercurial/logcmdutil.py

CHANGE DETAILS

diff --git a/mercurial/logcmdutil.py b/mercurial/logcmdutil.py
--- a/mercurial/logcmdutil.py
+++ b/mercurial/logcmdutil.py
@@ -774,6 +774,7 @@
     b'_matchfiles': (None, b'_matchfiles(%ps)'),
     b'date': (b'date(%s)', None),
     b'branch': (b'branch(%s)', b'%lr'),
+    b'bookmark': (b'reverse(ancestors(bookmark(%s)))', b'%lr'),
     b'_patslog': (b'filelog(%s)', b'%lr'),
     b'keyword': (b'keyword(%s)', b'%lr'),
     b'prune': (b'ancestors(%s)', b'not %lr'),
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4556,6 +4556,12 @@
             _(b'BRANCH'),
         ),
         (
+            b'B',
+            b'bookmark',
+            [],
+            _(b"show changesets within the given bookmark"),
+            _(b'BOOKMARK')),
+        (
             b'P',
             b'prune',
             [],



To: sebhtml, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200831/31c5c258/attachment.html>


More information about the Mercurial-patches mailing list