git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: SZEDER GáborNext: Junio C Hamano
Message 4 of 10 in “git-p4: unshelving: fix problem with newer P4”
  1. 0/1 git-p4: unshelving: fix problem with newer P4Luke Diamand, May 22, 2018
  2. 1/1 git-p4: unshelve: use action==add instead of rev==noneLuke Diamand, May 22, 2018
  3. SZEDER GáborMay 22, 2018
  4. Luke DiamandMay 22, 2018
  5. Junio C HamanoMay 23, 2018
  6. 0/1 git-p4: unshelve: fix problem with newer p4dLuke Diamand, May 23, 2018
  7. 1/1 git-p4: add unshelve commandLuke Diamand, May 23, 2018
  8. Mazo, AndreyMay 23, 2018
  9. Luke DiamandMay 23, 2018
  10. Mazo, AndreyMay 23, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.