static Commandline buildCmd( File workingDir, String[] cmdAndArgs )
throws ScmException
{
Commandline cmd = new Commandline();
cmd.setExecutable( HgCommandConstants.EXEC );
cmd.addArguments( cmdAndArgs );
if ( workingDir != null )
{
cmd.setWorkingDirectory( workingDir.getAbsolutePath() );
if ( !workingDir.exists() )