[PATCH 2 of 5 V2] graphlog: add a way to test the 'groupbranchiter' function

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Dec 8 14:25:42 CST 2014



On 12/08/2014 12:15 PM, Augie Fackler wrote:
> On Tue, Dec 02, 2014 at 09:29:23AM -0800, Pierre-Yves David wrote:
>> # HG changeset patch
>> # User Pierre-Yves David <pierre-yves.david at fb.com>
>> # Date 1415986679 0
>> #      Fri Nov 14 17:37:59 2014 +0000
>> # Node ID cd61890c0066b48b428c8b089c9129e952b88c73
>> # Parent  d99276796fabf9c8a8cf762d7b0d0927c4560dd4
>> graphlog: add a way to test the 'groupbranchiter' function
>>
>> We add an experimental config option to use the topological sorting. I first
>> tried to hook the 'groupbranchiter' function in the 'sort' revset but this was useless
>> because graphlog enforce revision number sorting :(
>>
>> As the goal is to advance on the topological iteration logic, I see this
>> experimental option as a good way to move forward.
>>
>> We have to use turn the iterator into a list because the graphlog is apparently
>> not ready for pure iterator input yet.
>>
>> diff --git a/mercurial/graphmod.py b/mercurial/graphmod.py
>> --- a/mercurial/graphmod.py
>> +++ b/mercurial/graphmod.py
>> @@ -197,10 +197,13 @@ def dagwalker(repo, revs):
>>
>>       cl = repo.changelog
>>       lowestrev = revs.min()
>>       gpcache = {}
>>
>> +    if repo.ui.configbool('experimental', 'graph-topological', False):
>
> Really really sorry I didn't notice this in an earlier round. Can we
> rename this too? Perhaps "graph-group-branches" or similar?

I though I cleaned it up but apparently failed.

> (Happy to do this as a followup if you'd like - just want consensus on
> the name of this shed.)

Go for it.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list