try {
final Writer writer = new OutputStreamWriter(result, getEncoding());
SVNFileUtil.execCommand((String[]) args.toArray(new String[args.size()]), true,
new ISVNReturnValueCallback() {
public void handleReturnValue(int returnValue) throws SVNException {
if (returnValue != 0 && returnValue != 1) {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.EXTERNAL_PROGRAM,
"''{0}'' returned {1}", new Object[] { diffCommand, String.valueOf(returnValue) });