How to determine deleted files in perforce
I had directory structure A/B, A/C, A/D and then had few fil开发者_如何学编程es in each directory B, C, D.
Lets say, in B - B1.txt, B2.txt, B3.txt IF someone delete B2.txt from perforce and i dont know when, is there any way i can find out what are the files deleted from the directory and at what time?
In P4V you can turn on the option to "Show Deleted Depot Files".
Deleted depot files will then display, with their file icons having an "x" on them, and you can easily examine their history.
From the command line, you can type p4 filelog -t //your_depot/path/to/folder/...
and that will give you the revision history of all the files in "folder" (including subdirectories).
You can search the output of that command for "delete" and that will tell you the revision number for the file when it got deleted, and it should also have the date/time info in there.
I'd add this as a comment but don't have enough rep. To simplify the results from command line you could do as follows..
From Linux I use
p4 files //depot/project/... | grep "delete change"
You can achieve the same in Windows via
p4 files //depot/project/... | findstr "delete change"
Type:
p4 files /path/to/dir/...
This will list all the files in the directory, even those deleted.
Then, by the changelist #
, you can get the info you look for by:
p4 describe -s <changelist #>
Good luck!!!
精彩评论