[PATCH 3 of 4 V6-2] bookmarks: remove useless diff()

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Thu Mar 19 09:41:11 CDT 2015


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1426775765 -32400
#      Thu Mar 19 23:36:05 2015 +0900
# Node ID c714fc4a9c335fc03752771fa2a8586ebbcd9f58
# Parent  c193872b3f0e3a38c15195039fd6675e55643c3b
bookmarks: remove useless diff()

Previous patches removed code paths referring it.

diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py
--- a/mercurial/bookmarks.py
+++ b/mercurial/bookmarks.py
@@ -498,25 +498,6 @@ def outgoing(ui, repo, other):
 
     return 0
 
-def diff(ui, dst, src):
-    ui.status(_("searching for changed bookmarks\n"))
-
-    smarks = src.listkeys('bookmarks')
-    dmarks = dst.listkeys('bookmarks')
-
-    diff = sorted(set(smarks) - set(dmarks))
-    for k in diff:
-        if ui.debugflag:
-            mark = smarks[k]
-        else:
-            mark = smarks[k][:12]
-        ui.write("   %-25s %s\n" % (k, mark))
-
-    if len(diff) <= 0:
-        ui.status(_("no changed bookmarks found\n"))
-        return 1
-    return 0
-
 def validdest(repo, old, new):
     """Is the new bookmark destination a valid update from the old one"""
     repo = repo.unfiltered()


More information about the Mercurial-devel mailing list