Subversion Repositories XServices

Compare Revisions

Ignore whitespace Rev 150 → Rev 181

/SVN-ALFEventEmitter/trunk/src/net/brutex/svn/SVNLookExecutor.java
22,6 → 22,7
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
 
import net.brutex.svn.SVNCommitInfo.ChangeType;
41,6 → 42,8
private final String repos;
private String TXN = null;
private String rev = null;
private String locale = "de_DE.UTF-8";
private String encoding = "UTF-8";
/**
* Instantiates a new sVN look executor.
86,10 → 89,11
 
ProcessBuilder pf = new ProcessBuilder(cmdline);
logger.debug(String.format("Executing svnlook with commandline '%s'.", pf.command()));
Map<String, String> env = pf.environment();
env.put("LANG", locale);
Process svnprocess = pf.start();
BufferedReader stdin = new BufferedReader(new InputStreamReader(svnprocess.getInputStream()));
BufferedReader stderr = new BufferedReader(new InputStreamReader(svnprocess.getErrorStream()));
BufferedReader stdin = new BufferedReader(new InputStreamReader(svnprocess.getInputStream(), encoding));
BufferedReader stderr = new BufferedReader(new InputStreamReader(svnprocess.getErrorStream(), encoding));
String s;
while( (s = stdin.readLine()) != null ) {
sb.append(s + '\n');
173,5 → 177,18
return result;
}
public void setEncoding(String encoding) {
this.encoding = encoding;
}
/**
* Set the locale that will be pushed into
* 'LANG' environment variable.
*
* @param locale i.e. de_DE.UTF-8
*/
public void setLocale(String locale) {
this.locale = locale;
}
 
}