Patchwork [1,of,2] revset: drop support for posttreebuilthook() (API)

login
register
mail settings
Submitter Yuya Nishihara
Date April 14, 2018, 4:20 a.m.
Message ID <2536edebfeac00856d89.1523679656@mimosa>
Download mbox | patch
Permalink /patch/30960/
State Accepted
Headers show

Comments

Yuya Nishihara - April 14, 2018, 4:20 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1523677480 -32400
#      Sat Apr 14 12:44:40 2018 +0900
# Node ID 2536edebfeac00856d892847e1afea414ad3a985
# Parent  775ad61e04e28c49c78c7936d88826a3df024781
revset: drop support for posttreebuilthook() (API)

AFAIK, the only user was the directaccess extension, which is in core now.

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -2166,10 +2166,6 @@  methods = {
     "parentpost": parentpost,
 }
 
-def posttreebuilthook(tree, repo):
-    # hook for extensions to execute code on the optimized tree
-    pass
-
 def lookupfn(repo):
     return lambda symbol: scmutil.isrevsymbol(repo, symbol)
 
@@ -2211,7 +2207,6 @@  def matchany(ui, specs, repo=None, local
     tree = revsetlang.foldconcat(tree)
     tree = revsetlang.analyze(tree)
     tree = revsetlang.optimize(tree)
-    posttreebuilthook(tree, repo)
     return makematcher(tree)
 
 def makematcher(tree):