Only fix the directory, not the files in it

I am making SVN files using the API available in SVNKit using the code below

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 is automatically committed. (I set up a recursive false.) Is there a way to stop this? I want to pass another comment for the new fixed directory and file, and I want it to execute them separately. Please suggest if there is a way.

+4
source share
2 answers

In svn commands you will do svn add --depth=empty mydirectory

With SVNKit, change to the EMPTY value for the SVNDepth parameter, for example:

 doAdd(mydirectory, false, false, false, SVNDepth.EMPTY) 
+11
source

The answer given by Luke works well, but he will not add auxiliary directories inside 'mydirectory', so the svn command will be,

 svn add -N mydirectory 

Type in 'mydirectory' and run this command,

 svn propset svn:ignore '*.*' svn commit -m "Adding directory structure only" 
0
source

All Articles