How can I rename a solution and projects in it without breaking anything on PerForce depot?
I开发者_StackOverflow would like to rename my solution and a couple of classes etc. in it which is already in source-control depot, in Perforce depot.
How can I do that step by step without harming the depot and the users who are already keeping a copy in their local machines?
Renaming files in a solution will result in broken code at some point so the first thing to do is make a branch. Then make the modifications in the branch. When everything is working properly, integrate back into the main line. Other users then just need to synch to the latest revision and Perforce will take care of the renaming, deleting, etc.
Assuming your Perforce server is version 2009.1 or later, you can use the p4 move command to do this:
- p4 edit the files you want to move
- p4 move them to the new files
- p4 submit the changes.
See the Perforce documentation for more details.
精彩评论