Reputation: 903
I want to create a list of files from a changelist
in Perforce. I am using command line to open files for adding (mark for add
) and deleting (mark for delete
) into a changelist
, I successfully created them and now I want these changelist
's to be in a list. Is there a Perforce command for it? How?
Upvotes: 1
Views: 1663
Reputation: 71424
For a pending changelist, use the p4 opened
command. The -c
flag lets you limit it to a specific changelist (including the "default changelist", which is really "files that are open on this client but not in a changelist yet").
C:\Perforce\test>p4 opened
//stream/main/bar#2 - integrate change 118 (text+S3)
//stream/main/foo#3 - edit default change (text)
C:\Perforce\test>p4 opened -c default
//stream/main/foo#3 - edit default change (text)
If you want just the filenames you can do something like:
C:\Perforce\test>p4 -F %depotFile% opened -c default
//stream/main/foo
For a submitted changelist, I like the p4 files
command better than p4 describe
because the output is easier to parse:
C:\Perforce\test>p4 files @=117
//stream/main/mob/nextproject/custom/configuration#2 - integrate change 117 (text)
Upvotes: 3
Reputation: 903
If ever someone bumps into the same situation. You can use p4 describe
to get the list of files in your changelist
. The only backdown here is that you can't use this for the default changelist
, you need to have a numbered changelist
in your Perforce.
p4 describe changelist_number
or if you want to generate a file after this list
p4 describe changelist_number > list.txt
Upvotes: 2