I have files in my perforce client which I no longer need.
Is there a way to remove the files from my client to free up the space?
I don't want to delete the client and create a new one.
Thanks in advance.
You can sync to any revision, including #none. To temporarily remove a directory (e.g. the current directory, ...) from your client just do:
p4 sync ...#none
If you want to more permanently remove the directory from your client (so it won't come back even if you re-sync your entire workspace), remove it from your client's View:
View:
//depot/... //my-client/...
-//depot/some_directory/... //my-client/some_directory/...
Related
I have a workspace "template" that get some file in local.
I can use gui to create a new workspace, right-click, get revision..., select "template".
Then, the new workspace's local file = template's local file. The file's version is also equal.
How can i use command line do the same thing?
The equivalent of the "get revision" operation you're talking about is to use the client spec template as the revision specifier on a p4 sync:
p4 sync FILE#template
This is commonly used to recreate the state of another client for purposes of recreating a build. The client essentially acts like a label for whatever revisions it has synced. To sync the entire workspace instead of that one specific FILE, simply use p4 sync #template.
Note that this is completely separate from the concept of using the client spec as a "template" for the View of a new client:
p4 client -t template
This will create a new client spec that copies its View from the template client, but the specific set of revisions it's synced to (commonly called the "have list", i.e. the set of revisions referenced by #have within that client and by #client from any other context) is not in any way bound to the template client (unless a ChangeView is used, but that's a whole other thing).
Since these are separate operations it is not necessary to do one in order to do the other.
I have a directory on a server that needs to synchronize its contents to a client. It is set to delete files on the client that have also been deleted from the directory that is to be synced from the server.
I want to ignore a specific directory, so it does not delete its contents on the client.
The following script (located on the client) currently deletes the contents located in /files/synced/oss/test/ but I want that directory to keep its contents on the client.
option exclude "Thumbs.db; /files/synced/oss/test/"
synchronize local -delete "D:\files" "/files/synced"
If I understand your question correctly, you do not want to exclude a remote folder /files/synced/oss/test/.
You want to exclude a local folder D:\files\oss\test\.
Also note that the option exclude has been deprecated, use -filemask switch instead.
synchronize local -delete -filemask="| Thumbs.db; D:\files\oss\test\" "D:\files" "/files/synced"
I have a depot that was initially set up as a non-stream depot. We added some files while sorting out folder structure. The depot was subsequently converted to a streams depot, and I want to remove the old files.
Unfortunately those original files do not appear under any stream, so I can't delete them from a stream-based client.
I do have a non-stream client left from initial testing, and I can open the offending files for delete, but I can't submit them:
//depot/myworkspace/main/foo.txt - warning: cannot submit from non-stream client
Is there any client-side way to delete the files? (Note that I am not an administrator on the server -- contacting the admin will be my next step.)
I'm getting this error while trying to delete a client named 'test':
Client 'test' has files opened. To delete the client, revert any opened files and delete any pending changes first. An administrator may specify -f to force the delete of another user's client.
I try p4 opened and it shows:
//TestRepo/test/TestA.java#1 - edit default change (ktext)
//TestRepo/test/TestB.java#1 - edit default change (ktext)
How do I delete these files so that I'm able to delete the client?
Run p4 revert //TestRepo/test/TestA.java //TestRepo/test/TestB.java from within the client first.
I want to create a client with the following view:
//depot/location1/main/... //myclient/main/...
//depot/location2/main/... //myclient/main/...
No files and directories are common between //depot/location1/main/..., and //depot/location2/main/...
But when I do p4 sync, it only syncs from //depot/location2/main/...
How can I make it sync from both locations?
Use this
//depot/location1/main/... //myclient/main/...
+//depot/location2/main/... //myclient/main/...
The plus does what you are looking for, it tells perforce to add the files from that depot location to an already defined workspace location.