Suppose I have mapped my depot to client workspace as c:/perforce/project but now
I want to sync all the files present in c:/perforce/project/fold1/fold2 folder.
How can we do it, as the command p4 sync takes only file names and not folder.
Say the depot path is //depot/project/...
From the command line, do p4 sync //depot/project/fold1/fold2/...
(the "..." tells Perforce you want that folder and everything under it).
From P4V, right-click on the folder and choose "Get Latest Revision". It will only pull in the folder and everything underneath it.
Related
Trusty computer crashed and died while files were checked out under a Perforce Workspace. The New computer was not recognized by the old Workspace so I couldn't check the files back in. Had to keep working so I created a new Workspace to edit the exact same files.
I couldn't remove the old Workspace without reverting the files. But I don't want to risk copying over the work I've done on the exact same files under the new Workspace.
Is "p4 revert -k" what I want to do?
Suggestions? Thanks.
What you're really asking is how you can revert files in an old workspace/client that you can no longer access (because it's tied to a host that no longer exists).
The simplest way would be to ask your Perforce administrator to delete your old workspace. Someone with administrative access to your Perforce server can do p4 revert -C OLD_CLIENT to revert files belonging to another user and client, or the administrator can do p4 client -df OLD_CLIENT to delete the client outright.
If you want to do it yourself instead (note: I don't have a Perforce installation handy right now, so this is untested), then you could try:
Run p4 client OLD_CLIENT, clear the Host: field. Save and exit. This should allow further edits from a different host.
Run p4 client OLD_CLIENT again. Change Root: to point to some empty directory. Save and exit.
cd to the directory from step 2. Run p4 -c OLD_CLIENT revert ....
I am trying to look up history for a workspace in p4v. I believe I changed the root directory at one point, and the updated root is shown in the workspace info from p4v and from command line. However, I get the following when I attempt to review history.
Path 'c:\path_to_old_root\...' is not under client's root 'c:\path_to_new_root'.
The Perforce command run is:
p4 changes -s submitted -l -m 100 c:\path_to_old_root...
Additionally, when looking at the workspace in the selectro on the left side pane it shows c:\path_to_old_root\ for the local directory.
I am unsure why it is the generating the command/determining local directory to use in the manner it is.
Not sure why this occurred, but it appears files in the .p4qt directory were not correctly updated. Based on the suggestion that deleting said directory might be helpful, I searched the directory for occurrences of the old root path and replaced them with the new root path. This appears to have corrected the problem.
I've got a following problem:
There are many huge files(gigabytes) on repository, they are not yet in my workspace, but I already have them on my local disk from other source(the same copy as the latest revision).
Is there any possibility to move these local files to appropriate subdirectory of my workspace and mark them on P4 server, that they are the same as latest revision, so I don't have to download them again?
Thanks in advance
The p4 flush command should do the trick here. In this situation, you would copy the files to the appropriate location in your workspace, then run:
p4 flush //path/to/file.ext#head
You can do an entire folder using:
p4 flush //path/to/folder/...#changelist
In my Perforce repository there's a file that was submitted a while ago and was at one point valid. I need to move the file and its parent directory to a different location in the repository. However, I'm unable to retrieve a copy of the file from the repository due to the following error reported in P4V (2010.2) and p4 on Linux & Mac OS X:
Bad AppleSingle/Double header.
Malformed FInfo/FXInfo structure! File not updated.
The file is an Apple DMG (disk image) installer. It appears that the file in the repository is corrupted and I'm unable to retrieve it.
Is it possible to retrieve the file regardless of errors in the file in the repository?
Is it possible to move the file in the repository without have a local copy of the file in my workspace?
Use the command line tool:
p4 delete -n //path/to/the/rotten/file
As long as your client maps //path/... you can delete things without fetching them (eg, don't do a p4 sync first)
I have added an exclusion to my workspace which is called "dev-machine"
-//depot/DotNetProject/bin/... //dev-machine/bin/...
The bin folder now shows as excluded in p4diff but...
The differences are still showing i.e. diff 1 of 11 and the next and previous arrows are still taking me into those excluded folders.
Am I missing something obvious here?
Did you add the client-spec rule to remove the bin directory after making changes to the directory, and opening files in the directory? Perforce will still consider the files as mapped until you explicitly sync, and even then it'll prevent you from removing the file Perforce knows is open.
If Perforce already thinks the files in the bin directory are open (check with p4 open), your best bet may be to force-sync these files, or revert them, to remove them from your workspace. You'll end up with no files in your bin directory (at least, that Perforce is tracking), so you'll need to rebuild.