Commit Graph

666 Commits

Author SHA1 Message Date
René Pfeuffer
f74b7626eb New package for working copy related classes 2020-06-02 21:31:44 +02:00
René Pfeuffer
e968aa17ef Cleanup 2020-06-02 21:31:44 +02:00
René Pfeuffer
8bd17a03d7 Use better names
The name 'workdir' is now only used for a concrete directory, where a
clone can be created in. The new name 'working copy' is used for a
concrete instance of such a directory, where a clone has been created in
for a repository stored in SCM-Manager. Such a working copy can be
cached and reused for further changes.
2020-06-02 21:31:43 +02:00
René Pfeuffer
e5f4ad72d6 Add test for git reclaim of workdir 2020-06-02 21:31:43 +02:00
René Pfeuffer
7e89a0c1c0 Update repositories in reclaim 2020-06-02 21:31:43 +02:00
René Pfeuffer
5b034f8d02 Introduce cache layer for workdirs 2020-06-02 21:31:43 +02:00
René Pfeuffer
054f320455 Make change types explicit
Without explicit change types, we cannot tell copy and rename apart.
2020-05-19 23:09:28 +02:00
René Pfeuffer
c722565109 Hide getEffectedPaths for other packages 2020-05-19 09:56:24 +02:00
René Pfeuffer
35ffc5c4e2 Introduce new API for modifications
New modifications includes list of 'renames'. Therefore we introduce
a new base class Modification.
2020-05-19 09:56:24 +02:00
René Pfeuffer
76354aa839 Close diff formatter 2020-05-19 09:56:24 +02:00
René Pfeuffer
dbc58784e4 Fix path handling 2020-05-19 09:56:24 +02:00
René Pfeuffer
ae51a583fd POC for rename detection in diffs 2020-05-19 09:56:24 +02:00
René Pfeuffer
d5d9690389 Remove redundant constructor parameter
The repository can be retrieved from the context and does not have to be
passed through by every constructor
2020-05-12 15:45:58 +02:00
René Pfeuffer
52a09a96d2 Fix error with redundant line breaks
This fixes an error with a repository, where an added file has \r\r\n
as line breaks. This interesting combination is handled as a single
line break by the diff operation, while Java's Scanner implementation
handles this as two lines (the first one delimited by the first \r,
the second one delimited by \r\n. This led to empty lines inside the
diff, where we only expect lines that contain at least one character
(' ', '+' or '-'), and this in turn led to an index out of bounds
exception.

Now we handle each combination of any kind of new line delimiter
characters as a single delimiter. This should be safe, because, as
mentioned earlier, we always expect at least one character in a line
for a diff output.
2020-05-04 15:23:46 +02:00
René Pfeuffer
0f1bc647a4 Fix git protocol uri for windows
Fixes the 'scm' protocol uri for Windows. Have to replace all
backslashes with forward slashes, add one more slash at the
beginning and remove the colon from the dirve.
2020-04-27 08:06:26 +02:00
René Pfeuffer
19603b6777 Fix detection of sub repositories (aka submodules)
Without this on creation of a tree entry we try to read the object
for the given object id, but in case of a submodule this is not the
id of an object (the constructor of TreeEntry calls
repo.open(objectId)). Therefore the lookup creates an exception. With
this fix we check, whether the given path is a submodule beforehand.
2020-04-06 13:34:06 +02:00
Florian Scholdei
f1b34eb502 Changeover to MIT license (#1066)
* prepare license-maven-plugin for license migration
* added license mapping for tsx files and added some more excludes
* Changeover to MIT license
* Fix build problems
* Delete old remaining licenses
* Add more exclude path for license checker
* Rename included netbeans license, add exclude .m2/repository/
* Specify .m2 exclude because not only repository/, also wrapper/ must match
* Add .cache/ exclude for license check
* Modify formatting of license in java classes to comply with convention and IDE
* Add IntelliJ documentation for license configuration
* Update CHANGELOG.md
* Exclude tmp/workspace/ dir for license check
* Edit README.md

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2020-03-23 15:35:58 +01:00
René Pfeuffer
f39a676044 Remove unused function 2020-03-12 10:45:52 +01:00
René Pfeuffer
55ef3f8c8c Merge remote-tracking branch 'origin/develop' into feature/browse_commit_with_limit
# Conflicts:
#	CHANGELOG.md
2020-03-10 09:43:31 +01:00
René Pfeuffer
2d117648ba Add possibility to set jgit nfs related config
It may be necessary for users to configure jgit behaviour related to
file handling. This commit makes the following two configurations
available (among others):

- core.trustfolderstat
- core.supportsatomicfilecreation
2020-03-09 16:44:42 +01:00
René Pfeuffer
b8ab729c45 Merge branch 'develop' into feature/browse_commit_with_limit 2020-03-09 08:40:29 +01:00
Sebastian Sdorra
7785ea2d68 Merged in bugfix/openapi_errors (pull request #417)
prevent using same classloader multiple times
2020-03-04 08:31:08 +00:00
Rene Pfeuffer
cf43e3bc84 Implement new limit/offset rule for git and svn
Directories shall no longer be taken into account for limit/offset
calculations.
2020-03-03 17:06:55 +01:00
Rene Pfeuffer
e0b02ea1a3 Use api to set system config for lfs
Could be so simple if this works :-)
2020-03-03 16:13:17 +01:00
Eduard Heimbuch
5897863f7e fix several openapi errors 2020-03-03 14:49:35 +01:00
Rene Pfeuffer
fa80c83109 Implement new limit/offset rule for git
Directories shall no longer be taken into account for limit/offset
calculations.
2020-03-03 11:59:20 +01:00
Rene Pfeuffer
80bfc37d0f Merge with default 2020-03-03 09:35:01 +01:00
Rene Pfeuffer
33037385e4 Handle unexpected merge results
It is possible that a git work tree is dirty directly after the clone
of a repository, eg. when files are not changed correctly due to bogous
.gitattribute files (though this is just a guess). In these cases a
merge might fail due to these dirty files and not due to merge
conflicts. Without this change such results lead to null pointer
exceptions, because result.getConflicts() is null.
2020-02-27 09:56:25 +01:00
René Pfeuffer
4e7381b98f Fix offset in recursion 2020-02-26 11:10:01 +01:00
René Pfeuffer
67192a203e Read and sort tree first before applying limit 2020-02-26 10:54:16 +01:00
Rene Pfeuffer
e33d65b097 Merge with default 2020-02-25 16:37:17 +01:00
Sebastian Sdorra
24de6c89a5 update jgit to version 5.6.1.202002131546-r-scm1 2020-02-24 16:27:42 +01:00
Rene Pfeuffer
f0da22ad29 Fix git sort 2020-02-21 14:50:07 +01:00
Rene Pfeuffer
736ea3d93f Sort git files 2020-02-21 14:29:09 +01:00
Florian Scholdei
56202e5266 Remove unused imports, adding missing dots in descriptions, remove last TypeHint annotation 2020-02-19 17:00:33 +01:00
René Pfeuffer
fe1591171d Rename 'proceedFrom' to 'offset' 2020-02-19 09:23:23 +01:00
Florian Scholdei
5364e8682d Create openapi docs for hg/svn plugin 2020-02-18 17:19:35 +01:00
Rene Pfeuffer
3652a33fa0 Add truncated flag for git 2020-02-18 15:24:32 +01:00
Rene Pfeuffer
67e58209cf Implement proceed from for git 2020-02-18 09:57:57 +01:00
Rene Pfeuffer
f68423a5d8 Implement request limit for git 2020-02-18 08:22:36 +01:00
Eduard Heimbuch
b7e95f3cc4 create openapi docs for scm-git-plugin 2020-02-17 14:09:26 +01:00
Rene Pfeuffer
db19da7b46 Set explicit committer for new commits 2020-02-14 10:42:59 +01:00
Rene Pfeuffer
b4b4f29e42 Log messages from failed push result 2020-01-15 09:51:00 +01:00
Rene Pfeuffer
c5520e6b07 Fix error handling on git push
Failing git push does not lead to an GitAPIException. Instead we have to
check the dedicated push update results.

By the way this adds a message for the internal repository exception.
2020-01-15 08:49:14 +01:00
Rene Pfeuffer
d6b60afeac Merge with default 2020-01-08 11:22:47 +01:00
Rene Pfeuffer
d1db083e9a Use namespace and name in logging 2020-01-08 10:14:43 +01:00
Rene Pfeuffer
148095ad4c Add revisions of merged branches before merge 2019-12-19 10:30:02 +01:00
Rene Pfeuffer
f7c4894fb2 Let merges without effect throw an exception 2019-12-19 09:47:31 +01:00
Rene Pfeuffer
1d3e51ce7b Use static create methods instead of ambiguous constructor 2019-12-19 09:27:18 +01:00
Rene Pfeuffer
fefd8b6de8 Merge with default 2019-12-19 08:46:45 +01:00