Reputation: 4161
When I add a new (.java
) file to my project in IntelliJ, it does not get automatically added to p4, even though it was configured to do it.
When I try to add it manually to p4 (using p4v -> rclick -> add) it says "ignored file can't be added". I have not done anything to mark this file as "ignored". I have also checked the .p4ignore
file in my p4 client root dir. It does not have any rules targeting that directory or *.java
.
I can go to command line and do p4 reconcile -I
, which has the effect of adding the file to p4. But why do I need to do this? Why don't new files get added to p4 automatically, and why does p4 see them as "ignored"?
I am using IntelliJ 13.1.1 Ultimate on Win7 64-bit with the P4 plugin. Using p4v version "2013-09-24". IntelliJ is configured to silently add new files to p4 (File -> Settings -> Version Control -> Confirmation). The IntelliJ-specific list of ignored files contains only IntelliJ-specific files (*.iws
, .idea/
, etc.).
Upvotes: 2
Views: 1307
Reputation: 4161
Mystery solved. I was adding files with the pattern a\b\c\test\d\e\Fgh.java
.
There was no directive to ignore *.java
. but there was an instruction to ignore test\*
. There were no additional p4Ignore files up and down the tree, though it's a good suggestion to check for such things.
Works as designed. No issue to report.
Upvotes: 1
Reputation: 16359
There can be multiple P4IGNORE files in your client workspace, not just the one in the client's root directory. The Perforce client-side software will search the directory containing the file to be added, its parent directory, and so forth, looking for P4IGNORE files which control the file ignoring behaviors.
See: http://www.perforce.com/blog/120214/new-20121-p4ignore
Upvotes: 1