Automatically add additional information to the changelist description on perforce (useful)

Source: Internet
Author: User
Tags perforce

Recently, automation is being implemented. the automation of version control software such as perforce has a small function of automatically modifying changelist description.

Add information you are interested in the description, such as the version information of the code, and the information from where the changelist tryout is generated.

I thought that the powerful perforce provided such a command. Just use it. Is it that simple.

The following is an introduction to perforce on the Internet:

Http://www.perforce.com/perforce/r12.1/manuals/cmdref/change.html#1040665

P4 [G-opts]
Change-I [-S] [-f |-u]

There is a-I parameter that can be used to modify the description.

Let's take a look at the introduction of perforce:

-I read a changelist description from standard input. Input must be in the same format by the P4 change form. Here, standard out can be a file, but what is P4 change form? The original form is defined in the form field above: Change: The current changelist number. If it is a new changelist, it is written as new. client: The current client namedescription: the information about the current changelist ......... (There are many more) it seems that I have to write these clearly to change my description. if I miss one or write an error, my changelist will change. I used to be lazy. when the results were executed, all the files on my changelist were removed (in the runway default changelist ). however, it is very painful to clearly write all these information. fortunately, perforce provides another-O parameter to write the information in the current changelist to a file according to the form. I just need to modify the description in this file, and then use the-I parameter to re-enter the file into the changelist. output_changelist_description_command = "P4-c" + @ clientname + "change-o >#{ filename} # {changelistid}" fix_changelist_description_command = "P4-c" + @ clientname + "change-I <# {filename }"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.