简体   繁体   中英

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

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,

But after commiting only these files can reflect into the SVN server with a Version number.

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.

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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