Reputation: 10376
I've just set up Perforce on my home computer so that I can work at home without having to lug my work computer around.
I used the same workspace as the one I use at work, but when I try to get the latest revision, I don't get all of the files. Some subfolders are missing despite being mapped like this: //depot/some_folder/... //My_Workspace/some_folder/...
some_folder
has a subfolder some_subfolder
but my workspace didn't pull that folder in for some reason... None of the other lines in "View" have anything to do with some_folder
so I don't think they are the issue.
Anyone have any ideas?
Upvotes: 10
Views: 34216
Reputation: 3332
In the GUI, instead of doing the get latest, try doing the context menu for "Get Revision...", and in that window that comes up, check the "Force" checkbox and give that a try.
Update edit: Realized upon reflection and folks still seeing this post, that this might benefit from a little explanation.
What's happening is that Perforce stores metadata about each workspace and what files it has sync'd, changed, etc. So let's say you have three folders, A, B and C. On your work machine, you sync folder A. The server updates your metadata and says "Cool, workspace foo has folder A". When you go to your home machine, and sync A and B, the server's like "Ok cool, workspace foo already has folder A, don't sync that one, only sync B." That's why you're only seeing some files come over like that.
My suggestion I gave above, using the "force" option, basically tells the server "Ignore what you THINK I have, just gimme everything I just asked for." Which works fine, but you're getting around the server's picture of what you have. That's dangerous for a number of reasons. For example you could clobber work you had locally because the server will happily overwrite whatever you have when you use the "force" option.
The more better answer here is to create a foo_work and a foo_home workspace, and keep the work independent. If you need to transfer in-progress work between workspaces, you can use the shelve option, and/or create a development branch and check-in unfinished work to the dev branch.
Upvotes: 6
Reputation: 71454
Create a different workspace to use on your home computer. Do not try to use the same workspace on two different computers unless they're pointing at the same underlying filesystem.
Upvotes: 2
Reputation: 1948
In my case, I have to get the latest into a different folder. I renamed the folder from original workspace, but it did not work if I do a get latest. I created a different workspace, and it worked.
Upvotes: 0
Reputation: 4329
The Perforce server tracks what files you pull in your workspace. This is done for speed, so when you do a "Get latest revision" it will only pull the files that need to be updated. Since you are using the same workspace, Perforce thinks you have them in sync already. You have 2 options.
Use p4 sync -f //files/... (If your using p4v, right click->Get revision, then in the options click the Force checkbox) This will tell perforce to sync everything to the latest revision. But then you will have to use this option at work and home, since Perforce will now think you have everything in sync, when really only the files at home are in sync.
Use a different workspace for home and work.
Upvotes: 22