Patchwork [6,of,8,V2] obsolete: delete three unused utility functions

login
register
mail settings
Submitter Pierre-Yves David
Date June 28, 2017, 9:21 p.m.
Message ID <3c886efd86fd9ddfba0e.1498684917@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21819/
State Accepted
Headers show

Comments

Pierre-Yves David - June 28, 2017, 9:21 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1498520921 -7200
#      Tue Jun 27 01:48:41 2017 +0200
# Node ID 3c886efd86fd9ddfba0e3cbc3cdff128c5712f8d
# Parent  754eb75d32e7fa744d9319b8e0f01005fe9fb6f3
# EXP-Topic obsutil
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 3c886efd86fd
obsolete: delete three unused utility functions

None of this function has been used in the past 5 years, so I think it is safe
to just kill them. All code accessing rich markers is using 'getmarkers(...)'
instead (or raw markers).

Patch

diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -853,22 +853,6 @@  def getmarkers(repo, nodes=None, exclusi
     for markerdata in rawmarkers:
         yield marker(repo, markerdata)
 
-def relevantmarkers(repo, node):
-    """all obsolete markers relevant to some revision"""
-    for markerdata in repo.obsstore.relevantmarkers(node):
-        yield marker(repo, markerdata)
-
-
-def precursormarkers(ctx):
-    """obsolete marker marking this changeset as a successors"""
-    for data in ctx.repo().obsstore.precursors.get(ctx.node(), ()):
-        yield marker(ctx.repo(), data)
-
-def successormarkers(ctx):
-    """obsolete marker making this changeset obsolete"""
-    for data in ctx.repo().obsstore.successors.get(ctx.node(), ()):
-        yield marker(ctx.repo(), data)
-
 # keep compatibility for the 4.3 cycle
 def allprecursors(obsstore, nodes, ignoreflags=0):
     movemsg = 'obsolete.allprecursors moved to obsutil.allprecursors'