try {
server = repository.getServerPool().take(this);
changeState(State.QUEUED, State.RUNNING, true);
} catch (InterruptedException e1) {
changeState(State.CANCELING, State.READY, false);
throw new CancelledExecutionException(this);
}
List<String> commandLine = new ArrayList<String>(this.cmdLine);
boolean ok = false;
getRepository().addToCommandLine(commandLine);
commandLine.addAll(Arrays.asList(args));
try {
this.outputChannelStream = server.runCommand(commandLine, this);
HgInputStream stream = new HgInputStream(outputChannelStream, this.repository.newDecoder());
ok = true;
return stream;
} catch (UnexpectedServerTerminationException e) {
if (state.get() == State.CANCELING) {
throw new CancelledExecutionException(this);
}
throw e;
} catch (IOException e) {
throw new RuntimeIOException(e);
} finally {