Automatically add additional information (useful) to Changelist description on Perforce

Source: Internet
Author: User
Tags perforce

Recently in doing automation, perforce such a version control software automation, there is such a small function, is to automatically modify the changelist description.

Description The information you are interested in: such as the version of Code, information about where the changelist tryout from, and so on.

Would have thought that the powerful perforce provide such a command, use it. But it's not that simple.

From the Internet to see perforce this aspect of the introduction:

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

P4 [g-opts] change-i [-S] [-f |-u]

is to have a-I parameter, you can complete the changes to the description.

Let's take a look at Perforce's introduction:

-I Read a changelist description from standard input. Input must is in the same format by the P4 change form. The standard out here can be a file, and what is the P4 change form? The original form is defined in the form field above: change: The current changelist number, if it is a new changelist, write new. Client: Current client name Description: Describes the current changelist information. ........  (There are many) it seems to be to write these all clearly, just to change my description. If I miss an item, or if something is wrong, then my changelist will change. I have been lazy of these three items in the previous column, the results of the implementation of the time, my changelist on the files are all removed (the runway default changelist). And it's painful to write all this down. Fortunately, Perforce provides another-o parameter, which can be used to write the information in the current changelist into a file as a form. I just need to go to this file to modify the description, and then use the-i parameter to the file into this 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.