Skip to content

Commit ce1b8fc

Browse files
committed
documentation updated
1 parent 8d77c49 commit ce1b8fc

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

README.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
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.
77
scm4j-vcs-api provides:
88
- 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)
109
- Working copies management for operations which must be executed on a local file system
1110

1211
# Terms
@@ -45,7 +44,7 @@ scm4j-vcs-api provides:
4544
IVCS interface consists of few basic vcs functions.
4645
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.
4746
- `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`.
4948
- 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)
5049
- `VCSMergeResult merge(String srcBranchName, String dstBranchName, String commitMessage);`
5150
- 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
7574
- Note: result could be considered as a commit which would be made on merging the branch `srcBranchName` into `destBranchName`
7675
- `Set<String> getBranches(String path)`
7776
- 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]
78104
- `List<VCSCommit> log(Sting branchName, Integer limit)`
79105
- Returns list of commits of branch `branchName` limited by `limit` in descending order
80106
- `String getVCSTypeString`

0 commit comments

Comments
 (0)