- 1 year ago
Perforce: How to create a list of files from a changelist?
To create a list of files from a Perforce changelist, you can use the Perforce command-line client (p4) or a Perforce client application. Here's how you can do it using the p4 command-line client:
Open a terminal or command prompt.
Navigate to the directory where your Perforce client is installed.
Run the following command, replacing
<changelist>
with the desired changelist number:shellp4 describe -s <changelist>
This command retrieves information about the specified changelist.
Look for the "Affected files" section in the command output. It will list all the files included in the changelist.
Example output:
rubyAffected files ...
//depot/path/to/file1.txt#4 edit
//depot/path/to/file2.txt#2 delete
//depot/path/to/file3.txt#1 add
The output provides the depot paths of the files, along with their revision numbers and the type of operation (edit, delete, add, etc.).
You can redirect the output to a text file if you want to save the list of files. For example:
shellp4 describe -s <changelist> > file_list.txt
This command saves the output to a file named "file_list.txt" in the current directory.
By following these steps, you can create a list of files from a Perforce changelist using the p4 command-line client. Adapt the commands to match your specific environment and client configuration.