I created a new Stream in Perforce and populated it from my local folder.
Inadvertently - I added all object files as well.
Now I want to delete all object files - .o from the depot for a stream
i.e. something like P4 delete //myDepot/myStream/.o (recursively)
Looked at the the P4 commands but can't seem to locate a command that will do that
Try this:
p4 delete //myDepot/myStream/....o
Related
How do i download only the set of files that are modified in a changelist. I was able to find the list of files modified with p4 describe.
To sync them to your workspace, do:
p4 sync #=CHANGE
If you want to download them to arbitrary locations and/or stdout, see the p4 print command.
I have a workspace with set of files.But i observed that when i delete a file from perforce and do "p4 sync".The file is getting not deleted from the workspace.
But p4 sync -f deletes the file.
p4 sync will only delete a file from the workspace if:
the head revision of the depot file is deleted (check p4 files FILE)
you are currently synced to a different (not deleted) revision of the file (check p4 have FILE)
you do not currently have the file open (check p4 opened FILE)
The only one of these conditions that is affected by the -f flag is #2, so I suspect you had the file in your workspace but weren't on record as having synced it from the server (e.g. the file was put there outside of Perforce, or there was a sync -k, or something like that).
I am trying to setup perforce. I installed p4v and setup workspace.
Then I ran
C:\"Program Files"\Perforce\p4 -p perforce-test:1500 -u test-user -c test-user_test sync //test-folder/test/
But I get error //test-folder/test/ no such files(s)
I can see files and folder exist in p4v depo.
Use the path:
//test-folder/test/...
Directories aren't objects in Perforce, they're just part of the file name -- so you don't sync a directory called "//test-folder/test/", you sync all the files whose paths match the pattern "//test-folder/test/...".
Use the “...” in the end
e.g.
Wrong : p4 sync //test-folder/test/
Right : p4 sync //test-folder/test/...
Is it possible to specify the folder name where depot needs to be synced ?
I tried syncing the depot to my specified path using following command but it does not work.
p4sync -d "c:\my\path" sync //depot//branch/file
Note : My aim is just to copy the file from depot to my specified location.
Looks like sync is not the command I should be using. Is there any other command or way I can do this ?
sync - gets files from depot to your workspace, which must be already customized. To get files without workspace you need to make some hack with command "print":
p4 print -o filename //path/on/depot/filename
This command (above) gets filename and store it in "filename". Also, you can make some another workaround to get all files from some directory, probably with "p4 -x - command" ( -x stands for xargs in unix-world)
I'm trying to sync only the files modified in a particular change list to p4v.
Suppose in a perforce directory //demo/test I have 10 files out of which only 3 are modified as part of change list number 1234. I want only 3 files to be synced up. I have tried below options but it did not work.
p4 sync //demo/test...#1234;
This command says the files are updated but i don't see the files synced up.
p4 sync -f //demo/test...#1234;
This command is syncing all 10 files in the directory.
Use
p4 sync //demo/test...#1234,1234
or
p4 sync //demo/test...#=1234
When running tests like these, remember that 'p4 sync' won't sync a file that you already have, which is why you found the need to run 'p4 sync -f' to force the files to be sent even though the server knows you already have them. If you want to clear the server's memory of the files that you have, you can run
p4 sync //demo/test...#none
which will remove all the (p4-managed) files matching '//demo/test...' from your workspace, and then 'p4 sync' will bring them back the next time.
Oh, and since 'test' is a directory, the pattern
//demo/test/...
is preferred to
//demo/test...
since '//demo/test/...' matches only the files in the test directory, while '//demo/test...' will also match the files in the '//demo/test1', '//demo/test-and-set', and '//demo/testarossa' directories (if those should happen to exist).