AS IS:On a big project delete a lot of files (let say 100).
Try to go to the sync view -> Uncommitted -> Revert => exception.
Try to right click on the project -> Team -> Revert -> Ok = exception.
Stack trace is similar for all this cases and shows that the native java process implementation failing to create a (Windows) process, probably simply because the command line is too big:
java.io.IOException: Cannot run program "E:\work\eclipse\hgeclipseFragment_win32\os\win32\hg.exe" (in directory "D:\temp\hg\django"): CreateProcess error=87, Falscher Parameter
at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.executeToStream(AbstractShellCommand.java:190)
at com.vectrace.MercurialEclipse.commands.HgCommand.executeToStream(HgCommand.java:91)
at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.executeToBytes(AbstractShellCommand.java:138)
at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.executeToBytes(AbstractShellCommand.java:125)
at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.executeToBytes(AbstractShellCommand.java:121)
at com.vectrace.MercurialEclipse.commands.AbstractShellCommand.executeToString(AbstractShellCommand.java:289)
at com.vectrace.MercurialEclipse.team.ActionRevert.performRegularRevert(ActionRevert.java:356)
at com.vectrace.MercurialEclipse.team.ActionRevert.doRevert(ActionRevert.java:217)
at com.vectrace.MercurialEclipse.team.ActionRevert$1.runSafe(ActionRevert.java:155)
at com.vectrace.MercurialEclipse.SafeWorkspaceJob.runInWorkspace(SafeWorkspaceJob.java:41)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.io.IOException: CreateProcess error=87, Falscher Parameter
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
... 12 more
TO BE:
We should be more intelligent by creating commands. Either run them on a subset of files, or on the parent directory or hg root.