[PATCH 15 of 15] exchange: drop unused '_getbookmarks' function

Boris Feld boris.feld at octobus.net
Wed Oct 18 12:10:07 EDT 2017


# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1508248540 -7200
#      Tue Oct 17 15:55:40 2017 +0200
# Node ID 97d1eb1f0bbc4bfd52ab0e646845dddc51b713f1
# Parent  dc8ceafa0dfe3e47232047fef28500848c7763b6
# EXP-Topic b2.bookmarks
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 97d1eb1f0bbc
exchange: drop unused '_getbookmarks' function

The function was introduced in 8491845a75b2 in mid-November 2016 but is never
used anywhere in core. Binary support for bookmarks has now landed in core and
the getbundle API makes it easy to override it. So we just remove the dead
(unborn?) code.

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -1872,17 +1872,6 @@
     outgoing = _computeoutgoing(repo, heads, common)
     bundle2.addparttagsfnodescache(repo, bundler, outgoing)
 
-def _getbookmarks(repo, **kwargs):
-    """Returns bookmark to node mapping.
-
-    This function is primarily used to generate `bookmarks` bundle2 part.
-    It is a separate function in order to make it easy to wrap it
-    in extensions. Passing `kwargs` to the function makes it easy to
-    add new parameters in extensions.
-    """
-
-    return dict(bookmod.listbinbookmarks(repo))
-
 def check_heads(repo, their_heads, context):
     """check if the heads of a repo have been modified
 


More information about the Mercurial-devel mailing list