Perforce doesn't know that I have changes to submit
I'm new to Perforce. I'm much more comfortable with Git and some Subversion.
Anyway, this is what happened:
- I created a branch for myself in p4v located in location A on my machine.
- I create开发者_C百科d a Java project in location B, and copied it into location A on my computer.
- I created and submitted a changelist for the Java project.
- I realized that I needed to make another change, so I went back to Eclipse and edited the project. But, I forgot that the project in Eclipse is pointing to the one in location B.
- So, I copied the project from location B to location A, where the branch is.
But now I can't create a changelist for the edits because Perforce thinks that there are no changes to commit.
What did I do wrong, how do I fix it, and what are some Perforce best practices to avoid this craziness in the future?
There is an Eclipse plugin for Perforce. If you install this then you will be able work with the project in Eclipse at location A.
If you make an edit to any file or setting Perforce will check the file out automatically and place it in the default changelist.
You can then either check it back in from there or use P4V to manage your changelists.
As @jamesdlin points out Perforce effectively "owns" the files and you shouldn't make any edits without "asking permission" first by either an explicit p4 edit
command or via the IDE plugin.
If you've made a change without first checking out the file you can simply make the p4 edit
call. This doesn't overwrite the local file, just marks the file as writeable as far as Perforce is concerned. Perforce should then recognise that there's an edit pending and let you check it in.
You need to do p4 edit
on the files before you edit them. Normally files are marked as read-only to strongly discourage you from modifying the files without first marking them for edit.
The best practice would be not to fight the read-only permissions.
精彩评论