Patchwork [evolve-ext] evolve: remove _picknexttroubled

login
register
mail settings
Submitter Laurent Charignon
Date June 22, 2015, 7:45 p.m.
Message ID <70fec53eb3512c07a982.1435002358@lcharignon-mbp.local>
Download mbox | patch
Permalink /patch/9749/
State Accepted
Headers show

Comments

Laurent Charignon - June 22, 2015, 7:45 p.m.
# HG changeset patch
# User Laurent Charignon <lcharignon@fb.com>
# Date 1434761268 25200
#      Fri Jun 19 17:47:48 2015 -0700
# Node ID 70fec53eb3512c07a982de40519c1ae789ddf4c8
# Parent  8794a4680bdd78fe9e452611797f9b018fc031df
evolve: remove _picknexttroubled

This function was not used anymore after the recent refactoring.
Pierre-Yves David - June 22, 2015, 10:16 p.m.
On 06/22/2015 12:45 PM, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon@fb.com>
> # Date 1434761268 25200
> #      Fri Jun 19 17:47:48 2015 -0700
> # Node ID 70fec53eb3512c07a982de40519c1ae789ddf4c8
> # Parent  8794a4680bdd78fe9e452611797f9b018fc031df
> evolve: remove _picknexttroubled

This is already in evolve repo.

Patch

diff --git a/hgext/evolve.py b/hgext/evolve.py
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -1548,25 +1548,6 @@  def evolve(ui, repo, **opts):
     progresscb()
     _cleanup(ui, repo, startnode, showprogress)
 
-def _picknexttroubled(ui, repo, category, pickany=False, progresscb=None):
-    """Pick a the next trouble changeset to solve"""
-    if progresscb: progresscb()
-    tro = _stabilizableunstable(repo, repo['.'])
-    if tro is None:
-        wdp = repo['.']
-        if 'divergent' in wdp.troubles():
-            tro = wdp
-    if tro is None and pickany:
-        troubled = list(repo.set('unstable()'))
-        if not troubled:
-            troubled = list(repo.set('bumped()'))
-        if not troubled:
-            troubled = list(repo.set('divergent()'))
-        if troubled:
-            tro = troubled[0]
-
-    return tro
-
 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