728 Commits

Author SHA1 Message Date
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
d0df8977ef Bugfix for long filenames in tar (#1552)
Fixes errors with long file names in tar archives. This may arise with hg repositories with deep directories.
2021-02-18 16:30:35 +01:00
Sebastian Sdorra
7c50fd935c Fix broken mercurial http post args configuration (#1532)
Fixes a regression which was introduced with #1416. In #1416 we have reimplemented the way configuration is passed to the mercurial cgi handler. Before #1416 we used environment variables which are picked up by hgweb.py, after #1416 we pass mercurial configurations as command line parameters directly in the HgCGIServlet. But sadly the configuration option for httppostargs uses still an environment variable, which is not picked up by anyone.

See #1525
2021-02-09 15:59:05 +01:00
Eduard Heimbuch
c3ab6bc5d5 Bundle and unbundle command for mercurial (#1511)
Support for exporting and importing mercurial repositories as tar ball

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2021-01-28 13:09:47 +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
Sebastian Sdorra
c1aa851c72 Migrate plugins 2021-01-14 11:55:27 +01:00
Sebastian Sdorra
b61d817c9c Implement mercurial cgi protocol as extension (#1458)
* Handle mercurial cgi protocol with an hg extension
* Refactor CGI executor to allow command arguments
* Unify python scripts and hg extensions
* Implement new auto configuration
* Use HKEY_LOCAL_MACHINE instead of
  HKEY_CURRENT_USER registry keys to find mercurial
  installations on windows
2020-12-17 10:07:20 +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
a562de7174 Merge pull request #1463 from scm-manager/feature/import_hg_from_url
Feature/import hg from url
2020-12-03 11:46:27 +01:00
René Pfeuffer
7faa714a54 Set credentials for hg import via hgrc file 2020-12-03 11:08:54 +01:00
Eduard Heimbuch
60cdc6f8cf Merge branch 'develop' into feature/import_git_from_url 2020-12-02 14:39:45 +01:00
Eduard Heimbuch
28b485f11f add import for hg repository via url with and without credentials 2020-12-02 14:22:54 +01:00
Eduard Heimbuch
7db33d2e65 Mind review findings 2020-12-02 10:47:48 +01:00
Konstantin Schaper
967de2160c fix sonarqube warnings 2020-12-02 10:11:53 +01:00
Konstantin Schaper
0dbea12a62 Revert "split hg tag command tests"
This reverts commit f5106e86
2020-12-02 08:54:21 +01:00
Konstantin Schaper
8e19fc641d rework hg commands 2020-12-01 18:39:50 +01:00
René Pfeuffer
121e7bd638 Fix minor issues 2020-12-01 18:19:23 +01:00
Konstantin Schaper
f5106e864d split hg tag command tests 2020-12-01 15:28:10 +01:00
Konstantin Schaper
9ec8b4efac fix review findings 2020-12-01 15:16:55 +01:00
Eduard Heimbuch
b40bfd8fe2 Merge branch 'develop' into feature/import_git_from_url 2020-12-01 12:18:13 +01:00
Konstantin Schaper
e8044747e3 fix review findings 2020-12-01 11:18:19 +01:00
Konstantin Schaper
a4d0acd7e2 declare tag support for hg 2020-12-01 09:33:43 +01:00
Konstantin Schaper
e18480ad2b add permission check to hal links for tags 2020-11-30 15:25:29 +01:00
Konstantin Schaper
f575e038ec remove redundant code 2020-11-30 14:19:16 +01:00
Konstantin Schaper
8986e3d378 Merge branch 'develop' into feature/manage-tags
# Conflicts:
#	scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgRepositoryServiceProvider.java
2020-11-30 14:18:05 +01:00
Konstantin Schaper
7e46c3a491 wip fixes 2020-11-30 14:15:42 +01:00
Eduard Heimbuch
275ca49f71 Mark old import handler api as deprecated 2020-11-27 13:30:01 +01:00
René Pfeuffer
d732100935 Fix typo 2020-11-27 13:11:42 +01:00
Sebastian Sdorra
136cdbb6b0 Fix broken HgVersionCommand
Use waitFor instead of exitValue to wait for process to finish
2020-11-27 10:46:37 +01:00
Sebastian Sdorra
8ee8c8b351 Merge branch 'develop' into feature/hg_hooks_over_tcp
# Conflicts:
#	CHANGELOG.md
2020-11-27 08:57:09 +01:00
Sebastian Sdorra
3e19f28cc0 Do not use socket.MSG_WAITALL 2020-11-27 08:50:22 +01:00
Sebastian Sdorra
7357d83b73 Use DataInputStream and DataOutputStream instead of manual reading and writing 2020-11-27 08:10:18 +01:00
René Pfeuffer
7a47e68707 Make stale state computation configurable 2020-11-26 08:32:06 +01:00
René Pfeuffer
4d4f89dc7e Read last commit date for hg branches 2020-11-26 08:31:14 +01:00
René Pfeuffer
f0f7ddc444 Add test for hg branches command 2020-11-26 08:31:14 +01:00
Konstantin Schaper
d0feb7c22c implement hg tag command and add rest endpoints 2020-11-25 11:29:06 +01:00
Sebastian Sdorra
c0ae910d23 Implement more robust socket hook protocol 2020-11-22 13:44:33 +01:00
Sebastian Sdorra
73b2c4adc2 Do not expose internal exception messages 2020-11-21 09:22:46 +01:00
Sebastian Sdorra
959dfb8f45 Fix compiler error 2020-11-19 14:49:29 +01:00
Sebastian Sdorra
0841a0a409 Merge branch 'feature/hg_hooks_over_tcp' of github.com:scm-manager/scm-manager into feature/hg_hooks_over_tcp 2020-11-19 14:34:56 +01:00
Eduard Heimbuch
0b96e7d08b Merge branch 'develop' into feature/hg_hooks_over_tcp 2020-11-19 14:31:00 +01:00
Sebastian Sdorra
1311061c82 Pass transaction id from request to mercurial hooks 2020-11-19 14:30:39 +01:00
René Pfeuffer
69a3a8a2da Convert update dto classes to interfaces 2020-11-19 13:19:49 +01:00
Sebastian Sdorra
29faa5ec6c Fix review findings 2020-11-19 12:22:52 +01:00
Sebastian Sdorra
982743e827 Fix review findings 2020-11-19 10:21:17 +01:00
Sebastian Sdorra
b6c5a253cb Fixed missing messages on exceptions during hook 2020-11-19 09:26:36 +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