ChangeProvider.getChanges() receiving requests for ignored files
I'm currently giving a hand to Gary Evesson with MercurialIDEA, and I've identified a strange situation where IDEA (Diana, #8280) calls getChanges() on our change provider with dirty files whose FilePath's have a null VirtualFile.
Apparently these are files ignored by IDEA (matching the "Ignore Files and Folders" global option), so my solution is simply ignore them as well, but I wonder why IDEA is calling my change provider with those files in the first place.
Please sign in to leave a comment.
Hello Marcus,
No, this happens in a different case: a FilePath with a null VirtualFile
means that you're asked to update the status for a locally deleted file.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Hmm, strange then. I've debugged this case, and when I looked at the FilePaths,
they were all existing files under .hg (which is ignored in General Settings). Maybe something else is making IDEA think they were deleted?Nevermind. I checked again, and .hg isn't ignored in the sandbox (I forgot the debugging sandbox doesn't inherit the settings from the main installation). I think I have an idea why IDEA thinks they were deleted: repository files are never changed by hg; before changing any repository files, hg writes a new version in a temporary file, then overwrites the old file with the new version, atomically. Maybe this is what's causing IDEA to report these files as locally deleted?
Edited by: Marcus Brito on Apr 16, 2008 1:53 PM
Hello Marcus,
>> No, this happens in a different case: a FilePath with a null
>> VirtualFile means that you're asked to update the status for a
>> locally deleted file.
>>
Hmm. Looks like a bug then. :) If you can reproduce this, please file a JIRA
issue with steps to reproduce (I can look at the Mercurial plugin if that's
needed).
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Hello Dmitry,
Apparently the NNTP gateway doesn't pick up edits, so here's what I've found after I made the original post:
I checked again, and .hg isn't ignored in the sandbox (I forgot the debugging sandbox doesn't inherit the settings from the main installation). I think I have an idea why IDEA thinks they were deleted: repository files are never changed by hg; before changing any repository files, hg writes a new version in a temporary file, then overwrites the old file with the new version, atomically. Maybe this is what's causing IDEA to report these files as locally deleted?