Patchwork [06,of,10] bookmark: drop deletedivergent

login
register
mail settings
Submitter Boris Feld
Date July 15, 2017, 11:42 a.m.
Message ID <d8f4f481d22c4fd4b606.1500118974@FB>
Download mbox | patch
Permalink /patch/22399/
State Accepted
Headers show

Comments

Boris Feld - July 15, 2017, 11:42 a.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1499709975 -7200
#      Mon Jul 10 20:06:15 2017 +0200
# Node ID d8f4f481d22c4fd4b606c2635c9b2f0fada67e8c
# Parent  3c70ad3b3daaeb8b2386b9d8760ac69e6dce0ecc
# EXP-Topic tr.changes.bookmarks
bookmark: drop deletedivergent

It has no caller anymore.

Patch

diff -r 3c70ad3b3daa -r d8f4f481d22c mercurial/bookmarks.py
--- a/mercurial/bookmarks.py	Mon Jul 10 20:02:32 2017 +0200
+++ b/mercurial/bookmarks.py	Mon Jul 10 20:06:15 2017 +0200
@@ -292,16 +292,6 @@ 
     parents = [p.node() for p in repo[None].parents()]
     return (mark in marks and marks[mark] in parents)
 
-def deletedivergent(repo, deletefrom, bm):
-    '''Delete divergent versions of bm on nodes in deletefrom.
-
-    Return True if at least one bookmark was deleted, False otherwise.'''
-    bms = divergent2delete(repo, deletefrom, bm)
-    marks = repo._bookmarks
-    for b in bms:
-        del marks[b]
-    return bool(bms)
-
 def divergent2delete(repo, deletefrom, bm):
     """find divergent versions of bm on nodes in deletefrom.