Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

commit only directory and not the files in it

Tags:

svn

I am committing the files to SVN using the API available in SVNKit, using the below code

ourClientManager.getWCClient().doAdd(subFile, false, false, true, false);
ourClientManager.getCommitClient().doCommit(path, false, comment, false, false);

When i commit a new directory, the file in it are automatically committed. (I have set recursive false.) Is there a way to stop that? I want to pass a different comment for the new directory committed and the file committed, so i want commit them separately. Please suggest if there is a way.

like image 568
Krishnaveni Avatar asked Mar 25 '13 06:03

Krishnaveni


1 Answers

In svn commands, you'd do svn add --depth=empty mydirectory

With SVNKit, pass in the EMPTY value for the SVNDepth parameter, e.g.:

doAdd(mydirectory, false, false, false, SVNDepth.EMPTY)
like image 116
Luke Z Avatar answered Oct 20 '22 19:10

Luke Z