简体   繁体   English

SVN的Java代码,用于将文件添加并提交到服务器

[英]Java code for SVN to add and commit the Files into server

I am writing java code which add and commits the files to SVN server using java 我正在编写Java代码,该代码使用Java添加文件并将其提交到SVN服务器

String str="svn add D:/dump1/dumpo/CVE./*";

Process p1 = Runtime.getRuntime().exec(str);

String str1="svm commit -m 'addingfile';

Process p1 = Runtime.getRuntime().exec(str1);

above is the code which add the files to SVN server but not commiting, 以上是将文件添加到SVN服务器但未提交的代码,

But after commiting only these files can reflect into the SVN server with a Version number. 但是在提交后,只有这些文件才能通过版本号反映到SVN服务器中。

I want to add and commit the files at a time. 我想一次添加并提交文件。

I want to add and commit the files or folders at a time using java code. 我想一次使用Java代码添加和提交文件或文件夹。

Please can you help me to reslove the same. 请您能帮我重新爱上它吗?

Maybe your commit is happening too fast after the add. 添加之后,您的提交可能发生得太快。 You might need to wait some time between calls. 您可能需要在通话之间等待一段时间。 Check this out: 看一下这个:

http://www.techiegyan.com/2008/06/04/how-to-run-external-exeprogram-from-java/ http://www.techiegyan.com/2008/06/04/how-to-run-external-exeprogram-from-java/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM