You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
5
-
Pk-vcs-api provides:
4
+
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.
5
+
scm4j-vcs-api provides:
6
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)
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 [scm4j-vcs-test](https://github.com/scm4j/scm4j-vcs-test)
8
8
- Working copy management for operations which must be executed on local file system
9
9
10
10
# Terms
@@ -19,15 +19,15 @@ Pk-vcs-api provides:
19
19
- Locked Working Copy, LWC
20
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.
21
21
- Named automatically as uuid, located within Repository Workspace folder
22
-
- Can be reused for another vcs-related operation automatically. I.e. checkouted once, then switches between branches.
22
+
- Can be reused for another vcs-related operation automatically. I.e. checked out once, then switches between branches.
23
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
24
24
- Lock File
25
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
- 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
30
-
- Implemented as [pk-vcs-test](https://github.com/ProjectKaiser/pk-vcs-test) separate project
30
+
- Implemented as [scm4j-vcs-test](https://github.com/scm4j/scm4j-vcs-test) separate project
31
31
-`VCSMergeResult`, Merge Result
32
32
- Result of vcs merge operation. Could be successful or failed. Provides list of conflicting files if failed.
33
33
-`VCSDiffEntry`, Diff Entry
@@ -82,6 +82,8 @@ Note: null passed as a branch name is considered as Master Branch. Any non-null
- Returns ordered list of all commits located between commits specified by `aftercommitId` and `untilCommitId` within branch `branchName`
85
+
- If `aftercommitId` is null then all commits until commit specified by `untilCommitId` are fetched
86
+
- If `untilCommitId` is null then all commits after commit specified by `afterCommitId` are fetched
85
87
86
88
# Using Locked Working Copy
87
89
Let's assume we developing a multiuser server which has ability to merge branches of user's repositories. So few users could request to merge theirs branches of different repositories simultaneously. For example, Git merge operation consists of few underlying operations (check in\out, merge itself, push) which must be executed on a local file system in a certain folder. So we have following requirements:
@@ -94,14 +96,14 @@ Locked Working Copy is a solution which solves these requirements by providing a
94
96
LWC usage scenario:
95
97
- Create Workspace Home instance providing path to any folder as Workspace Home folder path. This folder will contain repositories folders (if different vcs or repositories are used)
- Obtain Repository Workspace from Workspace Home providing a certain Repository's url. The obtained Repository Workspace will represent a folder within Workspace Home dir which will contain all Working Copies relating to the provided VCS Repository
- Obtain Locked Working Copy from Repository Workspace when necessary. The obtained LWC will represent a locked folder within Workspace Repository. The folder is protected from simultaneously execute different vcs-related operations by another thread or even process. Use try-with-resources or try...finally to release Working Copy after vcs-related operations will be completed
@@ -120,8 +122,8 @@ LWC usage scenario:
120
122
- If a Working copy can not be reused due of VCS system data damage (e.g. .git, .svn folders) or due of vcs Working Copy can not be cleaned, reverted, switched, checked out etc, execute `IVCSLockedWorkingCopy.setCorrupted(true)`. LWC folder will be deleted on close.
121
123
122
124
# Folder structure
123
-
- Workspace Home folder (e.g. c:\temp\pk-vcs-workspces\)
- Add github-hosted VCS API as maven artifact using [jitpack.io](https://jitpack.io/). As an example, add following to gradle.build file:
143
+
- Add github-hosted scm4j-vcs-api and scm4j-vcs-test projects as maven artifacts using [jitpack.io](https://jitpack.io/). As an example, add following to gradle.build file:
0 commit comments