P4V Won't Sync All Files/Folders - perforce

I am rather new to P4V, so I apologize if this is obvious, but I cannot figure out a solution to my problem.
I have a depot that I have connected to just fine, and navigate to the folder that I wish to get the latest revision of. Great, no problem so far.
I right-click the folder, and select "Get Lastest Revision". Except, it doesn't. It only grabs some of the files from the folder.
Fine. So I right-click the folder, select "Get Revision", have the radio selected for "Get Latest Revision", and check the box for "Force Operation". Nothing, same behavior, missing the same files.
Tried starting P4V in admin mode. Same behavior.
A coworker suggests I go into the workspace and manually exclude and then include the missing folders/files. Same behavior. Also suggests I try reverting to the initial commit of the missing folders/files, and then updating to the newest. Same behavior, I'm only able to get the same files every time.
Okay, so time for a more extreme solution. I restart, and use p4 sync ...#none in a command prompt to remove everything. Somehow several dozen files throw the warning that they're in use even though I've just rebooted. I don't know how this is possible, so I navigate to the folder via the File Explorer and delete them all manually. I right-click the folder, and select "Get Latest Revision"... and nothing.
This is... frustrating. This should be pretty simple - I just want the entire contents of a single folder, no frills. What's even more confusing is that I had these files before, and when I did a "Get Latest Revision" they were deleted. Coworkers are able to download all of the files in that folder with no problems - it's just a problem for me. Which implies that there's an option/setting I have that's messing with things. However, considering I just installed P4V for the first time, I know I haven't messed around with any of the settings, and don't know which ones to change to make this work.
Thanks for reading, and thanks in advance for any advice.

p4 sync and force sync fails only for the files that have been opened in the workspace. In case you want to sync such files, shelve and revert them to maintain a copy or just revert them and then try to force sync again! I have faced this problem several times and this always solved my problem!

Related

TFS - Shelve sets - You cannot unshelve a change to $/Business/Path/Logic because there is a conflict on this item in your workspace

I wanted to transfer my work from on pc to another (at home). I checked in a shelve set on my main pc. I pulled it from my laptop fine. I then updated my code on my main pc and made another shelve set. I pulled it again on my laptop. It was taking some, so I cancelled the operation and deleted the whole directory on my laptop disk. When I tried getting the shelve set again I just get
Multiple error occurred during the operations, the first of which is
displayed below. A full error list is available in the Output Window
You cannot unshelve a change to $/Business/Path/Logic because there is
a conflict on this item in your workspace
The output window lists about 100 of these:
You cannot unshelve a change to $/Business/Path/Logic/app.config because there is
a conflict on this item in your workspace. You must first resolve the conflict or exclude this file when you unshelve the shelveset.
What? I just want a new copy of the latest shelve set. I tried mapping to a new path on my laptop, but same thing.
Thanks
Thomas
Sounds like when you "deleted the whole directory" on your laptop source control actually picked this up as a change. If that is the case your laptop should actually show that you have changes in your "My work" area. If you do and didn't really intend to make that change just undo the checkout.
This version of VS is a little different... even if you make a change using the Explorer and not within the VS source control explorer it can pick that change up. This is normally a great thing... you can use whatever editor you like and it will count that as a change. But you have to be aware that it is going to do that so that you don't accidently make unintended changes.

How do I force Perforce to add files to changelist?

I'm a very fresh user of Perfoce, so please be patient!
I am trying to create a commit (I understand it that in Perforce it is called a changelist) of the files which have been changed. It sort of happens automatically in other VC systems, but there seems to be no easy way of doing it in p4... The problem is (maybe) that I'm not editing the files by hand, the files are generated (please don't ask me why do I have to check in the generated files...) so the whole directory tree is getting removed and then copied over with the new files. But Perforce acts as if nothing happened. In both my workspace and the depot it displays the updated files, but when someone will check them out on another machine, the files will be of the previous version.
I'm fine with doing it either through GUI or through the command line. I'd prefer the command line, because that would spare me the trouble in the long run, but it doesn't seem like it should be much hassle either way.
In other words, let's say, this is the workflow I'm used to from SVN or Git:
Run status to see what changed.
Stage / add to commit what you want to be in the next revision.
Commit and send it to the versioning server.
What I'm not able to do is the "stage" phase - because the changes are not discovered automatically.
EDIT
Ah, I think, I figured it out: reconciliation was what I needed... well, I guess if you don't marry, this word would hardly ever happen in your vocabulary :)
It appears that the proper command is reconcile. Also, as Bryan Pendleton suggested there should be status, but I must have an older version of Perforces, which doesn't have this command. This command is also available from context menu in either depot or workspace panels of Perforce graphical interface, when you click on the modified file.

TortiseSVN - commit Item failed error

I use tortise svn in VS2010. When I go to commit my changes at the end of the day, I get the following error.
Commit item 'folder / filename' has copy flag but an invalid revision.
What does that mean and how do I resolve it? I Googled for it but really only saw a transcript of a rather esoteric discussion for a Java-related issue.
EDIT - 10/25/2010
Nothing? Really?
I agree with Pekka's comment. Right click on the project folder -> TortoiseSVN -> Check for modifications. Take note of the files you changed.
Create a new folder - and checkout the repository to the new folder. Move the files that changed back into the new folder, replacing any existing ones. Try your commit again.
You may try doing this with Windows Explorer instead of Visual Studio.
have you renamed that folder[say, folder1]?
If not then, "export" the content of that folder to somewhere else[say, folder2].
go back to parent of folder1 and delete then update folder1.
replace all the files[*not folder*s] in folder1 with the equivalent files from folder1
now commit folder1 independently after stealing any lock if exists.
What happens if you try to get the latest revision (update before committing, but after you back up your code ;)?
It sounds like there is potentially something that is in conflict in a bad way - you may need to back up your files, update or check out a new working copy, and then replace checked out files with your old ones.
check out a clean copy. put in the changes you previously made. commit.
do that, and try to forget your problems. it should work.

Perforce changelist does not show any files

Using P4V 2009.2.
I have used P4Win in the past, but this is a new setup for me.
The problem is that the files I have checked out disappear from the changelists, so I cannot check them in.
To reproduce:
Check out a file, make a change to it.
Go to the 'pending changelist' tab.
There will be a + sign on the default changelist.
Click on the plus, or on the changelist line, the plus will disappear, there will be nothing in the changelist.
Try to check the file in by right-click on the file itself, the changelist dialog will show up but NO files are listed.
You can transfer the file to a new changelist, the same thing happens.
Looking at the file in the 'checked out by' window does correctly show the changelist number & description.
It sometimes happens to me, and what I normally do is change workspace and then change back again. Not sure if there is an easier way to get it to realise the files are checked out.
the only thing I can imagine is that you are looking at a different client workspace. Notice that the "Pending Changes" tab has a filter on the top, where you can separately filter for folder/files, user and workspace. Maybe the filter is set to something so that it doesn't match the client workspace where you have actually checked out the file.
Good luck,
Henrik
You may get this if the perforce server has not been upgraded. Old versions of P4D have this error: http://kb.perforce.com/article/1167/opened-files-missing-in-default-changelist
If that is not an option, use p4Win.
I agree with jhwist,sounds like your looking at a different client spec.
P4V is a bit confusing on this front, IMO and I personally prefer P4 Win but to check, open up a command prompt and type p4 changes -s pending -c YOURCLIENTSPEC - chances are that the changes you think you have aren't in your current clientspec
This can happen sometimes and in my experience it is a refresh issue with p4v. Often simply closing the pending tab or reopening p4v solves the problem.
In my case, the pending List has over 4000 files, (due to eclipse created so many files after mvn tasks) so none of them are shown. I created a different pending list, then cleared all contents, then moved the files to the new change list. Then it is appearing in the new change list.
Modify the file directly in the correctly mapped client folder (i.e. your current workspace). You will see the changelist for sure. As jhwist mentioned clear filters if any and choose your current workspace (since you may have many)

In Perforce, can you rename a folder to the same name but cased differently?

Can I rename a folder in Perforce from //depot/FooBar/ to //depot/Foobar/?
I've tried this by renaming from //depot/FooBar/ to //depot/Temp/ to //Depot/Foobar/ but the end result ends up the same as //depot/FooBar/.
Once it is in Perforce, the case remains set. As mentioned by Johan you can obliterate, set the name up correctly, and add it in again. However, there is a slight gotcha....
If anyone else (running Windows) has already synced the wrong-cased version, then when they sync again the right one, it will not change the case on their PC. This is a peculiarity of the Windows file system acknowledging case but still being fundamentally case-independent.
If a number of users have synced, and it is not convenient to get them to remove-from-client too (and blasting the folders from their machines), then you can resort to a dark and dirty Perforce technique called "Checkpoint surgery". It's not for the fainthearted, but you do this:
Stop your server, take a checkpoint.
Using your favourite text editor that can handle multi-megabyte files, search & replace all occurances of the old case name with the new. You could of course use a script too.
Replay your checkpoint file to recreate the Perforce database meta data.
Restart your server.
This will affect all user client specs transparently, and so when they sync they will get the right case as if by magic.
It sounds hairy, but I've had to do it before and as long as you take care, backup, do a trial run etc, then all should be OK.
Maybe not needed anymore, but here's the official Perforce HowTo about changing file cases on Windows and Unix: http://answers.perforce.com/articles/KB/3448/?q=change+file+case
I'm not sure about directories, but we've had this problem with files. To fix it, we have to delete the file, submit that change, then p4 add the file with the correct case and submit the second change. Once that's done, unix users who have sync'ed the incorrect-case file have to p4 sync, then physically delete the file (because p4 won't update the case) and then p4 sync -f the file.
Our server is on Windows, so that might make a difference.
I guess it treats files and folders the same.
For files:
It depends (on whether you have a Windows or Unix server). We have this problem with our Windows perforce server (which versions our Java code), where very occasionally someone will check in a file with a case problem (this then causes compile errors because it's Java). The only way to fix this is to obliterate the file and resubmit it with the correct case.
I think you should remove the Perforce Cache, so that your modification can be shown.
You can rename with ABC rename to abc_TMP, then abc_TMP rename to abc, then clear cache.
Setps to clear cache:
Open windows user home folder (on windows7 ==> C:\Users\)
Locate the folder called ".p4qt"
Rename the folder to "old.p4qt"
Launch Perforce, now everything works!
NOTE: these steps will rest your default setting.
The question is over 3 years old, but I ran into an issue like this while doing a Subversion import into Perforce and figured the info I got could be useful to some. It's similar to the obliterate method, but helps you retain history. You use the duplicate command that may not have been available back then to retain the history. The process basically being:
Duplicate to temporary location.
Obliterate the location you just duplicated.
Duplicate from the temporary location to the renamed case location.
Obliterate the temporary location.
Through this you retain the history of file changes, but get them all in the new path as well. Unfortunately there will be no history of the path case change, but that seems to be unavoidable. Similar to other methods mentioned here, users will need to either manually rename the directories in their workspace or delete and re-sync to get the new path name.
Also, P4V caches the paths it shows in the tree so after doing this it may still show up as the old name. a p4 dirs command however will show the new case.

Resources