0

Assume I create a Branch1 on existing branch Branches\ the following way using SVNKit:

SVNCopyClient copyClient = new SVNCopyClient(authManager, options);
SVNCopySource copySource = new SVNCopySource(SVNRevision.UNDEFINED, SVNRevision.HEAD, sourceUrl);
copySource.setCopyContents(false);

copyClient.doCopy(new SVNCopySource[] { copySource }, toUrl, 
        false, // isMove
        true,  // make parents
        true,  // failWhenDstExists
        commitMessage, // commit message
        null); // SVNProperties

All works nice, branch created. Then I want to create Branch2 on the same source branch using previous code. Branch2 created, but included existing source branch conent, i.e. Branch1. So the branches structure is:

  • Branches\
  • Branches\Branch1
  • Branches\Branch2\Branch1

Seems SVNKit uses the source branch including its content as a source for Branch2. According to documentation setCopyContents(false) should exclude this content but it does not. What am I doing wrong?

host.13
  • 108
  • 1
  • 1
  • 11

1 Answers1

0

Fugured out. I used copy operation so all worked as disigned. Need to use mkDir operation instead in such cases.

host.13
  • 108
  • 1
  • 1
  • 11