Patchwork [2,of,8] bisect: rename 'check_code' to match our naming scheme

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 9, 2016, 8:57 a.m.
Message ID <eb87c5e0831476b6163d.1476003456@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/16974/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

Pierre-Yves David - Oct. 9, 2016, 8:57 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1475977855 -7200
#      Sun Oct 09 03:50:55 2016 +0200
# Node ID eb87c5e0831476b6163dd480ae9efca98156bfa1
# Parent  f5c9ba11ffa8baef1c8c0d270094fd96be68b856
# EXP-Topic bisect
bisect: rename 'check_code' to match our naming scheme

We need to to it early, otherwise 'check-commit' will complains every time we
touch it.
timeless - Oct. 21, 2016, 1:16 p.m.
Pierre-Yves David wrote:
> bisect: rename 'check_code' to match our naming scheme

I think you mean check_state ;-)

> -    def check_state(state, interactive=True):
> +    def checkstate(state, interactive=True):

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -835,7 +835,7 @@  def bisect(ui, repo, rev=None, extra=Non
 
     Returns 0 on success.
     """
-    def check_state(state, interactive=True):
+    def checkstate(state, interactive=True):
         if not state['good'] or not state['bad']:
             if (good or bad or skip or reset) and interactive:
                 return
@@ -913,7 +913,7 @@  def bisect(ui, repo, rev=None, extra=Non
                 rev = None # clear for future iterations
                 state[transition].append(ctx.node())
                 ui.status(_('changeset %d:%s: %s\n') % (ctx, ctx, transition))
-                check_state(state, interactive=False)
+                checkstate(state, interactive=False)
                 # bisect
                 nodes, changesets, bgood = hbisect.bisect(repo.changelog, state)
                 # update to next check
@@ -928,7 +928,7 @@  def bisect(ui, repo, rev=None, extra=Non
         hbisect.printresult(ui, repo, state, displayer, nodes, bgood)
         return
 
-    if not check_state(state):
+    if not checkstate(state):
         return
 
     # actually bisect