Re: [PATCH] git-p4: changelist template with p4 -G change -o
- From
miguel torroja <miguel.torroja@gmail.com>
- Date
- Jun 24, 2017, 12:38 UTC
- Message-ID
- <CAKYtbVbMKgPASP-ib7DSbDONnV988woV_=zU=XPwaMpWE=TqGQ@mail.gmail.com>
- In-Reply-To
- <CAE5ih78YFSjcn6RNGzdxsjvn6B7xvHMgKKRqirjW00=9hWpDYA@mail.gmail.com>
You are right about the "# add"comment. I couldn't find any extra info in the marshaled output that I can use to add the change action comment after the path. That's one downside of that change.
On Sat, Jun 24, 2017 at 1:49 PM, Luke Diamand <luke@diamand.org> wrote:
Show 30 quoted lines
> 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
>
> Luke