[PATCH 6 of 8] bisect: factor commonly update sequence
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Mon Oct 10 02:32:30 UTC 2016
On 10/09/2016 10:40 PM, Yuya Nishihara wrote:
> On Sun, 09 Oct 2016 10:57:40 +0200, Pierre-Yves David wrote:
>> # HG changeset patch
>> # User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
>> # Date 1472007886 -7200
>> # Wed Aug 24 05:04:46 2016 +0200
>> # Node ID eb7d02debaf5ed831f12b509f4175ebb0cd40143
>> # Parent 45469b6da789e8d07251c49f41cfef45fc3eba3b
>> # EXP-Topic bisect
>> bisect: factor commonly update sequence
>>
>> For now, This remains a closure in the module to avoid circular import with used
>> module.
>>
>> diff --git a/mercurial/commands.py b/mercurial/commands.py
>> --- a/mercurial/commands.py
>> +++ b/mercurial/commands.py
>> @@ -872,6 +872,13 @@ def bisect(ui, repo, rev=None, extra=Non
>> if not (state['good'] and state['bad']):
>> return
>>
>> + def mayupdate(repo, node, show_stats=True):
>> + """common used update sequence"""
>> + if noupdate:
>> + return
>> + cmdutil.bailifchanged(repo)
>> + return hg.clean(repo, node, show_stats=show_stats)
>
>> if changesets == 0:
>> @@ -954,9 +956,7 @@ def bisect(ui, repo, rev=None, extra=Non
>> % (rev, short(node), changesets, tests))
>> state['current'] = [node]
>> hbisect.save_state(repo, state)
>> - if not noupdate:
>> - cmdutil.bailifchanged(repo)
>> - return hg.clean(repo, node)
>> + mayupdate(repo, node)
>
> Missed return value.
>
> Other than that, the patch 1-7 look good to me. Should I fix that in flight?
Good catch, if you can fix it in flight, that would be great. (I can
reset from patch 6 if that is easier for you)
Cheers,
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list