When using p4publish with multiple paths listed in the `paths` argument, and the workspace doesn't contain any changes compared to the depot, publish will fail with
Unable to publish workspace: hudson.AbortException: P4JAVA: Error(s): No file(s) to reconcile.
This seems to be a result of a check in ClientHelper.java
getValidate().check(status, "- no file(s) to reconcile", "instead of", "empty, assuming text", "also opened by");
which apparently should ignore the p4java status "- no file(s) to reconcile" but when reconciling with multiple paths, the message is "No file(s) to reconcile." - this can be easily tested from the command line:
> p4 rec foo/... foo/... - no file(s) to reconcile. > p4 rec foo/... bar/... No file(s) to reconcile.
The attached patch changes the ignore string so that it's recognized in both cases, as the check uses StringUtils.containsIgnoreCase(msg, istring) to compare the message with it.
Thank you very much for letting us know abannerth and providing a patch.
I confirm I can reproduce this.
Reproduction Steps:
(1) Create a depot path called //depot/TwoFolders and and files in two subfolders:
mkdir TwoFolders mkdir TwoFolders/src echo test >TwoFolders/src/test1 mkdir TwoFolders/bin echo test >TwoFolders/bin/test2 p4 reconcile p4 submit -d "adding two test files"
(2) Create following Jenkins job (replace credential with your credential):
(3) Run above . It will fail with:
I will let the developers know.