|
6 | 6 | scm4j-vcs-api is set of base classes and interfaces to build VCS support (Git, SVN, etc) libraries which exposes basic vcs-related operations: merge, branch create etc.
|
7 | 7 | scm4j-vcs-api provides:
|
8 | 8 | - A simple interface to implement basic VCS-related operations
|
9 |
| -- Set of functional tests wchich are common to each VCS implementation. Functional tests for a certain VCS implementation are done by implementing few abstract methods of base test class. Implemented in [scm4j-vcs-test](https://github.com/scm4j/scm4j-vcs-test) |
10 | 9 | - Working copies management for operations which must be executed on a local file system
|
11 | 10 |
|
12 | 11 | # Terms
|
@@ -45,7 +44,7 @@ scm4j-vcs-api provides:
|
45 | 44 | IVCS interface consists of few basic vcs functions.
|
46 | 45 | Note: null passed as a branch name is considered as Master Branch. Any non-null branch name is considered as user-created branch within conventional place for branches: any branch except "master" for Git, any branch within "Branches" branch for SVN etc. For SVN do not use "Branches\my-branch" as branch name, use "my-branch" instead.
|
47 | 46 | - `void createBranch(String srcBranchName, String dstBranchName, String commitMessage)`
|
48 |
| -- Creates a new branch with name `dstBranchName` from the Head of `srcBranchName`. |
| 47 | +- Creates a new branch named `dstBranchName` from the Head of `srcBranchName`. |
49 | 48 | - commitMessage is a log message which will be attached to branch create operation if it possible (e.g. Git does not posts branch create operation as a separate commit)
|
50 | 49 | - `VCSMergeResult merge(String srcBranchName, String dstBranchName, String commitMessage);`
|
51 | 50 | - Merge all commits from `srcBranchName` to `dstBranchName` with `commitMessage` attached
|
@@ -75,6 +74,33 @@ Note: null passed as a branch name is considered as Master Branch. Any non-null
|
75 | 74 | - Note: result could be considered as a commit which would be made on merging the branch `srcBranchName` into `destBranchName`
|
76 | 75 | - `Set<String> getBranches(String path)`
|
77 | 76 | - Returns list of names of all branches which are started from `path`. Branches here are considered as user-created branches and Master Branch. I.e. any branch for Git, "Trunk" and any branch within "Branches" branch (not "Tags" branches) for SVN etc
|
| 77 | + - `path` processing |
| 78 | + - Git |
| 79 | + - prefix of branch names to browse |
| 80 | + - Assume we have following branches: |
| 81 | + - branch_1 |
| 82 | + - branch_2 |
| 83 | + - new-branch |
| 84 | + - then `getBranches("br")` will return [branch_1, branch_2] |
| 85 | + - SVN |
| 86 | + - Assume we have following folders structure: |
| 87 | + - branches/branch_1/folder |
| 88 | + - branches/branch_2/folder |
| 89 | + - branches/release/v1/folder |
| 90 | + - branches/release/v2/folder |
| 91 | + - branches/release/a2/folder |
| 92 | + - branches/new-branch/folder |
| 93 | + - branch_3/folder |
| 94 | + - tags/ |
| 95 | + - trunk/ |
| 96 | + - new-branch |
| 97 | + - `path` is empty - result is all first-level subdirst within `branches/` folder |
| 98 | + - `getBranches("")` -> [branch_1, branch_2, release, new-branch] |
| 99 | + - `path` ends with "/" or empty - result is all first-level subdirs within `branches/path` dir |
| 100 | + - `getBranches("release/")` -> [v1, v2, a2] |
| 101 | + - `path` does not ends with "/" - result is first-level subdirs within `branches/path` dir up to the last slash which names starts with `path` dir from the last slash till end substring |
| 102 | + - `getBranches("new-")` -> [new-branch] |
| 103 | + - `getBranches("release/v")` -> [v1, v2] |
78 | 104 | - `List<VCSCommit> log(Sting branchName, Integer limit)`
|
79 | 105 | - Returns list of commits of branch `branchName` limited by `limit` in descending order
|
80 | 106 | - `String getVCSTypeString`
|
|
0 commit comments