Community
Participate
Working Groups
0.2 RC1 I have an outgoing file deletion, but I cannot stage it from the Git Status page. I get this error message: Unable to load /gitapi/index/file/e/doc/org.eclipse.orion.doc.isv/WikiDoc/Orion/Server_API/File_API/File-API.html status:500 In the console I can see this JSON error response: {"Severity":"Error","Message":"Failed to process an operation on index for file/e/doc/org.eclipse.orion.doc.isv/WikiDoc/Orion/Server_API/File_API/File-API.html","HttpCode":500,"Code":0}
By setting a breakpoint on the server I am able to see the underlying exception: java.util.NoSuchElementException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:796) at java.util.HashMap$EntryIterator.next(HashMap.java:834) at java.util.HashMap$EntryIterator.next(HashMap.java:832) at org.eclipse.orion.server.git.servlets.GitIndexHandlerV1.handleRequest(GitIndexHandlerV1.java:61) at org.eclipse.orion.server.git.servlets.GitIndexHandlerV1.handleRequest(GitIndexHandlerV1.java:1) at org.eclipse.orion.server.git.servlets.GitHandlerV1.handleRequest(GitHandlerV1.java:63) at org.eclipse.orion.server.git.servlets.GitHandlerV1.handleRequest(GitHandlerV1.java:1) at org.eclipse.orion.server.git.servlets.ServletGitHandler.handleRequest(ServletGitHandler.java:49) at org.eclipse.orion.server.git.servlets.ServletGitHandler.handleRequest(ServletGitHandler.java:1) at org.eclipse.orion.server.git.servlets.GitServlet.doGet(GitServlet.java:39) at org.eclipse.orion.server.git.servlets.GitServlet.doPut(GitServlet.java:52)
The problem is that GitUtils#getGitDirsInParents stops traversing if the file does not exist. However in this case I want to process a deleted file that still has a valid git repository as a parent.
Created attachment 197920 [details] Potential fix
Please consider for RC2
+1 for RC2 - did not review it though.
Thanks for the patch John, I added tests verifying the fix.
Fixed with http://git.eclipse.org/c/e4/org.eclipse.orion.server.git/commit/?id=e972f59a375322f4de65b12fd457bd0a498dc4e1.