[PATCH 1 of 2 evolve-ext] evolve: adding test case for calling split without -r argument
Laurent Charignon
lcharignon at fb.com
Fri Jan 29 13:42:23 CST 2016
> On Jan 29, 2016, at 11:40 AM, Laurent Charignon <lcharignon at fb.com> wrote:
>
>>
>> On Jan 29, 2016, at 9:05 AM, Kostia Balytskyi <ikostia at fb.com> wrote:
>>
>> # HG changeset patch
>> # User Kostia Balytskyi <ikostia at fb.com>
>> # Date 1454086569 28800
>> # Fri Jan 29 08:56:09 2016 -0800
>> # Node ID 817cf1e8333856dd21b2886a61acef90e2151a7b
>> # Parent 983f2e4dbe5d4d97d6ca82f6679913d75c1f2577
>> evolve: adding test case for calling split without -r argument
>>
>> Currently, if one runs `hg split .` or `hg split`, it will fail
>> with an exception. This happens becuase we only expect revision
>> args to be passed as --rev/-r ones and don't treat unnamed args
>> properly or add default values if no args are provided.
>>
>> This test fails without the following commit and demonstrates
>> this bug.
Does this mean that this revision does not pass the test?
If so, could you swap the order of the patches or fold them?
Thanks,
Laurent
>>
>> diff --git a/tests/test-split.t b/tests/test-split.t
>> --- a/tests/test-split.t
>> +++ b/tests/test-split.t
>> @@ -335,4 +335,34 @@
>> abort: cannot split commit: ced8fbcce3a7 not a head
>> [255]
>>
>> +Changing evolution level to createmarkers
>> + $ echo "[experimental]" >> $HGRCPATH
>> + $ echo "evolution=createmarkers" >> $HGRCPATH
>>
>> +Running split without any revision
>
> Can you add the expectation: "Running split without any revision operates on the parent of the working copy"?
>
>
>> + $ hg split << EOF
>> + > q
>> + > EOF
>> + (leaving bookmark bookB)
>> + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
>> + adding _d
>> + diff --git a/_d b/_d
>> + new file mode 100644
>> + examine changes to '_d'? [Ynesfdaq?] q
>> +
>> + abort: user quit
>> + [255]
>
> That seems to show another bug, do we get back to bookB?
>
>> +
>> +Running split with tip revision, specified as unnamed argument
>> + $ hg split . << EOF
>> + > q
>> + > EOF
>> + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
>> + adding _d
>> + diff --git a/_d b/_d
>> + new file mode 100644
>> + examine changes to '_d'? [Ynesfdaq?] q
>> +
>> + abort: user quit
>> + [255]
>> +
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel at selenic.com
>> https://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list