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

Re: [PATCH v3] git-p4: recover from inconsistent perforce history

From
Junio C Hamano <gitster@pobox.com>
Date
May 10, 2020, 17:01 UTC
Message-ID
<xmqqsgg7u3js.fsf@gitster.c.googlers.com>
In-Reply-To
<CAE5ih793qKyOSE-hkOw7+nFmM3XTRxxrXv0FD2+WWXjGbVHkoQ@mail.gmail.com>
Luke Diamand <luke@diamand.org> writes:
Show 20 quoted lines
> On Sun, 10 May 2020 at 11:17, Andrew Oakley <andrew@adoakley.name> wrote:
>>
>> Perforce allows you commit files and directories with the same name, so
>> you could have files //depot/foo and //depot/foo/bar both checked in.  A
>> p4 sync of a repository in this state fails.  Deleting one of the files
>> recovers the repository.
>>
>> When this happens we want git-p4 to recover in the same way as perforce.
>
> Looks good to me.
>
> Perforce changed their server to reject this kind of thing in the
> 2017.1 version:
>
>     Bugs fixed in 2017.1
>     #1489051 (Job #2170) **
>        Submitting a file with the same name as an existing depot
>        directory path (or vice versa) will now be rejected.
>
> (Of course people will still have damaged repos even today).
Perhaps it is worth describing the above in the log message?  E.g.
    Perforce allows you commit files and directories with the same name,
    so you could have files //depot/foo and //depot/foo/bar both checked
    in.  A p4 sync of a repository in this state fails.  Deleting one of
    the files recovers the repository.
    When this happens we want git-p4 to recover in the same way as
    perforce.
    Note that Perforce has this change in their 2017.1 version:
         Bugs fixed in 2017.1
         #1489051 (Job #2170) **
            Submitting a file with the same name as an existing depot
            directory path (or vice versa) will now be rejected.
    so people hopefully will not creating damaged Perforce repos
    anymore, but "git p4" needs to be able to interact with already
    corrupt ones.
    Signed-off-by: Andrew Oakley <andrew@adoakley.name>
    Reviewed-by: Luke Diamand <luke@diamand.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thanks.
Previous: Andrew Oakley
Message 4 of 4 in “git-p4: recover from inconsistent perforce history”
  1. git-p4: recover from inconsistent perforce historyAndrew Oakley, May 10, 2020
  2. Luke DiamandMay 10, 2020
  3. Andrew OakleyMay 10, 2020
  4. Junio C HamanoMay 10, 2020

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.