Why is there no "diff" action for "modified without checkout" files ?

When you checkout files, you can check with the builtin diff viewer whate changes you made (and they appear in the gutter).

But this is not possible for "modified without checkout" files, why not ?

0
6 comments
Avatar
Permanently deleted user

Hello Thibaut,

When you checkout files, you can check with the builtin diff viewer
whate changes you made (and they appear in the gutter).

But this is not possible for "modified without checkout" files, why
not ?


You can use the Diff action in Changes view, but the gutter markers don't
work indeed. You can file a JIRA issue for this problem.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Avatar
Permanently deleted user

Thing is this action is not enabled.

Now the VCS provider is MKS, and I may well need to add another hook for OpenAPI.

The Diff action works ok for regularly checked out files.

My ChangeProvider uses
- com.intellij.openapi.vcs.changes.ChangelistBuilder#processModifiedWithoutCheckout(VirtualFile) for files I detect as modified without checkout
- com.intellij.openapi.vcs.changes.ChangelistBuilder#processChange(Change) for files regularly checked out

I guess IDEA does not know what to compare the "modified without checkout" file with as I didn't give it the original ContentRevision.
Did I miss something ?

0
Avatar
Permanently deleted user

Hello Thibaut,

Thing is this action is not enabled.

Now the VCS provider is MKS, and I may well need to add another hook
for OpenAPI.

The Diff action works ok for regularly checked out files.

My ChangeProvider uses

-
com.intellij.openapi.vcs.changes.ChangelistBuilder#processModifiedWith
outCheckout(VirtualFile) for files I detect as modified without
checkout

-
com.intellij.openapi.vcs.changes.ChangelistBuilder#processChange(Chang
e) [change into which I feed a ContentRevision implementation allowing
IDEA to access the VCS stored version] for files regularly checked out

I guess IDEA does not know what to compare the "modified without
checkout" file with as I didn't give it the original ContentRevision.

Did I miss something ?


The diff action for files modified without checkout uses DiffProvider.getCurrentRevision()
and DiffProvider.createFileContent() to retrieve the content to compare against.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Avatar
Permanently deleted user

here is a screenshot of the context menu



Attachment(s):
Clipboard01.jpg
0
Avatar
Permanently deleted user

Thanks

0
Avatar
Permanently deleted user

worked fine, only glitch I had is the diff provider receives a VirtualFile, whereas the ContentRevision are oriented towards FilePath.

I have no clue what differences exists between the two, and used PeerFactory.getInstance().getVcsContextFactory().createFilePathOn(virtualFile) to obtain the VirtualFile in order to create the ContentRevision.

But overall it works

0

Please sign in to leave a comment.