Commit Graph

1057 Commits

Author SHA1 Message Date
René Pfeuffer
27310b4d26 Merge tag '2.46.6' into hotfix/3.7.x
Release version 2.46.6
2025-08-19 19:14:54 +02:00
Till-André Diegeler
7858316a63 Bugfix for go-git client issue 2025-08-19 15:19:06 +02:00
Till-André Diegeler
4fede25d41 Fix committer in squash merge
* Merge: Author and committer from request
* Squash: Author from request, committer from session
* Rebase: Rebase from original commit, committer from session
* Fast-forward: No changes, author and committer from tip

These are the four stratagies available for a merge. Each of them has a different requirement regarding who is seen as an author and who as a committer.
2025-05-27 09:42:48 +02:00
Rene Pfeuffer
8bcb814f94 Keep original timestamp on rebase
Squash commits of branch bugfix/keep_original_timestamp_on_rebase:

- Keep original timestamp on rebase
2025-02-20 09:58:56 +01:00
Rene Pfeuffer
8f8db80472 Implement branch provider to prevent errors
The review plugin does not explicitly check, if the
branch provider is supported in events. It only checks,
whether the repository supports branches per se.
Therefor, if a tag is created from the ui, an internal server
error is thrown. We prevent this by implementing a
simple branch provider here, too.
2025-01-28 09:09:31 +01:00
Till-André Diegeler
08e57b9a19 Allow filter for Git repositories
The line `allowfilter = true` is inserted both in new Git repositories
and existing ones (via an UpdateStep). This enables clones with
`--filter` parameters.

Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
2025-01-09 15:27:22 +01:00
Rene Pfeuffer
8422c3bc44 Fast modifications inside git repositories
With this change, most modifications of git repositories&#10;(like inserting, deleting and updating files and merging branches)&#10;do no longer work inside clones held in temporary working&#10;directories but are done directly inside the bare git&#10;repository data. This resolves in a massive performance&#10;boost for the editor plugin and pull requests, especially in&#10;larger repositories.

Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
Committed-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
2025-01-07 11:06:53 +01:00
Florian Scholdei
3c0ad46f07 Set descriptive document titles
Document titles represent the pages, for example in lists
with bookmarks. They are important for navigation and
orientation in websites. If the offer or the content of the
page is not labeled, orientation is impaired.

This changes the behavior for setting document titles.
The functionality has been removed from the Page and
Title components and is now represented by `useDocumentTitle`
hook to better describe the content of inividual pages.

Co-authored-by: Anna Vetcininova<anna.vetcininova@cloudogu.com>
2024-12-10 16:41:01 +01:00
Rene Pfeuffer
4ebf0e2044 Adds 'head' as revision for Subversion repositories
To still support the editor plugin, a new field in the
browse command results is needed to indicate, whether
such a result or rather the requested revision can be
modified by a new commit.

This is the case, when
- for Subversion repositories either the new 'head' or the
latest revision has been requested, or
- for Git and HG when a branch (or the default by specifying
no concrete revision) has been used.
2024-11-05 10:54:49 +01:00
Till-André Diegeler
cd16f0b033 Integrate creation of jgit/svnkit version status text files into build.gradle
Over the course of a very long time, the interpolation strings for the versions in the scm-git-plugin and scm-svn-plugin had not been processed. One assumption was that this was related to a discontinued Maven process.

The behavior was now realized by two tasks process after the gradle build lifecycle step. It remains to be discussed whether it's worth the time and effort to integrate the change into the smp plugin.
2024-10-28 23:19:47 +01:00
Rene Pfeuffer
e6433d01d1 Change to GNU Affero General Public License v3.0 2024-09-24 09:42:07 +02:00
Viktor Egorov
f95579c102 Add missing change types to diff statistics 2024-09-20 10:04:23 +02:00
Thomas Zerr
8f0ed74b7a Add table to diff view
Pushed-by: Florian Scholdei<florian.scholdei@cloudogu.com>
Pushed-by: Viktor Egorov<viktor.egorov-extern@cloudogu.com>
Pushed-by: k8s-git-ops<admin@cloudogu.com>
Committed-by: Thomas Zerr<thomas.zerr@cloudogu.com>
Co-authored-by: Viktor<viktor.egorov@triology.de>
Co-authored-by: Thomas Zerr<thomas.zerr@cloudogu.com>
Pushed-by: Thomas Zerr<thomas.zerr@cloudogu.com>
2024-09-16 17:52:10 +02:00
Rene Pfeuffer
96466807be Compute files with conflicts in merge dry run
Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
2024-09-13 10:21:06 +02:00
Rene Pfeuffer
27f78d2347 Fix permission errors
The BaseReceivePackFactory re-used the GitReceiveHook. The&#10;problem is, that the hook is not thread safe. Due to the&#10;re-usage, the repository could have been changed during&#10;processing post receive hooks.&#10;&#10;With this, the factory will always create a new receive pack.

Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
Committed-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
2024-08-08 16:27:48 +02:00
Tarik Gürsoy
797bda4bbb Add statistics for diffs (added, deleted, modified)
Extend the diff result from the diff command to include modified,
added and deleted file count and add DiffStats component to
ui-components.

Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com>
Pushed-by: Tarik Gürsoy<tarik.guersoy@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
Co-authored-by: Tarik Gürsoy<tarik.guersoy@cloudogu.com>
2024-08-01 16:54:40 +02:00
Tarik Gürsoy
bb4589e87f Manual merge instructions have been fixed 2024-07-04 10:28:53 +02:00
Laura Gorzitze
b12f4d579a Notification if external user management is activated
A notification will be displayed when an external user
management system is activated to inform that users
created within the SCMM will not be transferred to the
external system.

Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
2024-07-04 09:05:17 +02:00
Eduard Heimbuch
29a6b42fce Check for external merge tools during merge
Co-authored-by: Thomas Zerr<thomas.zerr@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
2024-06-25 05:50:04 +02:00
Viktor Egorov
5d446278d9 Fixed branch name limit
Pushed-by: Viktor Egorov<viktor.egorov-extern@cloudogu.com>
Co-authored-by: Viktor<viktor.egorov@triology.de>
Co-authored-by: Thomas Zerr<thomas.zerr@cloudogu.com>
Pushed-by: Thomas Zerr<thomas.zerr@cloudogu.com>
2024-06-10 13:21:30 +02:00
René Pfeuffer
ae53ff2494 Merge tag '2.46.3'
Release version 2.46.3
2024-05-30 10:39:05 +02:00
René Pfeuffer
ea4a148d86 Fix determination of default branch for git config on push 2024-05-29 10:40:28 +02:00
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
8d12862ff8 Display all tags for changeset
Display of all tags (as links to the  overview of the specific tag) of a given changeset in the changeset detail view.
2024-03-11 17:09:59 +01:00
Rene Pfeuffer
658ccdf006 Improve import of LFS files for pull and mirror
Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
Committed-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
2024-03-11 11:13:42 +01: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
Florian Scholdei
a8c32b10de Preferred checkout variant
Add ability to prioritize the repository checkout variants. These are displayed sorted.

Co-authored-by: Eduard Heimbuch<eduard.heimbuch@cloudogu.com>
Pushed-by: Florian Scholdei<florian.scholdei@cloudogu.com>
Co-authored-by: Florian Scholdei<florian.scholdei@cloudogu.com>
Pushed-by: Eduard Heimbuch<eduard.heimbuch@cloudogu.com>
2023-11-15 13:27:48 +01:00
Laura Gorzitze
f641c1ef08 Assisted Injection for commands
Co-authored-by: Eduard Heimbuch<eduard.heimbuch@cloudogu.com>
Co-authored-by: Laura Gorzitze<laura.gorzitze@cloudogu.com>
Pushed-by: Eduard Heimbuch<eduard.heimbuch@cloudogu.com>
Pushed-by: Laura Gorzitze<laura.gorzitze@cloudogu.com>
2023-11-02 12:41:54 +01:00
Eduard Heimbuch
69c165749a Show correct image diff if compare across multiple commits
Pass the ancestor commit as the old revision if it is set in the GitDiffResult. This fixes the image diff renderer if the pull requests consists of multiple commits to show the full diff instead of the changes between the latest two commits.
2023-11-01 14:05:54 +01:00
Thomas Zerr
b2472d85d0 Added force to push command for git and hg repos
Committed-by: Rene Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-09-14 20:28:37 +02:00
Rene Pfeuffer
8352cf349c Do not try to init non-git repos for git
The initialization to set the default branch in
git repositories should not be executed for
non-git repositories. Otherwise, this throws
exceptions in SVN repositories all the time
because the branch command is not supported.

Committed-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2023-09-08 13:22:57 +02:00
tzerr
d835c6f0ca Merge tag '2.44.3'
Release version 2.44.3
2023-09-01 10:44:33 +02:00
Rene Pfeuffer
545a2061ae Fix check for lfs files
This fixes the check for LFS files used in git imports
and mirror command.

First this checks for LFS files recursively in the tree
(in other words, before LFS files were found only in
the root directory).

Second, this fixes a bug in the used JGit lfs filter by
checking, whether the checked tree entry is a normal
file. This prevents missing object exceptions during
the check when the repository contains a submodule.

Committed-by: Thomas Zerr <thomas.zerr@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-08-31 15:45:13 +02:00
Eduard Heimbuch
7a352295ab Set git default branch on first push to not-initialized repository
Committed-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2023-08-15 12:06:11 +02:00
Eduard Heimbuch
0e7a3ec53b Improve general performance
- Adjust logging
- Optimize cache speed
- Cleanup classes

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>

Reviewed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2023-06-28 14:18:18 +02:00
Eduard Heimbuch
e4d846b0d4 Improve repo exception logging 2023-06-15 12:43:06 +02:00
Rene Pfeuffer
92390ce0d2 Fix default branch in git mirror command
The git mirror command did not set the default branch correctly in all cases. If the source repository contained a 'master' branch, no default branch was set. This led to an error in the refresh process, when globally another branch has been configured as dafault (when not changed, this is 'main'), because the working copy should be created with the main branch checked out. Because no default was specified, the globally configured default (by default 'main') had been taken and that branch does not exist in the mirror.

So all subsequent mirror updates failed with a message like this one:

could not find branch with id main in repository with id ...

With this fix, the default branch is always set in the SCM-Manager configuration for the repository and therefore cannot be missing in subsequent updates.

Committed-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-05-12 13:12:40 +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
Rene Pfeuffer
8eb2687e10 Fix branch and tag name validation
The validation for branch and tag names has been
too limited. This led to errors in the frontend for
branches, that had been created using the
cli tools for git or hg but have not been seen as
valid by SCM-Manager.

To fix this, the patterns to validate branch and
tag names are relaxed and relate to the git
rules (https://git-scm.com/docs/git-check-ref-format).
Because these rules could not be expressed
using regular expressions alone, in addition
possible exceptions will be handled in the
git branch and tag commands.

Committed-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2023-04-05 11:45:15 +02:00
Konstantin Schaper
d257c8616c Display images in diffs
Committed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-03-22 11:17:22 +01:00
Rene Pfeuffer
68110ee6b3 Retry failing integration tests
This uses 'RetryingTest' from junit jupiter to retry integration tests that are known to fail from time to time. We explicitly mark single tests in contrast to set a global retry to be able to trace those, whenever this is intended.

To do so, we have to update to the latest version of JUnit. Unfortunately, this brought a new behaviour for the @TempDir annotation: In contrast to the former behaviour where for one test all annotated parameters got the same directory, in the new version the parameters get different directories assigned. This led to the need of some consolidation between @BeforeEach methods and the related tests.

Committed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-03-22 06:24:33 +01: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
Rene Pfeuffer
cb8c951cb8 Set the HEAD in Git pull command
Committed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-02-23 12:38:26 +01:00
Eduard Heimbuch
f28eaeca15 Fix repository resolution for ssh urls with context path
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2023-02-23 10:57:43 +01:00
Rene Pfeuffer
0361ae3c6c Sets the default branch for a new git repository from an import to the HEAD reference of the imported repository.
Committed-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
2023-02-23 10:10:33 +01:00
René Pfeuffer
29a26791eb Merge tag '2.41.1'
Release version 2.41.1
2023-02-16 18:50:31 +01:00
Rene Pfeuffer
90dcb713b3 Remove unconditional force push
This removes the unconditional force mode used while pushing changes made by the modify or the merge command in git repositories. The force mode led to the "deletion" of other changes on the same branch made between the creation of the working copy and the push to the core repository inside SCM-Manager.

Committed-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
2023-02-16 16:12:55 +01:00