git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ivan Selin <ivan.selin@toptal.com>
Cc: Luke Diamand <luke@diamand.org>, Git Users <git@vger.kernel.org>
Subject: Re: git-p4 cannot use perforce client created by p4java — "Expected view key View1 missing"
Date: Fri, 31 Jan 2020 10:15:40 -0800	[thread overview]
Message-ID: <xmqqa763bigj.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CAE5ih79xWfjLC48y=mSLhdG2zVR5d-XeAbJJFV2SPTew5FGf+Q@mail.gmail.com> (Luke Diamand's message of "Fri, 31 Jan 2020 15:52:08 +0000")

Luke Diamand <luke@diamand.org> writes:

> 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) ]

      reply	other threads:[~2020-01-31 18:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07 15:53 git-p4 cannot use perforce client created by p4java — "Expected view key View1 missing" Ivan Selin
2020-01-29 10:35 ` Luke Diamand
2020-01-31 13:42   ` Ivan Selin
2020-01-31 15:52     ` Luke Diamand
2020-01-31 18:15       ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqa763bigj.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=ivan.selin@toptal.com \
    --cc=luke@diamand.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).