Patchwork [4,of,4,evolve-ext] evolve: remove unused function _stabilizableunstable

login
register
mail settings
Submitter Laurent Charignon
Date June 22, 2015, 10:42 p.m.
Message ID <fc53dc3f81a7fbe9836c.1435012923@lcharignon-mbp.local>
Download mbox | patch
Permalink /patch/9756/
State Changes Requested
Delegated to: Pierre-Yves David
Headers show

Comments

Laurent Charignon - June 22, 2015, 10:42 p.m.
# HG changeset patch
# User Laurent Charignon <lcharignon@fb.com>
# Date 1435010578 25200
#      Mon Jun 22 15:02:58 2015 -0700
# Node ID fc53dc3f81a7fbe9836c710f9733b91706bfb3aa
# Parent  c64696fe12b20a96db8fccf94b18d62bddca20b3
evolve: remove unused function _stabilizableunstable

With the rework of hg evolve with no argument, this function is no longer
needed.

Patch

diff --git a/hgext/evolve.py b/hgext/evolve.py
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -1641,30 +1641,6 @@  def evolve(ui, repo, **opts):
     progresscb()
     _cleanup(ui, repo, startnode, showprogress)
 
-def _stabilizableunstable(repo, pctx):
-    """Return a changectx for an unstable changeset which can be
-    stabilized on top of pctx or one of its descendants. None if none
-    can be found.
-    """
-    def selfanddescendants(repo, pctx):
-        yield pctx
-        for prec in repo.set('allprecursors(%d)', pctx):
-            yield prec
-        for ctx in pctx.descendants():
-            yield ctx
-            for prec in repo.set('allprecursors(%d)', ctx):
-                yield prec
-
-    # Look for an unstable which can be stabilized as a child of
-    # node. The unstable must be a child of one of node predecessors.
-    directdesc = set([pctx.rev()])
-    for ctx in selfanddescendants(repo, pctx):
-        for child in ctx.children():
-            if ctx.rev() in directdesc and not child.obsolete():
-                directdesc.add(child.rev())
-            elif child.unstable():
-                return child
-    return None
 
 def _solveunstable(ui, repo, orig, dryrun=False, confirm=False,
                    progresscb=None):