IDEA 6.0.2 does not notice changes to project level .ipr and .iws files
I've got a multi-module project in which I've recently added yet another module. I've committed the new module to my svn repository. When I check out a clean copy of my project, I end up with project-level .ipr/.iws files that does not include my new module.
Checking the directory structure using the shell (I'm running on Mac OS X Tiger with all available patches applied), I see that the new module was checked out with the other modules so I imported the new module into the project using the "Project Structure" screen. I then tried to commit my project and IDEA tells me that no files have changed.
Running "svn status -u" from the command line in the very top level "project" directory yields the following output:
M 44 LoaPost.iws
M 44 LoaPost.ipr
Status against revision: 44
The bottom line appears to be that svn knows that the project level .iws and .ipr files have changed but IDEA (or possibly the svn plugin within IDEA) does not know that these files have changed.
I suppose that I could commit the .iws and .ipr files using svn from the command line but I would sure rather have IDEA properly track changes to these files.
Any idea what is wrong?
请先登录再写评论。
Hello Daniel,
This is a known limitation of IntelliJ IDEA's VCS support: it only works
with files which are under module roots. Thus, in order to keep track of
the .ipr file changes, you'll need to create a module which will include
the top-level project directory as a content root. This limitation is planned
to be removed in the next release of IntelliJ IDEA.
By the way, the .iws file is your local workspace file - you shouldn't store
it under a version control system if you're sharing the project with other
developers.
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Ok. Your suggested workaround seems to have done the trick.
Thanks.
-Danny
I'm having trouble getting part of your advice to work.
As you noticed, the .iws file was under the control of svn. Since you say that it shouldn't be under the control of my VCS, I backed up the file, deleted the file and then commited the deletion to my svn repository. I then copied my backup of the file back into place and re-launched IntelliJ. Everything was happy.
I then checked out a new copy of my project into an empty directory and opened it with IntelliJ. In fairly short order, IntelliJ had recreated a .iws file for the project. Unfortunately, IntelliJ did not seem to know that the project was under the control of svn.
As near as I can tell, if there is no .iws file in the repository at the time that the code is checked out then IntelliJ treats the checked out project as not being under the control of svn. Alternatively, if there is a .iws file in the repository then everything works just fine when the repository gets checked out but changes to the .iws file get commited back when I commit code changes.
How do I follow your advice (that my .iws file should not be under the control of svn) while still having the project checked into the repository in a state that other folks can checkout and work with?
Daniel Boulet wrote:
After checkout simply re-enable the appropriate VCS (subversion/cvs...) in the ide settings.
IDEA does not autodetect that the files are under version control (AFAIK that's also a topic planned for Selena).
I'm on 6.0.5 now and this is still a problem, my top-level project file is not sync'ed or commited by the svn plugin - which release exactly is this planned for?
Hello Vard,
This is implemented in IntelliJ IDEA 7.0M1:
http://www.jetbrains.com/idea/nextversion/
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Dmitry,
I didn't realize that there has been something changed in 7.0M1, I still
use a dummy module to get project files into SVN. Could you give some
words about what's new? Maybe a JIRA link? Thanks.
- Martin
Dmitry Jemerov wrote:
>> I'm on 6.0.5 now and this is still a problem, my top-level project
>> file is not sync'ed or commited by the svn plugin - which release
>> exactly is this planned for?
--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com
Hello Martin,
Just look at the redesigned Settings | Version Control dialog. I hope that
it'll be clear enough from that point on. :)
>> Hello Vard,
>>
>>> I'm on 6.0.5 now and this is still a problem, my top-level project
>>> file is not sync'ed or commited by the svn plugin - which release
>>> exactly is this planned for?
>>>
>> This is implemented in IntelliJ IDEA 7.0M1:
>> http://www.jetbrains.com/idea/nextversion/
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Well, what I don't get is why the project files aren't treated by version control when configuring the default entry ]]>. After playing around a while I discovered that those files are treated under the entry '.'. Not really intuitive IMHO.
And even worse: while those files are now under VCS control, there's still no possibility to do anything with them. E.g. I can't edit my readme file which is located in the project folder.
Hello Martin,
That's a bug: http://www.jetbrains.net/jira/browse/IDEADEV-16430
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"