Commit Graph

2306 Commits

Author SHA1 Message Date
René Pfeuffer
69b09466dc Fix license 2025-02-13 18:48:57 +01:00
Matt Harbison
c30a06d26a Avoid modifying the Mercurial repository config file to add config options
Modifying the config file is complicated and error prone, but there hasn't been
any other option aside from setting `HGRCPATH` to point to a standalone file.
Starting with Mercurial 7.0 (scheduled for March 2025), there's now a global
option to specify one or more additional config files on the command line,
without disabling the normal system and user level config file processing.[1]
Since I'm not sure what the minimum supported Mercurial is for this project,
this includes an extension that backports the same option if it is not present
in the version of Mercurial that is used, and does nothing if Mercurial natively
supports it.  I tested back to Mercurial 6.0, which should be more than
sufficient- 6.1.4 (June 2022) was the last release to support Python 2 (which
has been EOL since Jan 2020), and the Python 3 support before that release was
considered experimental.  It likely works in earlier versions, but there's a
definite minimum of 4.9 (Feb 2019), due to the `exthelper` module import.

Without the need to modify a possibly existing file and then restore it when
done, a bunch of code falls away, and the tests that supported it.


[1] https://repo.mercurial-scm.org/hg/rev/25b344f2aeef
2025-02-07 16:16:24 -05:00
Matt Harbison
0fa7ddfb9d Stop modifying and reusing the global JavaHg RepositoryConfiguration singleton
I can't point to a specific error, but modifying a singleton and reusing it is
a good way to get unexpected state.  The extension adding won't collect
additional state (it's add-if-not-present), but the underlying
`java.util.HashMap` isn't threadsafe.  Any differences in the environment map
when this is called would alter that state of anything else that still held a
configuration (and it also uses `HashMap`), and the pending changeset, encoding,
and HgBin settings would be overwritten for everybody outright.

There's only a default constructor for this class, so nothing to pass along in
the constructor.  I don't *think* this was the cause of the random auth failures
mentioned in the previous commit, but it's easy to avoid these potential
problems.
2025-01-31 15:30:29 -05:00
Matt Harbison
499f949c25 Stop ignoring global Mercurial configuration for non-server commands
There was previously a weird duality where a simple push to or pull from a
repository hosted by SCM-Manager would load all of the system and user level
config files, but they were ignored when importing a repository.  I found this
out when importing an LFS repo, and it eventually failed with a message that the
LFS extension needs to be enabled, even though it was enabled globally.  The
global config should typically never be ignored, because some repositories are
unreadable without certain extensions or configurations.

The JavaHg API here mirrors the hg behavior for the `HGRCPATH` environment
variable- not setting it (or null here) uses the default config resolution, and
`""` (the default in JavaHg for some reason) disables default config resolution.
The repository initialization code in JavaHg also uses `""`, and there's no way
to alter that from the outside.  But that appears to be harmless, so I'm
ignoring that for now.  Note that this may only have been a problem on
non-Windows systems- setting an environment variable to empty on Windows
*unsets* the variable, even in the `_wputenv()` API, which is what we want.

After this, normal push/pull operations continue to use the global config.  But
now imports from the SCM-Manager UI, the hooks run during a push, and any other
commands that are run through JavaHg will see a consistent configuration.  LFS
(and maybe largefiles- I haven't tested it) repository imports now work.  (I
wouldn't say "supported" yet because it doesn't pull the blobs.  The largefiles
extension has a command for doing this, but the LFS extension doesn't.  The
stopgap for this is to run `hg verify` to download the blobs, but that won't
work here with the way subrepos aren't nested as expected.  I can work on a
command on the hg side to fill this gap.)

One final thing to note here- as I was testing, I initially got authentication
failures when trying to pull.  It happened several times as I added more and
more logging, then disappeared, and I wasn't able to trigger it again as I
backed off the logging to get to this change alone.  The auth info is written to
the repository's hgrc file, so a change to whether or not the global
configuration is processed is irrelevant.  The next couple of commits will try
to improve the related code.
2025-01-31 15:14:13 -05:00
CES Marvin
844dc394e9 Prepare for next development iteration 2025-01-28 09:43:54 +00:00
CES Marvin
924f258ae7 Release version 3.7.1 2025-01-28 09:05:24 +00: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
CES Marvin
cae0eb6fb1 Prepare for next development iteration 2025-01-23 08:26:47 +00:00
CES Marvin
64a884f614 Release version 3.7.0 2025-01-23 07:46:54 +00:00
René Pfeuffer
e7abde8322 Merge branch 'main' into develop 2025-01-17 19:54:54 +01:00
René Pfeuffer
f7b17ee647 Prepare for next development iteration 2025-01-17 19:54:40 +01:00
CES Marvin
060c8d6d64 Release version 3.6.1 2025-01-17 17:53:50 +00: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
CES Marvin
cd2209d1d2 Prepare for next development iteration 2024-12-05 10:43:31 +00:00
CES Marvin
bce137fb3a Release version 3.6.0 2024-12-05 10:00:59 +00: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
Thomas Zerr
3a88dff70f Add depcheck script and solve issues 2024-10-16 11:19:22 +02:00
CES Marvin
9458514129 Prepare for next development iteration 2024-10-09 13:00:50 +00:00
CES Marvin
2c519b553a Release version 3.5.0 2024-10-09 12:19:03 +00:00
Rene Pfeuffer
4f1d2cd7bf Update jest related libraries
Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2024-09-26 16:56:44 +02:00
René Pfeuffer
35aec03814 Merge branch 'main' into develop 2024-09-24 11:53:23 +02:00
René Pfeuffer
6ed2f14d33 Prepare for next development iteration 2024-09-24 11:51:57 +02:00
CES Marvin
0fc028e071 Release version 3.4.2 2024-09-24 08:59:31 +00: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
René Pfeuffer
2dc170475d Fix JavaDoc error 2024-08-30 13:44:49 +02:00
CES Marvin
ddd673650a Prepare for next development iteration 2024-08-29 09:26:05 +00:00
CES Marvin
99dba687e0 Release version 3.4.1 2024-08-29 08:36:35 +00:00
Rene Pfeuffer
a2d82372e5 Handle NullPointerException in hgrc clean-up
We encountered NullPointerExceptions during hg repository imports. This happened, when neither authentication nor proxy definions had been given. In this case, no hgrc will be created and therefore we get the exception in the clean-up step. Now, the clean-up is only triggered, if the hgrc had been created beforehand.

To prevent further error in the clean-up, we no catch other potential exceptions and log them but do not let them break the import.

Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
2024-08-29 08:50:51 +02:00
CES Marvin
acab8585a4 Prepare for next development iteration 2024-08-19 09:43:09 +00:00
CES Marvin
ea37d2ca20 Release version 3.4.0 2024-08-19 08:53:12 +00: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
CES Marvin
2254420221 Prepare for next development iteration 2024-07-05 12:20:01 +00:00
CES Marvin
f2f3cb62ed Release version 3.3.0 2024-07-05 11:34:01 +00: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
CES Marvin
a0db5326be Prepare for next development iteration 2024-06-24 12:35:52 +00:00
CES Marvin
bad14dfcfa Release version 3.2.2 2024-06-24 12:23:27 +00:00
Rene Pfeuffer
b98cdeb28d Fix sub repositories in mercurial
The sub repositories did not show up in the source view.&#10;This fixes python errors for the computation of sub&#10;repositories in hg.

Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
2024-06-19 17:46:42 +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
CES Marvin
0ffd80310b Prepare for next development iteration 2024-05-31 09:18:21 +00:00
CES Marvin
a0e464bed6 Release version 3.2.1 2024-05-31 09:03:24 +00:00
René Pfeuffer
2222a78baa Merge branch 'main' into develop 2024-05-30 10:40:03 +02:00