|
1 | 1 | [](https://jitpack.io/#ProjectKaiser/pk-vcs-api)
|
2 | 2 |
|
3 | 3 | # Overview
|
4 |
| - |
5 | 4 | Pk-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. Pk-vcs-api consists of:
|
6 |
| -- IVCS interface which exposes various vcs-related methods |
7 |
| -- Working Copy utility classes which are required for vcs-related operations which are need to be executed on a local file system (such as merge) |
8 |
| - |
9 |
| -Also see [pk-vcs-test](https://github.com/ProjectKaiser/pk-vcs-test) project. It exposes Abstract Test which is used for functional testing and describing behaviour of IVCS implementation |
| 5 | +Pk-vcs-api provides: |
| 6 | +- A simple interface to implement basic VCS-related operations |
| 7 | +- Set of functional tests which 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 [pk-vcs-test](https://github.com/ProjectKaiser/pk-vcs-test) |
| 8 | +- Working copy management for operations which must be executed on local file system |
10 | 9 |
|
11 | 10 | # Terms
|
12 |
| -- IVCS |
| 11 | +- `IVCS` |
13 | 12 | - Basic exposed interface which contains vcs-related methods
|
14 | 13 | - Workspace Home
|
15 | 14 | - Home folder of all vcs-related operations which are require to use local file system.
|
16 | 15 | - Defined by IVCS-user side
|
17 | 16 | - Repository Workspace
|
18 |
| -- A folder of separate VCS Repository where Working Copies will be located. Need to group few Working Copies used by one Repository into one folder. E.g. if there are Git and SVN version control systems then need to know which VCS type each Working Copy belongs to. |
19 |
| - - Named automatically as repository url replacing all special characters with "_" |
| 17 | +- A separate folder where Working Copies of one certain Repository will be located. Need to group few Working Copies used by one Repository into one folder. E.g. if there are Git and SVN version control systems then need to know which VCS type each Working Copy belongs to. |
| 18 | + - Created and named automatically as repository url replacing all special characters with "_" |
20 | 19 | - Locked Working Copy, LWC
|
21 | 20 | - A separate folder used to execute VCS-related operations which are need to be executed on a local file system. E.g. in Git it is need to make checkout somewhere on local file system before making a merge.
|
22 | 21 | - Named automatically as uuid, located within Repository Workspace folder
|
23 |
| -- Can be reused for another vcs-related operation automatically |
| 22 | +- Can be reused for another vcs-related operation automatically. I.e. checkouted once, then switches between branches. |
24 | 23 | - Deletes automatically if last VCS-related operation left the Working Copy in corrupted state, i.e. can not be reverted, re-checked out and so on
|
25 | 24 | - Lock File
|
26 | 25 | - A special empty file which is used to show if according LWC locked or free. If a Lock File has exclusive file system lock then the according LWC folder is considered as locked, otherwise as free
|
27 | 26 | - Lock way: `new FileOutputStream(lockFile, false).getChannel.lock()`
|
28 |
| -- named as "lock_" + LWC folder name |
| 27 | +- named as "lock_" + <LWC folder name> |
29 | 28 | - Abstract Test
|
30 |
| -- Base functional tests of VCS-related functions which are exposed by IVCS. To implement functional test for a certain IVCS implementation (Git, SVN, etc) just implement VCSAbstractTest subclass. |
| 29 | +- Base functional tests of VCS-related functions which are exposed by IVCS. To implement functional test for a certain IVCS implementation (Git, SVN, etc) just implement VCSAbstractTest subclass |
31 | 30 | - Implemented as [pk-vcs-test](https://github.com/ProjectKaiser/pk-vcs-test) separate project
|
32 | 31 | - `VCSMergeResult`, Merge Result
|
33 | 32 | - Result of vcs merge operation. Could be successful or failed. Provides list of conflicting files if failed.
|
| 33 | +- `VCSDiffEntry`, Diff Entry |
| 34 | +- Result of VCS branches diff operation. Contains Diff type (added, modified, deleted) and unified diff string for a certain file which differs between branches |
34 | 35 | - Head, Head Commit, Branch Head
|
35 | 36 | - The latest commit or state of a branch
|
36 | 37 | - Master Branch
|
@@ -68,7 +69,7 @@ Note: null passed as a branch name is considered as Master Branch. Any non-null
|
68 | 69 | - Creates the file and its parent folders if doesn't exists
|
69 | 70 | - `List<VCSDiffEntry> getBranchesDiff(String srcBranchName, String destBranchName)`
|
70 | 71 | - Returns list of `VCSDiffEntry` showing what was made within branch `srcBranchName` relative to branch `destBranchName`
|
71 |
| -- Note: result is summarized commit of a branch `srcBranchName`. It does not depends of what was made in branch `destBranchName` |
| 72 | +- Note: result is summarized commit of a branch `srcBranchName`. |
72 | 73 | - `Set<String> getBranches()`
|
73 | 74 | - Returns list of names of all branches. 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
|
74 | 75 | - `List<String> getCommitMessages(Sting branchName, Integer limit)`
|
|
0 commit comments