After upgrading to IntelliJ IDEA 2021.2.2 Ultimate Edition, I've noticed now that when I go to the Commit pane and select Show Diff on a file in the Default Changelist, that it includes the Unversioned Files in the set of files for the diff comparison.
That is, say I only change one line of code in pom.xml but I also have some un-versioned file, let's say called temp.sql. If I open the Show Diff tool by select Show Diff from pom.xml in the Default Changelist, then the Compare to Next File button is still enabled. Clicking it takes me to temp.sql`, though I have no desire to look at it since I don't even have it in source control.
For example, here I have a Default Changelist with a change to one file in source control, pom.xml. And I have an un-versioned file called temp.sql.
When I select Show Diff on a file in the Default Changlist, it should, in my opinion, and in my previous version of IntelliJ, only show you...the Default Changelist, which is pom.xml. Instead it is giving me pom.xml and temp.sql.
Is this a new feature? It seems like a bug to me. I can't seem to find any documentation for it. I can't find any way to turn it off.
I see there is a "Show unversioned files" check box in the Version Control > Commit section of Preferences, but clicking it doesn't seem to change anything.
If I choose Show Diff on the Default Changelist object, rather than on a file in the Default Changelist, that it restricts navigation to the files in the change list as I want. It's only if I select Show Diff from a file in the Default Changelist that includes all files in all change lists, including un-versioned files.
Ruslan Kuleshov made a comment that this seems like a known issue, https://youtrack.jetbrains.com/issue/IDEA-237528.
New commit tool: don't jump to other changelist's changes
I always review all changes on the current changelist before commit. I focus the diff preview and use F7 to jump through all changes on all files. Previously, when I reached the last file F7 stopped jumping to other files. But after enabling the new tool, when I press F7 on the last changed file on the current changelist, it jumps to the first change on the next changelist. That's a problem since I can begin reviewing changes which are not intended for commiting right now, loosing time, confusing me and even risking to mix files from different changesets.
I had failed to find that issue on https://youtrack.jetbrains.com because I hadn't yet tried having files in source control with changes in a non-default change list. I was only searching YouTrack for the fact that Show Diff now includes un-versioned files.
So, it seems that if you choose Show Diff from a file in a change list, then the diff comparison tool will now include all files in the set of files, regardless which change list they are in and regardless whether they are in source control yet.
I think that this is a bug and have voted for the issue. I encourage others to do so as well.
Related
I'm on IntelliJ 2019.2.4 (Ultimate) I'm not sure of the version I upgraded from, but it was from 2018 for sure. I noticed this annoying changelist below my default changelist in a very click-baity way, and I can't find a setting to get rid of it. Trying to delete it prompts me to delete the actual file in that changelist, which I don't want to do. It's nothing I've set up, and seems to be something IntelliJ is doing automatically.
(For posterity/if the image dies, my screenshot shows my changelist with some files I changed in default, and then a second, unwanted changelist below that says 'People who change the files in the active changelist also change:
The node you see is not actually a changelist, and there are no changed files inside it. It lists files that, based on your project git history, are usually changed in the same commits as the files in the active changelist, and appear related to the changes you applied.
The purpose of this node is to suggest some files you might want to change and commit in addition to already modified files, so there is no need to amend or create a new commit with these changes later if the files do need to be modified as well.
If you don't want to see it, just disable the Show files related to the active changelist option under the Eye in the Local Changes toolbar. Disabling the ChangeReminder plugin would also work, but is unnecessary.
I'm not sure if this is an intellij version control or SVN issue, but is there a way to disable all auto subversion / version control update checks in Intellij?
When you click the version control tab at the bottom of the IDE and look at local changes, the lists often say "Updating...".
I want to use subversion, but for huge projects the "updating" in intellij version control sometimes takes a good 10 minutes, and it starts randomly for no reason, even when I have not made changes. I checked the settings and I don't have "check every" or "refresh every" options checked under subversion.
Basically I never want Intellij to stop checking the whole project and server every time I make a small change to a file.
When you click the version control tab at the bottom of the IDE and look at local changes, the lists often say "Updating...".
This means IDE is refreshing the local status of the files to correctly show them in the Local changes and other respective places. It is not related to remote servers.
It could take long because of e.g. huge number of unversioned files in the project. In this case, adding them to svn:ignore should help.
I'm new to the IntelliJ IDE. In the past I was working with Visual Studio or Eclipse.
In those IDEs there was an asterisk * above the name of the file which has been modified.
But in IntelliJ with the default configuration I can't see if the file is modified. What's more the file is saved automatically when I change focus to another window.
I've found some options under Settings -> IDE Settings -> General -> Synchronization:
Synchronize files on frame activation
Save files on frame deactivation
Save files automatically if application is idle for...
After unchecking all that options the file is not saved automatically every time I change focus to another window, which is good. But still I can't:
see if the file is modified (no asterisk)
decide if the file should be saved when I'm closing it (IDE doesn't ask for that)
And when I'm closing IntelliJ file which has been modified is saved without even noticing.
Do you know what can I do to change how IntelliJ behaves?
After unchecking mentioned options go to:
Settings/Editor(IDE Settings)/Editor Tabs:
Check "Mark modified tabs with asterisk"
On 2019.3 Ultimate it's under:
Settings/Editor/General/Editor Tabs:
Mark modified (*)
The exact Save feature like eclipse is not available in IntelliJ.
Because IntelliJ IDEA has the ability to change so many files
simultaneously in large refactoring actions, and change them without
ever opening them, single file saves don't make very much sense. In
recognition of this, IntelliJ IDEA reserves the right to save any of
your files literally whenever it wishes. It's actually quite nice to
never have to worry about your file's save statuses, once you get used
to it.
"What if I don't like some changes I made, and want to roll them
back?", I hear you say. Well, for that IntelliJ IDEA includes this
amazing feature called the Local History. Every time it saves your
files, IntelliJ IDEA actually saves a diff of your file from it's
previous state, and saves that as well. You can see the entire edit
history of your files (going back some number of days), see the
changes you've made, and roll back any change. It rules triumphantly,
and more than makes up for the temporary disorientation caused by lack
of single-file save.
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206336279/comments/207351939
To show an asterisk when a file is modified: open Settings (CTRL+ALT+S), switch to Editor > General > Editor Tabs and select the Mark modified tab with asterisk checkbox.
To remove autosave, uncheck: Appearance & Behavior > System Settings > Save files on frame deactivation
How can I access previous checked in versions of workspace repository?
I just seem to be able to compare against the latest changes sets delivered to the stream. Can I also view/compare previous version of a file which has been checked into my repository workspace ?
You can display the history of a file checked in by right-clicking on ("Show History").
From there, in the "History" view, you can right-click on any version and select "Compare to" with any other version (not just the previous one).
As explained in this thread, you can access (open) the content of any older version you want, which gives you the opportunity of replacing the current version with said content, should you want to revert back for just one file.
Rolling back would be a slightly different issue:
If the change set that created the current version contains only that version, then you can replace the current version with the previous version by discarding that change set.
But if that change-set modifies multiple versions, you cannot roll back just that file. Work Item 59688 requests the ability to "split" a change set, so you can move this change into it's own separate change set (and then you could roll back the change to just that file).
Note that the history will be by default the one for that given file done in your repo workspace (checkins) or in your stream (deliver).
The same "show history" done at the Component level (when you right click on a Component, in the "Components" section, and select "Show Repository files", would give the full history (done on any Stream), but wouldn't display the history done on repo workspace (chekins).
Note also that only RTC4.0 has "Checkin history"
This is essentially the history of a file within a change set.
Each time you check-in a file into a change set, the content is stored in the repository. Normally you see only the final version of a file within the change set. But sometimes you want to go back and see what the intermediate versions of the file were. Check-in History is an expansion of the changes made to the file each time it was checked into a change set.
In the changes tab, IDEA shows a bunch of files which, when I view with the diff viewer, have no differences. Then when I commit to svn these files are committed as well. Is there a way I can only view/commit files which are actually different?
In the Show Diff window, what is Ignore Whitespace set to (in the top left corner)? If it is set to anything other than 'Do not ignore', try changing it and seeing if that is the difference in the files.
Depends on the VCS, Perforce has "Revert Unchanged Files" in the Perforce VC menu. While Git only checks in files that are changed (checks diff when committing). Otherwise it might be the above answer that Idea has a setting for ignoring/hiding whitespace only changes)
Could there be property changes on those files? Right click, then select Subversion -> Properties Diff with Local