Common code for executing hg commands.
Map between command and its valid exit codes
Default exit codes for entries not in exitCodeMap
logger.info( "EXECUTING: " + cmd );
String providerMsg = "Execution of hg command succeded";
providerMsg = "\nEXECUTION FAILED" + "\n Execution of cmd : " + cmdAndArgs +
" failed with exit code: " + exitCode + "." + "\n Working directory was: " + "\n " +
logger.error( providerMsg );
String msg = "EXECUTION FAILED" + "\n Execution failed before invoking the Hg command. Last exception:" +
boolean success = workingDir.mkdirs();
String msg = "Working directory did not exist" + " and it couldn't be created: " + workingDir;
throw new ScmException( "Command could not be executed: " + cmd, ex );
System.arraycopy( cmdAndArgs, 0, cmd, 0, cmdAndArgs.length );
cmd[i + cmdAndArgs.length] = file;
HgUtils.execute( consumer, logger, workingDir, revCmd );
Get current (working) revision.
Resolve revision to the last integer found in the command output.