I'm using the svn
command from Java to get info about a working copy.
final Process exec = Runtime.getRuntime().exec(
new String[]{"svn","info","--xml","/path/to/wc"}
);
ByteStreams.copy(exec.getErrorStream(), System.err);
// ... more code to read output
This gives the error output
/path/to/wc
: (Not a versioned resource)
However, if I run the same command in a terminal window, I get the output I want. I also tried to rule out the environment when running in a terminal:
env -i svn info --xml /path/to/wc
But the output is still correct. Why does it behave differently when run from Java?