When I add new files to my project which is managed by Perforce, how can I get a list of the new files I've added (the ones Perforce does not know about yet) so I can make sure I don't miss any in my changeset?
Something like 'svn status | grep ^\?' or 'git status' to show the unstaged, unknown files.
Thanks! -Casey
To get the latest revision, right-click the file and choose Get Latest Revision. To get a previous revision, right-click the file and choose File History.
To add files to the depot, create the files in your workspace, then issue the p4 add command. The p4 add command opens the files for add in the default pending changelist. The files are added when you successfully submit the default pending changelist.
Find files in a depot or workspaceGo to Search > Find File. The Find File tab opens in the right pane. On the Find File tab in the right pane, under Search in, enter the directory path you want to search. You can drag and drop the file path from the Depot or Workspace Tree in the Tree pane.
The best answer is provided in the similar question linked to by Teja. However, if you want an easy command line solution that deals specifically with added files, you can do the following
find directory -type f | p4 -x- add
for normal files, and
find directory -type l | p4 -x- add
for links. (Letter 'el', not 'one' in above command)
Perforce simply refuses to add any files that are already in version control. The only problem is that this adds everything, including binary files.
Find the similar question on SO and check the other answers and comments too. There is no direct command available from command-line. But you can use a powershell script or a GUI for it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With