Shelved items not shown

Answered

I recently went to apply some work that I had shelved some time ago, and I found that nothing appears in my Shelf even though .idea/shelf contains many changes. Any idea why this might be happening? I can't see anything relevant in the log, and I get no errors in the IDE.

IntelliJ IDEA 2019.1.2 Preview (Ultimate Edition)
Build #IU-191.7141.2, built on April 23, 2019
Licensed to Colin Fleming
Subscription is active until November 14, 2019
JRE: 1.8.0_202-release-1483-b49 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.4

5 comments

> though .idea/shelf contains many changes

Most likely xml files with metadata are missing, patch files are not enough.

You can try using Local History to restore them. 

0

Yes, some of these have entries in Local History - I'll try to recover from those. However some of the changes do have an xml file, and also a patch file, and the xml file seems to correctly indicate the patch file. These still don't show up - any idea why?

0

> These still don't show up - any idea why?

Unless the mentioned xmls are somehow corrupted it should work. Compare them with a valid one (e.g. from a newly created shelf). maybe those are deleted shelf files - they should have a specific flag in the xml.

Also, make sure shelf location is not changed in Settings | Version Control | Shelf

0

Ok, I've managed to recover the xml files using Local History. Looking at the Local History, it seems they were all deleted in an Exit event - do you know why?

I've done some comparisons, it looks like those with recycled="true" are not shown, and those with recycled="false" are shown - is this an indicator of whether the patch has been applied or not?

I thought that the fact that they were deleted on exit meant that perhaps IntelliJ tidied up old applied patches from time to time on application exit, but it had definitely deleted some that I wanted to keep and hadn't applied yet.

0

> deleted in an Exit event - do you know why?

On Exit IDE can delete xmls for the patches that are removed from the Shelf tab.

> perhaps IntelliJ tidied up old applied patches from time to time on application exit, but it had definitely deleted some that I wanted to keep and hadn't applied yet.

It is unexpected. We are investigating why this can happen - please follow https://youtrack.jetbrains.com/issue/IDEA-212292

0

Please sign in to leave a comment.