[PATCH] discovery: explicitly check for None in outgoing init

Ryan McElroy rm at fb.com
Tue Sep 6 12:38:09 EDT 2016


On 9/6/2016 2:04 PM, Pierre-Yves David wrote:
>
>
> On 09/06/2016 02:35 PM, Ryan McElroy wrote:
>> # HG changeset patch
>> # User Ryan McElroy <rmcelroy at fb.com>
>> # Date 1473164309 25200
>> #      Tue Sep 06 05:18:29 2016 -0700
>> # Node ID d477c6241411af4dfc198fa779bcb7e3302efcc0
>> # Parent  f148bfa40489269be2e48046734f81065129847a
>> discovery: explicitly check for None in outgoing init
>>
>> f09d0004481c introduced default params for discovery.outgoing(), but 
>> it used a
>> falsy check instead of an explicit check for None. The result is that 
>> callers
>> that passed in an empty list would have that list overridden by the 
>> defaults,
>> which is not the expected behavior.
>
> I would be delighted to agree with your but, Mercurial own test seems 
> to disagree ;-)
>
> Failed test-push-cgi.t: output changed
> Failed test-journal-exists.t: output changed
> Failed test-bundle-vs-outgoing.t: output changed
> Failed test-mq-pull-from-bundle.t: output changed
> Failed test-bundle2-format.t: output changed
> Failed test-bundle2-remote-changegroup.t: output changed
> Failed test-bundle-r.t: output changed
> Failed test-bundle.t: output changed
> Failed test-commit-interactive.t: output changed
> Failed test-phases-exchange.t: output changed
> Failed test-censor.t: output changed
> Failed test-keyword.t: output changed and returned error code 1
> Failed test-mq.t: output changed
>
>> This was discovered by changes to the test-pushrebase.t test in 
>> Facebook's
>> repository of mercurial extensions.
>
> Mercurial test suite deserve love too :-)
>
Forgetting to run the core tests -- how embarrassing! Mateusz helped me 
track down the root cause of the issue; v2 incoming soon.



More information about the Mercurial-devel mailing list