|
1 | 1 | package org.scm4j.vcs.svn;
|
2 | 2 |
|
| 3 | +import java.io.ByteArrayOutputStream; |
| 4 | +import java.io.File; |
| 5 | +import java.io.FileWriter; |
| 6 | +import java.io.UnsupportedEncodingException; |
| 7 | +import java.nio.charset.StandardCharsets; |
| 8 | +import java.util.ArrayList; |
| 9 | +import java.util.Collection; |
| 10 | +import java.util.Collections; |
| 11 | +import java.util.HashSet; |
| 12 | +import java.util.List; |
| 13 | +import java.util.Set; |
| 14 | + |
3 | 15 | import org.apache.commons.io.FileUtils;
|
4 |
| -import org.scm4j.vcs.api.*; |
| 16 | +import org.scm4j.vcs.api.IVCS; |
| 17 | +import org.scm4j.vcs.api.VCSChangeType; |
| 18 | +import org.scm4j.vcs.api.VCSCommit; |
| 19 | +import org.scm4j.vcs.api.VCSDiffEntry; |
| 20 | +import org.scm4j.vcs.api.VCSMergeResult; |
| 21 | +import org.scm4j.vcs.api.WalkDirection; |
5 | 22 | import org.scm4j.vcs.api.exceptions.EVCSBranchExists;
|
6 | 23 | import org.scm4j.vcs.api.exceptions.EVCSException;
|
7 | 24 | import org.scm4j.vcs.api.exceptions.EVCSFileNotFound;
|
8 | 25 | import org.scm4j.vcs.api.workingcopy.IVCSLockedWorkingCopy;
|
9 | 26 | import org.scm4j.vcs.api.workingcopy.IVCSRepositoryWorkspace;
|
10 | 27 | import org.scm4j.vcs.api.workingcopy.IVCSWorkspace;
|
11 |
| -import org.tmatesoft.svn.core.*; |
| 28 | +import org.tmatesoft.svn.core.ISVNLogEntryHandler; |
| 29 | +import org.tmatesoft.svn.core.SVNCommitInfo; |
| 30 | +import org.tmatesoft.svn.core.SVNDepth; |
| 31 | +import org.tmatesoft.svn.core.SVNDirEntry; |
| 32 | +import org.tmatesoft.svn.core.SVNException; |
| 33 | +import org.tmatesoft.svn.core.SVNLogEntry; |
| 34 | +import org.tmatesoft.svn.core.SVNNodeKind; |
| 35 | +import org.tmatesoft.svn.core.SVNProperties; |
| 36 | +import org.tmatesoft.svn.core.SVNURL; |
12 | 37 | import org.tmatesoft.svn.core.auth.BasicAuthenticationManager;
|
13 | 38 | import org.tmatesoft.svn.core.auth.SVNAuthentication;
|
14 | 39 | import org.tmatesoft.svn.core.auth.SVNPasswordAuthentication;
|
15 | 40 | import org.tmatesoft.svn.core.internal.wc.DefaultSVNOptions;
|
16 | 41 | import org.tmatesoft.svn.core.io.SVNRepository;
|
17 | 42 | import org.tmatesoft.svn.core.io.SVNRepositoryFactory;
|
18 |
| -import org.tmatesoft.svn.core.wc.*; |
19 |
| -import org.tmatesoft.svn.core.wc2.*; |
| 43 | +import org.tmatesoft.svn.core.wc.ISVNConflictHandler; |
| 44 | +import org.tmatesoft.svn.core.wc.ISVNOptions; |
| 45 | +import org.tmatesoft.svn.core.wc.SVNClientManager; |
| 46 | +import org.tmatesoft.svn.core.wc.SVNConflictChoice; |
| 47 | +import org.tmatesoft.svn.core.wc.SVNConflictDescription; |
| 48 | +import org.tmatesoft.svn.core.wc.SVNConflictResult; |
| 49 | +import org.tmatesoft.svn.core.wc.SVNCopyClient; |
| 50 | +import org.tmatesoft.svn.core.wc.SVNCopySource; |
| 51 | +import org.tmatesoft.svn.core.wc.SVNDiffClient; |
| 52 | +import org.tmatesoft.svn.core.wc.SVNRevision; |
| 53 | +import org.tmatesoft.svn.core.wc.SVNRevisionRange; |
| 54 | +import org.tmatesoft.svn.core.wc.SVNStatusType; |
| 55 | +import org.tmatesoft.svn.core.wc.SVNUpdateClient; |
| 56 | +import org.tmatesoft.svn.core.wc.SVNWCClient; |
| 57 | +import org.tmatesoft.svn.core.wc.SVNWCUtil; |
| 58 | +import org.tmatesoft.svn.core.wc2.ISvnObjectReceiver; |
| 59 | +import org.tmatesoft.svn.core.wc2.SvnDiff; |
| 60 | +import org.tmatesoft.svn.core.wc2.SvnDiffStatus; |
| 61 | +import org.tmatesoft.svn.core.wc2.SvnDiffSummarize; |
| 62 | +import org.tmatesoft.svn.core.wc2.SvnOperationFactory; |
| 63 | +import org.tmatesoft.svn.core.wc2.SvnTarget; |
20 | 64 |
|
21 | 65 | import java.io.ByteArrayOutputStream;
|
22 | 66 | import java.io.File;
|
@@ -416,6 +460,14 @@ public List<VCSDiffEntry> getBranchesDiff(final String srcBranchName, final Stri
|
416 | 460 | }
|
417 | 461 | }
|
418 | 462 |
|
| 463 | + public void createTrunk(String commitMessage) throws SVNException { |
| 464 | + createBranch(SVNURL.parseURIEncoded(repoUrl), SVNURL.parseURIEncoded(repoUrl + MASTER_PATH), commitMessage); |
| 465 | + } |
| 466 | + |
| 467 | + public void createBranches(String commitMessage) throws SVNException { |
| 468 | + createBranch(SVNURL.parseURIEncoded(repoUrl), SVNURL.parseURIEncoded(repoUrl + BRANCHES_PATH), commitMessage); |
| 469 | + } |
| 470 | + |
419 | 471 | @Override
|
420 | 472 | public Set<String> getBranches() {
|
421 | 473 | try {
|
|
0 commit comments