SVN commit issue when using SVNKit Libraries in Java -
couldn't commit modified file svn repository using svnkit libraries in java. no stack trace information available me debug disappointing.
the file modified using java program , have commit modified file using svn. (svn commit -m "updated").
the file has been modified , appears below when run 'svn status' command.
svn status filename
m filename
here code:
try { string url = "http://repository url"; file file = new file("<path file>"+inputfile); davrepositoryfactory.setup(); svnurl svnurl = svnurl.parseuridecoded(url); svncommitinfo commitinfo; string uname = <username>; // auth details connect svn repo string pwd = <password>; pw.println("<br> svn url : "+ svnurl); //pw reference object of response.getwriter() davrepository repo = (davrepository) davrepositoryfactory.create(svnurl); isvnauthenticationmanager authmanager = svnwcutil.createdefaultauthenticationmanager(uname, pwd); repo.setauthenticationmanager(authmanager); long latestrevision = repo.getlatestrevision(); pw.println("<br> latest revision : "+latestrevision); /* svnclientmanager clientmanager = svnclientmanager.newinstance(null,repo.getauthenticationmanager()); try { svnupdateclient uc = clientmanager.getupdateclient(); uc.doupdate(file, svnrevision.head, true); svncommitclient cc = clientmanager.getcommitclient(); commitinfo = cc.docommit(new file[] {file}, false, "updated regex", null, null, false, false, svndepth.infinity); pw.println("<br> commit information : "+commitinfo); } { clientmanager.dispose(); } */ } catch (exception e) { pw.println(e.getmessage()); }
my output: svn url : repository url [ljava.lang.stacktraceelement;@1e610e3 (and modified file not committed)
any appreciated. thanks
Comments
Post a Comment