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}"