Commit Graph

429 Commits

Author SHA1 Message Date
Viktor Egorov
c8ef99cf07 Add option to hide whitepace changes in diffs
Co-authored-by: Florian Scholdei<florian.scholdei@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>


Reviewed-by: Florian Scholdei <florian.scholdei@cloudogu.com>
2024-05-14 11:33:48 +02:00
Laura Gorzitze
d8e1f2d739 Cleanup Code
Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
2024-02-06 14:54:00 +01:00
Eduard Heimbuch
cf4d9cf20f 3.x
Committed-by: Eduard Heimbuch<eduard.heimbuch@cloudogu.com>
Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
Pushed-by: Eduard Heimbuch<eduard.heimbuch@cloudogu.com>
Committed-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
2023-11-30 17:02:44 +01:00
Rene Pfeuffer
571e6ad92f Add a modifications provider for hooks
This new modifications provider consistently computes the modifications caused by a push to a branch. In contrast to the changeset provider that often has been used before to check what has changed, this also works for forced updates, rebased branches and fast-forwards.&#10;&#10;Because these types of changes are normally only used with git, this provider (for now) has only been implemented for git.

Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com>
Pushed-by: Alexander Dammeier<alexander.dammeier@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
Committed-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
2023-11-16 13:18:40 +01:00
Eduard Heimbuch
33e8d30b62 Throw NoChangesMadeException for empty commits in SVN repositories
Committed-by: Florian Scholdei <florian.scholdei@cloudogu.com>
2023-08-07 23:17:25 +02:00
Eduard Heimbuch
e4d846b0d4 Improve repo exception logging 2023-06-15 12:43:06 +02:00
Eduard Heimbuch
c6df84557b Refactor general configuration
Use standard configuration store api for general configuration. This is best practice and also required for the audit log to work properly.

Besides that we still need to load the general configuration manually for the instance injection binding in ScmServletModules. Since the instance injection does not resolve the bindings regularly we need also still need to update the injectable scm config using the "load" hack in the resource.

Committed-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2023-04-12 12:37:52 +02:00
Konstantin Schaper
7e83d34fc0 Improve committer accuracy
Changes made by the SCM-Manager, like those through the editor and pull requests, now more accurately define the committer on the underlying changeset.

Committed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2023-04-06 10:16:41 +02:00
Eduard Heimbuch
56265be9a2 Add initial audit log API
Introduce audit log API which logs all creations,
modifications and deletions of annotated entities
and everything which is stored inside a
ConfigurationStore. Without the related Audit
Log Plugin installed this API does nothing.
2023-03-09 11:25:33 +01:00
Eduard Heimbuch
dc60c924ed Add copy button to codeblocks 2023-01-25 15:55:00 +01:00
Eduard Heimbuch
ca047b7953 Catch SvnCatCommand exception for trying to read content from nodes which are not files. 2022-09-30 13:03:07 +02:00
Eduard Heimbuch
e590a3ee68 Add changesets command to enable commit search (#2106)
Introduce changesets command to find all changesets for a single repository. This is required to index all changesets for the commit search.
2022-08-17 12:44:59 +02:00
Eduard Heimbuch
67c083ee54 Reduce code smells (#2089)
Reduce code smells found by deepsource.io. We focused on the low-hanging fruits and not breaking any api.
2022-07-15 15:33:37 +02:00
Konstantin Schaper
4d203ff36f codify extension points docs (#1947)
This pull request converts the current incomplete textual documentation of the available frontend extension points to in-code definitions that act both as documentation and as type helpers for improving overall code quality. All extension points available in the SCM-Manager core are now available, but no plugin was updated and only those parts of the core codebase had the new types added that did not require runtime changes. The only exception to this is the breadcrumbs, which was a simple change that is fully backwards-compatible.
2022-03-29 15:04:14 +02:00
Matthias Thieroff
44f0046f25 Collapse folders with only one child folder (#1951)
Collapses a folder in code view which only has another folder as its only child. This lets you access a sub-folder which has content directly instead of navigating down the folder tree by clicking every folder separately.

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2022-02-15 10:59:32 +01:00
Matthias Thieroff
0f01bb82c6 Fix bugs in unit tests which occur on Windows only (#1927)
On Windows it is much more necessary to close files to avoid locked files which prevent deleting a temporary file or folder. Also paths need to be handled differently because of the drive letter and colon appearing on Windows.
2022-01-20 08:48:13 +01:00
Eduard Heimbuch
aa1558dbac Disable repository types (#1908)
Disable repository types via global config for Git, Mercurial and Subversion. It is only possible to disable a type, if no repositories of this type exist. Also prevent repository creation if no type is allowed at all to catch nasty errors.

Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2022-01-06 10:05:01 +01:00
Florian Scholdei
7f807a8e0f Improve headings structure (#1883)
The content of the SCM-Manager should be made accessible and usable in a sensibly structured way so that web content is easy to use for ever user.
2021-12-02 08:45:50 +01:00
René Pfeuffer
6ea77b42ca Fix edge cases in move (#1874)
Fixes edge cases for "move" in the modify command, like

- reject backslashes in validation
- add overwrite option
- check for invalid source and target options

This is an update to the implementation of "move" in #1859.

Co-authored-by: Matthias Thieroff <matthias.thieroff@cloudogu.com>
2021-11-30 08:49:47 +01:00
Sebastian Sdorra
9dee08f68d Update Gradle to 7.3 (#1873)
Update Gradle to 7.3. in order to profit from the performance improvement and to prepare for dependency lockfiles. Due to the upgrade to 7.x we had to use a license plugin which supports Gradle 7.
2021-11-29 09:05:24 +01:00
Konstantin Schaper
13590676fd Add move to modify command (#1859)
dds a move/rename functionality to the modify command. This currently only works for absolute destination paths and does not work with backslashes. If the destination path does not exist, it is created. The action fails if the target file already exists.
2021-11-19 08:43:44 +01:00
René Pfeuffer
7a72359bc9 File lock for svn (#1847)
Implements the file lock command for SVN.
2021-11-11 10:58:26 +01:00
René Pfeuffer
f680c9335a Fix concurrent modification in SVN modify command (#1849) 2021-11-09 14:36:20 +01:00
Eduard Heimbuch
6f61fefec5 Improve a11y (#1841)
Improve accessibility by removing unnecessary tags without hrefs. Also remove many eslint errors and warnings.
2021-11-04 09:16:08 +01:00
René Pfeuffer
27b9d2c78a Resolved branch revision in Source Extension Point (#1803)
This adds the "resolved revision" of the HEAD (of the current branch, if branches are supported) to the extension point repos.sources.extensions. This "resolved revision" holds the current HEAD revision of the repository (or the selected branch, if branches are supported). This means you can check, whether the release has changed since an extension has been rendered for the first time.

Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2021-10-20 13:29:47 +02:00
René Pfeuffer
41b8f091c0 Add recursive deletion in modify command (#1821)
Adds a method in the ModifyCommand to delete not only files, but also directories recursively.
2021-10-07 14:40:48 +02:00
Eduard Heimbuch
64b03d6ded Fix illegal access from plugin to core api. 2021-09-06 15:21:53 +02:00
Eduard Heimbuch
43e1ea06c8 Fix HalRepresentationWithEmbedded type (#1793)
Fix HalRepresentationWithEmbedded type since _embedded can be null.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2021-09-02 15:47:15 +02:00
Sebastian Sdorra
cf55b15d21 Refactor SvnMirrorCommand
Extracted authentication logic into its own class.
Use source url instead of target url for authenticators and proxy excludes.
Use error code instead of complete message to detect a missing initialisation on update.
2021-08-26 12:20:44 +02:00
Konstantin Schaper
44f25d6b15 Fix disabled local proxy configuration being used over global config (#1780)
The original proxy configuration implementation only used the global configuration if the local proxy configuration was not provided (i.e. null). This PR adds the corner case where a local configuration is provided, but disabled. In this case, the global proxy configuration will be used as a fallback as well.
2021-08-25 08:19:52 +02:00
Sebastian Sdorra
7f9f4e566c Proxy support for pull, push and mirror commands (#1773)
Apply proxy support for jGit by extracting the required functionality from the DefaultAdvancedHttpClient into its own class HttpURLConnectionFactory. This new class is now used by the DefaultAdvancedHttpClient and jGit.
The HttpURLConnection also fixes proxy server authentication, which was non functional in DefaultAdvancedHttpClient.
The proxy support for SVNKit is implemented by using the provided method of the BasicAuthenticationManager.
For mercurial the support is configured by writing the required settings to a temporary hgrc file.
2021-08-19 11:27:51 +02:00
René Pfeuffer
8558572c99 Modifications command between two revisions (#1761)
Adds the option to compute the modifications between two revisions unsing the modifications command.
2021-08-09 12:13:41 +02:00
Eduard Heimbuch
e560d20d5a Fix SVN repo mirror update (#1745)
Initialize svn repository on mirror update if first initialization failed.
2021-07-28 11:26:33 +02:00
René Pfeuffer
ad6000722d LRU semantic for workdir cache (#1735)
Introduces a maximum size for the simple workdir cache. On cache overflow workdirs are evicted using an LRU strategy.
Furthermore parallel requests for the same repository will now block until the workdir is released.
2021-07-28 07:54:37 +02:00
Eduard Heimbuch
dd0975b49a Feature/mirror (#1683)
Add mirror command and extension points.

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2021-06-04 14:05:47 +02:00
René Pfeuffer
1e83c34823 Enable Health Checks (#1621)
In the release of version 2.0.0 of SCM-Manager, the health checks had been neglected. This makes them visible again in the frontend and adds the ability to trigger them. In addition there are two types of health checks: The "normal" ones, now called "light checks", that are run on startup, and more intense checks run only on request.

As a change to version 1.x, health checks will no longer be persisted for repositories.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2021-04-21 10:09:23 +02:00
Eduard Heimbuch
c5720b36b5 Collect metrics over lifetime of working copies (#1591)
Capture metrics about the lifetime of working copies used, for example, by the merge and modify commands. Working copies are internal repository clones that can place a large load on the server. Therefore, these metrics can be helpful in identifying sources of large server load.

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2021-03-24 13:03:20 +01:00
Eduard Heimbuch
7852d1034e Fix build warnings (#1562)
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-03-01 09:08:01 +01:00
Sebastian Sdorra
888f5d699b Fire RepositoryImportHookEvent instead of PostReceiveRepositoryHookEvent (#1561)
We will fire an RepositoryImportHookEvent instead of PostReceiveRepositoryHookEvent for repository imports with metadata. The event is only fired if all parts of the repository could be successfully imported. The extra event is required to avoid heavy recalculations which can be triggered by the PostReceiveRepositoryHookEvent for example the scm-statistic-plugin uses the PostReceiveRepositoryHookEvent to calculate its statistics.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2021-02-26 09:49:34 +01:00
Eduard Heimbuch
83a9c90130 Post receive hook after import (#1544)
Fire post receive repository hook event after pull from remote
and after unbundle (Git, HG and SVN)

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-02-22 09:20:15 +01:00
René Pfeuffer
bd3671b428 Use repository specific work dirs (#1510)
With this change, work dirs are created in the
directory of the repository and no longer in the
global scm work dir directory. This is relevant due
to two facts:

1. Repositories may contain confidential data and therefore
   reside in special directories (that may be mounted on
   special drives). It may be considered a breach when these
   directories are cloned or otherwise copied to global
   temporary drives.
2. Big repositories may overload global temp spaces. It may be
   easier to create special drives with more space for such
   big repositories.
2021-01-28 12:53:39 +01:00
Eduard Heimbuch
0046c78b40 Git import and export (#1507)
* create git bundle command

* create git unbundle command

* Apply suggestions from code review

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-01-28 12:35:18 +01:00
Sebastian Sdorra
c1aa851c72 Migrate plugins 2021-01-14 11:55:27 +01:00
Florian Scholdei
214cf527d4 Feature/harmonize translation keys (#1478)
Harmonize translation keys

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2020-12-16 11:24:13 +01:00
René Pfeuffer
eaf59f91c4 Harmonize logging string for repositories 2020-12-04 11:48:32 +01:00
Eduard Heimbuch
7db33d2e65 Mind review findings 2020-12-02 10:47:48 +01:00
Eduard Heimbuch
275ca49f71 Mark old import handler api as deprecated 2020-11-27 13:30:01 +01:00
René Pfeuffer
69a3a8a2da Convert update dto classes to interfaces 2020-11-19 13:19:49 +01:00
René Pfeuffer
bab4a56e22 Make dtos for schema docs unusable 2020-11-19 07:48:21 +01:00
Florian Scholdei
3384707517 Add examples to scm-plugins resources and create DTO adapted to schemata 2020-11-18 17:12:04 +01:00