这是我的代码。请审查它。它似乎没有p.waitFor()
返回,请帮助我。谢谢。
try
{
String svnCmd="svn diff -r " +startVersion +":" + endVersion +" --summarize --username testdomain\\tesuer --password test.123 http://cvs-server.testserver.com:8001/svn/projects/testproject/";
Process p = Runtime.getRuntime().exec(svnCmd);
p.waitFor();
BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = reader.readLine();
while (line != null)
{
System.out.println(line);
line = reader.readLine();
}
}
catch (IOException e1)
{
}
catch (InterruptedException e2)
{
}
System.out.println("Done");