Reputation: 9284
Say I have a project like this in Mercurial
root/
proj1
proj2
If I open proj1 in IntelliJ, I will have to set the VCS root to "root" or else IntelliJ won't show any changes. But, if I do so I will also see changed files in proj2. How can I exclude proj2 or set the root to proj1 while still seeing my changes?
Upvotes: 0
Views: 605
Reputation: 551
This can be tricky because mercurial is intended to be used as One Project One Repo. By default mercurial will want to commit all files when an hg commit
is ran. There is a command to commit specific files that is rarely used: hg commit -I file1.foo -I file2.foo -I file3.foo
. So you are basically trying to tell IntelliJ to constantly run that type of command, but pretend you don't see the other files to know you need to run that type of a command.
When you go to commit in IntelliJ if you use the commit dialog you can see the files it wants to commit. You can uncheck the files from proj2. Usually IntelliJ remembers to continue to ignores these files from future commits, but if you select the commit dialog differently they may appear checked again.
Realistically you should pull each project out to their own repository. Then this and many other potential problems with the setup goes away. Read One Project One Repository - Mercurial Used Right for reasons why.
Upvotes: 0
Reputation: 5653
You can hide folders in File -> Project Structure... -> Modules
Select your module, then select your folder, that you want to hide and then click to "Excluded".
Upvotes: 1