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

Re: git-p4 cannot use perforce client created by p4java — "Expected view key View1 missing"

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 31, 2020, 18:15 UTC
Message-ID
<xmqqa763bigj.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CAE5ih79xWfjLC48y=mSLhdG2zVR5d-XeAbJJFV2SPTew5FGf+Q@mail.gmail.com>
Luke Diamand <luke@diamand.org> writes:
Show 13 quoted lines
> On Fri, 31 Jan 2020 at 13:43, Ivan Selin <ivan.selin@toptal.com> wrote:
>>
>> Yes, that's exactly the way that I've tried it and it worked for me.
>> Can we have that integrated into git-p4? What can I do to make it
>> happen?
>
> A patch would be very welcome!
>
> See Documentation/SubmittingPatches for details, but it's likely
> enough to just make the change, and then use git format-patch and git
> send-email.
>
> Please ensure you add a "Signed-off-by" (git commit -s).

Thanks for helping. Another area a new person struggles is to propose a good commit log message. I'd expect this change to be explained something like this:

    Subject: git-p4: tighten detection of view names
    The current "git p4" code expects that all keys starting with
    "View" are view names (i.e. "View0", "View1", etc.), but a
    Perforce client created using p4java gets an extra key
    "ViewDepotType", which is not something we want to be treated as
    a view key.
    Tighten the filter of keys to accept only string "View" followed
    by nothing but digits.
    Helped-by: Luke Diamand <luke@diamand.org>
    Signed-off-by: ...

Note that I am not a Perforce person, so the phrase "view names" I used in the above may totally be wrong as P4-lingo, in which case please replace them with what is acceptable by our Perforce friends ;-)

Thanks.
>> ...
>> > is_view = re.compile(r'^View\d+$')
>> > view_keys = [ k for k in entry.keys() if is_view.match(k) ]
Previous: Luke Diamand
Message 5 of 5 in “git-p4 cannot use perforce client created by p4java — "Expected view key View1 missing"”
  1. Ivan SelinJan 7, 2020
  2. Luke DiamandJan 29, 2020
  3. Ivan SelinJan 31, 2020
  4. Luke DiamandJan 31, 2020
  5. Junio C HamanoJan 31, 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.