git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: miguel torroja <miguel.torroja@gmail.com>
To: Lars Schneider <larsxschneider@gmail.com>
Cc: "Junio C Hamano (Gitster)" <gitster@pobox.com>,
	Git Users <git@vger.kernel.org>, Luke Diamand <luke@diamand.org>
Subject: Re: [PATCH] git-p4: changelist template with p4 -G change -o
Date: Tue, 27 Jun 2017 11:20:22 +0200	[thread overview]
Message-ID: <CAKYtbVY_=aMjcS=r2YyhcxKiUAaJUJA=OELTvXfau4GGz7Lz4Q@mail.gmail.com> (raw)
In-Reply-To: <CAKYtbVbGekXGAyPd7HeLot_MdZkp7-1Ss-iAi7o8ze2b+sNB6Q@mail.gmail.com>

Hi Lars/Luke,

I tried a first test extending t9807-git-p4-submit.sh. I set this p4
trigger: 'p4test command pre-user-change "echo verbose trigger" '. I'm
able to reproduce the issue I wanted to fix. However I found yet
another issue, in this case when reading the result from
p4_read_pipe_lines (in function p4ChangesForPaths), the
pre-user-change is triggered with any "p4 change" and "p4 changes"
command (the p4 server we have in production, only shows "extra"
messages with p4 change).
   I'll collapse in one single commit the fix for p4 change/p4 changes
and the new test.

Thanks,

Miguel

On Sat, Jun 24, 2017 at 10:37 PM, miguel torroja
<miguel.torroja@gmail.com> wrote:
> Hi Lars,
>
> I think it's doable to set a custom p4 trigger, created by the test case,
> that outputs "extra info" when requesting a changelist description.
> I'll do a specific test and post it to this thread.
>
>
> Thanks,
>
>
> El 24 jun. 2017 7:36 p. m., "Lars Schneider" <larsxschneider@gmail.com>
> escribió:
>
>
>> On 24 Jun 2017, at 13:49, Luke Diamand <luke@diamand.org> wrote:
>>
>> On 22 June 2017 at 18:32, Junio C Hamano <gitster@pobox.com> wrote:
>>> Miguel Torroja <miguel.torroja@gmail.com> writes:
>>>
>>>> The option -G of p4 (python marshal output) gives more context about the
>>>> data being output. That's useful when using the command "change -o" as
>>>> we can distinguish between warning/error line and real change
>>>> description.
>>>>
>>>> Some p4 plugin/hooks in the server side generates some warnings when
>>>> executed. Unfortunately those messages are mixed with the output of
>>>> "p4 change -o". Those extra warning lines are reported as
>>>> {'code':'info'}
>>>> in python marshal output (-G). The real change output is reported as
>>>> {'code':'stat'}
>>
>> I think this seems like a reasonable thing to do if "p4 change -o" is
>> jumbling up output.
>>
>> One thing I notice trying it out by hand is that we seem to have lost
>> the annotation of the Perforce per-file modification type (is there a
>> proper name for this?).
>>
>> For example, if I add a file called "baz", then the original version
>> creates a template which looks like this:
>>
>>   //depot/baz    # add
>>
>> But the new one creates a template which looks like:
>>
>>   //depot/baz
>
> @Miguel: You wrote that p4 plugins/hooks generate these warnings.
> I wonder if you see a way to replicate that in a test case. Either
> in t9800 or a new t98XX test case file?
>
> - Lars
>
>

  parent reply	other threads:[~2017-06-27  9:20 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-20 12:19 [PATCH] git-p4: changelist template with p4 -G change -o Miguel Torroja
2017-06-22 17:32 ` Junio C Hamano
2017-06-24 11:49   ` Luke Diamand
2017-06-24 12:38     ` miguel torroja
2017-06-24 17:36     ` Lars Schneider
     [not found]       ` <CAKYtbVbGekXGAyPd7HeLot_MdZkp7-1Ss-iAi7o8ze2b+sNB6Q@mail.gmail.com>
2017-06-27  9:20         ` miguel torroja [this message]
2017-06-27 19:17           ` [PATCH] git-p4: parse marshal output "p4 -G" in p4 changes Miguel Torroja
2017-06-28  4:08             ` Junio C Hamano
2017-06-28  9:54               ` Luke Diamand
2017-06-28 13:14                 ` miguel torroja
     [not found]                   ` <CAE5ih7-x45MD1H6Ahr5oCVtTjgbBkeP4GbKCGB-Cwk6BSQwTcw@mail.gmail.com>
2017-06-29 22:41                     ` miguel torroja
2017-06-30  7:56                       ` Luke Diamand
2017-06-30  8:22                         ` miguel torroja
2017-06-29 22:46                     ` Miguel Torroja
2017-06-30  8:26                       ` Lars Schneider
2017-06-30  9:41                         ` Miguel Torroja
2017-06-30 10:13                           ` Lars Schneider
2017-06-30 16:02                             ` Miguel Torroja
2017-07-03 22:53                               ` Miguel Torroja
2017-07-03 22:57                             ` Miguel Torroja
2017-07-11  8:35                               ` Luke Diamand
2017-07-11 22:35                                 ` Miguel Torroja
2017-07-11 22:53                                 ` Miguel Torroja
2017-07-12  8:25                                   ` Luke Diamand
2017-07-12 10:16                                     ` Miguel Torroja
2017-07-12 17:13                                       ` Junio C Hamano
2017-07-13  7:00                                         ` [PATCH 1/3] git-p4: git-p4 tests with p4 triggers Miguel Torroja
2017-07-13  7:00                                           ` [PATCH 2/3] git-p4: parse marshal output "p4 -G" in p4 changes Miguel Torroja
2017-07-13  7:00                                           ` [PATCH 3/3] git-p4: filter for {'code':'info'} in p4CmdList Miguel Torroja
2017-07-13  7:12                                         ` [PATCH] git-p4: parse marshal output "p4 -G" in p4 changes Miguel Torroja
2017-07-13 19:30                                           ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to='CAKYtbVY_=aMjcS=r2YyhcxKiUAaJUJA=OELTvXfau4GGz7Lz4Q@mail.gmail.com' \
    --to=miguel.torroja@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=larsxschneider@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).