[vcs] Disable "Revert" action in the RepositoryChangesBrowser for some cases. IDEA...
authorKirill Likhodedov <Kirill.Likhodedov@jetbrains.com>
Thu, 2 Aug 2012 14:13:50 +0000 (18:13 +0400)
committerKirill Likhodedov <Kirill.Likhodedov@jetbrains.com>
Thu, 2 Aug 2012 14:15:26 +0000 (18:15 +0400)
commite14552f585eeb747c9b36e06a0821641f88e4758
tree0bfe7826b7df1eb6e52f280a88a19e60ec8524e1
parent1df16ac527e4bfed261e23f35ad700db784432ab
[vcs] Disable "Revert" action in the RepositoryChangesBrowser for some cases. IDEA-55533, IDEA-55673, IDEA-56407

Let CommittedChangeList hold the flag "modifiable": if the flag is disabled, "revert" action is disabled (and theoretically, some other actions).
Set the flag to false for all Git changelists, except for the ones created from the file history and folder diff.
13 files changed:
platform/vcs-api/src/com/intellij/openapi/vcs/versionBrowser/CommittedChangeList.java
platform/vcs-api/src/com/intellij/openapi/vcs/versionBrowser/CommittedChangeListImpl.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/actions/RevertSelectedChangesAction.java
plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/changeBrowser/CvsChangeList.java
plugins/git4idea/src/git4idea/GitUtil.java
plugins/git4idea/src/git4idea/actions/GitShowAllSubmittedFilesAction.java
plugins/git4idea/src/git4idea/changes/GitChangeUtils.java
plugins/git4idea/src/git4idea/changes/GitCommittedChangeList.java
plugins/git4idea/src/git4idea/history/GitDiffFromHistoryHandler.java
plugins/git4idea/src/git4idea/rebase/GitRebaseEditor.java
plugins/git4idea/src/git4idea/ui/GitReferenceValidator.java
plugins/git4idea/src/git4idea/ui/GitUnstashDialog.java
plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnChangeList.java