Reputation: 2711
I'd like to check if a file is already locally marked for add, without adding the said file. Is this check possible with a Perforce command?
Upvotes: 1
Views: 824
Reputation: 63
I personally use below two commands:
p4 diff -sa // to show list of all opened files
p4 diff -se // to show list of all files that are with changes but not opened
Upvotes: 1
Reputation: 137158
If you use the -n
option it will preview the add operation telling you which files would be added but not actually adding the file.
p4 add -n testfile
Upvotes: 1
Reputation: 2711
You can check if a file is marked for add by running the fstat command. If the command output contains the string "action add"
, that means the file is already marked for add.
Upvotes: 0