[p4] manipulating changelists with sed
Andy Finkenstadt
andyf at simutronics.com
Sun Oct 22 07:37:10 PDT 2006
I haven't done what you have done yet from a script, but when I edit
changelist commentaries, I need to have 'admin' privilege or better to
do so.
'p4 help protect'
andy
Jay Renbaum wrote:
> I am trying to add a string to a changelist to denote that it was used
> in a QA build.
>
>
>
> Ideally, I would add it to the description section so that as part of
> the next QA build that I run I can find the last one and run a p4 diff
> between changelists to see the delta.
>
>
>
> I am able to run the following command successfully using sed:
>
>
>
>
>> ClientBuilds>p4 change -f -o 9077 | sed
>>
> 's/^Description:/Description:\n\tQA_BUILD__LS100_R1-0__trunk__2006_1022_
> 0749 /'
>
>
>
> This results in:
>
>
>
> # A Perforce Change Specification.
>
> #
>
> # Change: The change number. 'new' on a new changelist.
> Read-only.
>
> # Date: The date this specification was last modified.
> Read-only.
>
> # Client: The client on which the changelist was created.
> Read-only.
>
> # User: The user who created the changelist. Read-only.
>
> # Status: Either 'pending' or 'submitted'. Read-only.
>
> # Description: Comments about the changelist. Required.
>
> # Jobs: What opened jobs are to be closed by this changelist.
>
> # You may delete jobs from this list. (New changelists
> only.)
>
> # Files: What opened files from the default changelist are to be
> added
>
> # to this changelist. You may delete files from this
> list.
>
> # (New changelists only.)
>
>
>
> Change: 9077
>
>
>
> Date: 2006/10/20 16:19:56
>
>
>
> Client: jr_win32_client
>
>
>
> User: jrenbaum
>
>
>
> Status: submitted
>
>
>
> Description:
>
> QA_BUILD__LS100_R1-0__trunk__2006_1022_0749
>
> Added message if APP_CONFIG_NAME variable is not set.
>
>
>
>
>
> The added QA_BUILD string is exactly what I want added, however, when I
> pipe this command to p4 change -i it fails:
>
>
>
> jrenbaum at swbuild2:~/p4_src/CM_tools/ClientBuilds> p4 change -f -o 9077 |
> sed
> 's/^Description:/Description:\n\tQA_BUILD__LS100_R1-0__trunk__2006_1022_
> 0749 /' | p4 change -i
>
>
>
> Results in:
>
>
>
> Error in change specification.
>
> Can't update committed change 9077.
>
>
>
> Any ideas? Am I using the p4 change command incorrectly? Is there an
> easier way to denote which changelist has been used in a QA build
> without applying labels/tags?
>
>
>
> Thanks,
>
>
>
> Jay Renbaum
>
>
>
>
>
> _______________________________________________
> perforce-user mailing list - perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>
More information about the perforce-user
mailing list