[PATCH 1 of 6] tests: remove third head in some of the 'rebase-parameters' tests

Martin von Zweigbergk martinvonz at google.com
Fri Feb 12 14:04:08 EST 2016


On Fri, Feb 12, 2016 at 10:59 AM, Pierre-Yves David
<pierre-yves.david at ens-lyon.org> wrote:
>
>
> On 02/12/2016 06:50 PM, Martin von Zweigbergk wrote:
>>
>> On Fri, Feb 12, 2016 at 6:29 AM, Pierre-Yves David
>> <pierre-yves.david at ens-lyon.org> wrote:
>>>
>>> # HG changeset patch
>>> # User Pierre-Yves David <pierre-yves.david at fb.com>
>>> # Date 1454936573 -3600
>>> #      Mon Feb 08 14:02:53 2016 +0100
>>> # Node ID cfc73d7c8a99b39b93f118ec1a147c76fa90da80
>>> # Parent  3b2b0b5035d768a77a7362c4150d4242d1ccdbe5
>>> # EXP-Topic destination
>>> # Available At http://hg.netv6.net/marmoute-wip/mercurial/
>>> #              hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r
>>> cfc73d7c8a99
>>> tests: remove third head in some of the 'rebase-parameters' tests
>>>
>>> These tests do not care about that extra branch at all. In future
>>> changeset we
>>> will make rebase behave like merge and abort in case of an ambiguous
>>> destination
>>> (eg: multiple other heads) and that extra branch will make the command
>>> invocation breaks.
>>>
>>> We preventively remove this extra branch from the relevant tests in an
>>> independant changeset to reduce noise and increase confidence in the
>>> final
>>> change.
>>>
>>> diff --git a/tests/test-rebase-parameters.t
>>> b/tests/test-rebase-parameters.t
>>> --- a/tests/test-rebase-parameters.t
>>> +++ b/tests/test-rebase-parameters.t
>>> @@ -44,10 +44,15 @@
>>>     |/
>>>     o  0: 'A'
>>>
>>>     $ cd ..
>>>
>>> +Version with only two heads (to allow default destination to work)
>>> +
>>> +  $ hg clone -q -u . a a2heads
>>> +  $ hg -R a2heads --config extensions.strip= strip 4::
>>> +  saved backup bundle to
>>> $TESTTMP/a2heads/.hg/strip-backup/9520eea781bc-fcd8edd4-backup.hg (glob)

I'll replace these few lines by by "hg clone -q -u . a a2heads -r 3 -r
8"  in flight.

>>>
>>>   These fail:
>>>
>>>     $ hg clone -q -u . a a1
>>>     $ cd a1
>>> @@ -115,35 +120,34 @@ These fail:
>>>
>>>   These work:
>>>
>>>   Rebase with no arguments (from 3 onto 8):
>>>
>>> +  $ cd ..
>>> +  $ hg clone -q -u . a2heads a1.
>>
>>
>> At first I thought the clone here was misleading since it clones into
>> the same repo, but then I saw the '.' in the name. I'll rename
>> (a1,a1.) to (a0,a1) if you don't mind. Or do you think it's safer that
>> I queue patches 3-6 and you resend 1-2? Or I'm just too nitpicky?
>
>
> I can push an updated version if you want to.

I've already changed it, and the following tests seem strict enough
that I think my fix is safe (and won't break your upcoming patch).
Thanks for the offer, though.


More information about the Mercurial-devel mailing list