Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ and SVN: "no changes detected" upon commit

I'm trying to share a project between my desktop and laptop using Subversion. The project has 3 modules. I've imported the project folder into a repository in a shared folder that my laptop can access over the network.

I checked the project out on my laptop and then tried to open the project. None of the modules are visible, only the project's .iml file, as in the screenshot below.

I notice that the .iml file has a line for "content url", which refers to a location on my desktop. Maybe this is the problem. What can I do about it? Do I have to create a new project on the laptop and import the modules - so there would be 2 different top level .iml files, one for the desktop and one for the laptop? Am I going about this the wrong way?

intelliJ

UPDATE: The problem seems to be with committing. When I make a change in a file, save, and hit Commit Changes, I get a popup saying "No changes detected". This is the same on both laptop and desktop, and meant that I downloaded the wrong version onto my laptop before. I deleted the repository and created a new one, and my project works on my laptop now, but I can't commit changes from within IntelliJ (only with TortoiseSVN via file manager). Also, when I imported my project into version control from my desktop computer, the working copy wasn't put under version control. So I can't update from my desktop unless I check it out to a different folder.

I think there is something wrong with the SVN plugin with this version of IntelliJ (10.5.1). Does anyone else have problems with committing changes?

RESOLUTION I needed to 1) Update Settings | Version Control to map Subversion to the working directory 2) Import into Version Control 3) Check it out again

It may possibly have been caused by the fact that the modules were originally standalone projects which were in separate repositories. Whatever the cause, IntelliJ's "No changes detected" dialog isn't the most helpful.

like image 993
Luigi Plinge Avatar asked Jul 06 '11 02:07

Luigi Plinge


People also ask

How see commit changes in IntelliJ?

IntelliJ IDEA lets you review the state of your project at a selected revision. Open the Git tool window Alt+9 and switch to the Log tab. Select a commit and choose Show Repository at Revision from the context menu.

How connect SVN to IntelliJ?

Open the SVN Repositories tool window by choosing VCS | Browse VCS Repository | Browse Subversion Repository from the main menu. In the SVN Repositories tool window choose New | Repository Location from the context menu, or click the. button on the toolbar.

How do I get SVN repository in IntelliJ?

Browse Subversion repository All you need is a valid user account. Choose VCS | Browse VCS Repository | Browse Subversion Repository from the main menu. The SVN Repositories tool window will open. in the toolbar and specify the repository URL in the New Repository Location dialog that opens.

How do I enable commit option in IntelliJ?

Starting from IntelliJ IDEA version 2020.1, you can switch to a non-modal commit interface: select the Use non-modal commit interface option (enabled by default for new installations) on the Version Control | Commit page of the IDE settings Ctrl+Alt+S .


2 Answers

VCS -> Refresh File Status solved this for me, when Intellij suddenly stopped noticing changes.

like image 120
Stoffe Avatar answered Oct 03 '22 01:10

Stoffe


Please refer to the FAQ.

As for the content root, make sure that it's located under the project root or module root, in this case the path will be stored relatively to the project/modile root inside the iml file. If the fixed system specific path is used in the iml, such module will not work on other systems.

UPDATE: Make an explicit mapping between the actual working directory and Subversion in Settings | Version Control dialog. If you are using the default placeholder and your project files are not under the checkout root, it could be the case.

After performing the initial import you need to do a checkout in order to use version control in IDEA.

like image 21
CrazyCoder Avatar answered Oct 03 '22 01:10

CrazyCoder