//Add to repository
String[] add_cmd = new String[] { BazaarConstants.ADD_CMD };
ScmFileSet filesToAdd = new ScmFileSet( new File( "" ), files );
add_cmd = BazaarUtils.expandCommandLine( add_cmd, filesToAdd );
ScmResult result = BazaarUtils.execute( WORKING_DIR, add_cmd );
if ( !result.isSuccess() )
{
String message =
"Provider message: " + result.getProviderMessage() + "\n" + "Output: " + result.getCommandOutput();
throw new Exception( message );
}
// Commit the initial repository
String[] commit_cmd = new String[]{BazaarConstants.COMMIT_CMD, BazaarConstants.MESSAGE_OPTION, COMMIT_MESSAGE};
result = BazaarUtils.execute( WORKING_DIR, commit_cmd );
if ( !result.isSuccess() )
{
String message =
"Provider message: " + result.getProviderMessage() + "\n" + "Output: " + result.getCommandOutput();
throw new Exception( message );
}
}