Re: [PATCH 1/1] git-p4: unshelve: use action==add instead of rev==none
- From
Luke Diamand <luke@diamand.org>
- Date
- May 22, 2018, 13:02 UTC
- Message-ID
- <CAE5ih79_Ai8F48zFpJ09e8saGrySoiyVdsgkk8ZpRrQAd15a4g@mail.gmail.com>
- In-Reply-To
- <CAM0VKjkdGByfTtj5cunUzqeneu4Bi8Qw4vj428zV1h3ezHXyQg@mail.gmail.com>
On 22 May 2018 at 11:15, SZEDER Gábor <szeder.dev@gmail.com> wrote:
Show 31 quoted lines
> On Tue, May 22, 2018 at 10:41 AM, Luke Diamand <luke@diamand.org> wrote:
>> SZEDER Gábor found that the unshelve tests fail with newer
>> versions of Perforce (2016 vs 2015).
>>
>> The problem arises because when a file is added in a P4
>> shelved changelist, the depot revision is shown as "none"
>> if using the older p4d (which makes sense - the file doesn't
>> yet exist, so can't have a revision), but as "1" in the newer
>> versions of p4d.
>>
>> For example, adding a file called "new" with 2015.1 and then
>> shelving that change gives this from "p4 describe" :
>>
>> ... //depot/new#none add
>>
>> Using the 2018.1 server gives this:
>>
>> ... //depot/new#1 add
>>
>> We can detect that a file has been added simply by using the
>> file status ("add") instead, rather than the depot revision,
>> which is what this change does.
>>
>> This also fixes a few verbose prints used for debugging this
>> to be more friendly.
>>
>> Signed-off-by: Luke Diamand <luke@diamand.org>
>
> For what it's worth, I can confirm that 't9832-unshelve.sh' passes
> with these changes, here and in all Linux and OSX build jobs on Travis
> CI.Thanks!
> > However, instead of a separate patch, wouldn't it be better to squash > it into the previous one? So 'make test' would succeed on every > commit even with a newer p4 version.
Junio?
I can squash together the original commit and the two fixes if that would be better?
Thanks! Luke