[PATCH RFC] incoming: show changed bookmarks in addition to new ones

Ryan McElroy rm at fb.com
Tue Feb 10 21:52:51 CST 2015

# HG changeset patch
# User Ryan McElroy <rmcelroy at fb.com>
# Date 1422335152 28800
#      Mon Jan 26 21:05:52 2015 -0800
# Node ID 80a86a48208bfb7013db0604af0243850d21016d
# Parent  ff5caa8dfd993680d9602ca6ebb14da9de10d5f4
incoming: show changed bookmarks in addition to new ones

Currently, `hg incoming -B` shows only new bookmarks on the server, not updated
bookmarks. This seems wrong -- I would expect it to show all bookmark activity.
Certainly, the help message of 'compare bookmarks' implies that this is what it
will do. Let's make `incoming -B` behave like it feels it should.

diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py
--- a/mercurial/bookmarks.py
+++ b/mercurial/bookmarks.py
@@ -433,8 +433,8 @@ def diff(ui, dst, src):
     smarks = src.listkeys('bookmarks')
     dmarks = dst.listkeys('bookmarks')
-    diff = sorted(set(smarks) - set(dmarks))
-    for k in diff:
+    diff = sorted(set(smarks.items()) - set(dmarks.items()))
+    for k, v in diff:
         mark = ui.debugflag and smarks[k] or smarks[k][:12]
         ui.write("   %-25s %s\n" % (k, mark))

More information about the Mercurial-devel mailing list