"Cannot undo. Some files were changed"

I'm curious why I get this error after I run an ant script from IDEA that copies over some jsps to a directory. If I then try to undo I often get "Cannot undo. Some files were changed." It's quite frustrating. Is there a way to prevent this from happening?

(I'd try to search the forum here but I don't see a search anywhere on this EAP forum page?)

Thanks

6 comments

I also have the 'Cannot undo. Some files were changed." message quite frequently.
I have learned to use Local History to manually undo changes on a file when the
undo doesn't work.

This has been discussed before, but Forum Search is disabled so I can't check.
From what I remember, IDEA undo has some restrictions because some complicated
operations like refactoring could modify multiple files.
But.. I see this error message many times after just doing simple edits on
a number of files.

IDEA should be keeping track of simple edits/changes which affect only a single file versus refactoring operations which affect multiple files. I should be able to undo
simple changes on a file no matter what other files have changed until the undo stack
reaches a complex operation which involved this file.

It works most of the time, but almost every day I hit that error message, and
90% of the time it doesn't make any sense basd on the changes I have done.

If Jetbrains implemented the request below, it would be easier to figure out
what is going on:

"Cannot undo. Some files were changed" error does not identify which files (Derek Foster)
http://www.jetbrains.net/jira/browse/IDEA-5337

0


From what I remember, IDEA undo has some restrictions
because some complicated
operations like refactoring could modify multiple
files.
But.. I see this error message many times after just
doing simple edits on
a number of files.


Yes, I'm getting this on simple JSP pages where all I'm doing is a simple cut or delete of some lines and then I'll run an ant script that copies this file to my local webapp dir. Then when I'm back on the JSP I often get the "Cannnot undo." Often I'll get the message but can try again right away to undo and it'll work, but sometimes I am totally unable to undo. I'm not sure how editing a single JSP's text could affect that much behind the scenes?

0

Hello Rick,

I'm not sure how editing a single JSP's text
could affect that much behind the scenes?


That's not jsp editing but most probably filesystem sync that triggers after
ant script execution.

-


Maxim Shafirov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

Hello Maxim,

I get it after simple find and replace, unfocus idea to look at something,
refocus, ctrl + z and I get either this message or I get Undo? with nothing,
I click OK and nothing gets undone. This is in both Irida and Demetra.
It's been there for ages.

MS> Hello Rick,
MS>
>> I'm not sure how editing a single JSP's text
>> could affect that much behind the scenes?
MS> That's not jsp editing but most probably filesystem sync that
MS> triggers after ant script execution.
MS>
MS> -


MS> Maxim Shafirov
MS> JetBrains, Inc
MS> http://www.jetbrains.com
MS> "Develop with pleasure!"


0

Yeah, this is a really old bug that needs to be fixed. It has nothing whatsoever to do with the complexity of your edits. I've been able to undo massive refactorings with no problem and then get an error when I try to undo a set of simple edits. Please fix it.

0

If I've understood correctly, JB would very much like to fix it but they
don't have a reproducible test case which makes things lots harder.
R

0

Please sign in to leave a comment.