Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catch AbortException for hg locate, add '--hidden' for certain commands and add option to include bookmarks #96

wants to merge 6 commits into from

catch AbortException for hg locate

When a file can not be found, 'hg locate' exits with return value 1, which cause
an Abort Exception to be thrown.
Therefore catch the exception and handle it as SCMFile.Type.NONEXISTENT.
  • Loading branch information...
domruf committed Jan 31, 2017
commit c9674b9e0de463f719bdf5eb21501fcc4d50fbdf
@@ -11,6 +11,7 @@
import hudson.FilePath;
import hudson.Launcher;
import hudson.Util;
import hudson.AbortException;
import hudson.model.Action;
import hudson.model.Descriptor;
import hudson.model.Item;
@@ -155,6 +156,8 @@ public SCMProbeStat stat(@NonNull String path) throws IOException {
return SCMProbeStat.fromType(SCMFile.Type.REGULAR_FILE);
} catch (InterruptedException e) {
throw new IOException(e);
} catch (AbortException e) {
return SCMProbeStat.fromType(SCMFile.Type.NONEXISTENT);

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.