Commit Graph

1149 Commits

Author SHA1 Message Date
Johannes Schnatterer
94582554ca Git Plugin Config: Adds test for empty config 2018-08-01 16:29:37 +02:00
Johannes Schnatterer
aed70d3544 Git Plugin Config: Create fine-grained configuration permissions.
No more hard-coded isAdmin() checks.
Also adds more tests.
2018-08-01 16:21:05 +02:00
Johannes Schnatterer
86af96bd83 GitConfigResourceTest: Realizes missing asserts 2018-08-01 15:34:17 +02:00
Johannes Schnatterer
fc77ae3a47 Adapts tests to new GitResource URL 2018-08-01 15:15:07 +02:00
Johannes Schnatterer
59b60d104c GitConfigDto: Use camel case, get rid of base class.
There's no parent module for a shared SimpleRepositoryConfigDto for git,
hg and svn. scm-plugins and core are too generic.
The redundancy (one property) does not hurt too much right now.
2018-08-01 14:44:42 +02:00
Johannes Schnatterer
48e940e496 Changes URL for new Git config to /config/git.
Fits well with "global" config available at /config
2018-08-01 14:13:45 +02:00
Johannes Schnatterer
7c8fee5640 Move Mapper binding to GitServletModule 2018-08-01 14:11:27 +02:00
Johannes Schnatterer
02327b55f3 Makes pom.xmls more DRY 2018-08-01 11:42:40 +02:00
Johannes Schnatterer
35231fb202 Merged 2.0.0-m3 into feature/global_config_v2_endpoint 2018-08-01 10:30:38 +02:00
Johannes Schnatterer
7572580ac1 Create fine-grained configuration permissions.
No more hard-coded isAdmin() checks.
2018-07-30 17:41:00 +02:00
Michael Behlendorf
7203fe4668 Implement tests for GitConfigResource 2018-07-19 16:43:29 +02:00
Michael Behlendorf
94b0fdd212 Add Extension annotation to GitConfig MapperModule 2018-07-19 16:09:38 +02:00
Michael Behlendorf
8e1e77aed4 Fix git config v2 endpoint path 2018-07-19 16:08:38 +02:00
Michael Behlendorf
2aa73883eb Remove redundant dependencies 2018-07-19 16:07:38 +02:00
Michael Behlendorf
ada3d6679f Implement git config v2 endpoint 2018-07-17 13:39:55 +02:00
Sebastian Sdorra
90aff6b31f merge branch heads of 2.0.0-m3 2018-07-16 15:21:29 +02:00
Sebastian Sdorra
187384088b remove no longer required sonia.scm.url package 2018-07-16 14:17:05 +02:00
Sebastian Sdorra
8a2346271a do not expose exception to the client 2018-07-16 13:51:37 +02:00
Sebastian Sdorra
1e37dfb3a7 use subscribe annotation of legman instead of guava eventbus 2018-07-16 11:26:00 +02:00
René Pfeuffer
53f3264f6e Correct repository name for hg 2018-07-11 12:53:48 +02:00
René Pfeuffer
8391e75a15 Correct servlet paths for svn requests 2018-07-11 10:14:00 +02:00
René Pfeuffer
5db74e08cb Fix git directory name 2018-07-11 08:08:46 +02:00
René Pfeuffer
dc8ecd5689 Adjust to repository storage with id 2018-07-10 15:31:18 +02:00
René Pfeuffer
43ca72255e Remove redundant checks 2018-07-09 10:47:28 +02:00
Philipp Czora
5d5d3c9170 Implemented persisting repositories according to namespace changes
Repository directories are now named after the repo's id instead of it's
name
2018-07-06 11:57:43 +02:00
Philipp Czora
ffabda3f83 Set namespace while creating a repository 2018-06-29 17:10:14 +02:00
René Pfeuffer
83d6ab8e9c Backed out changeset 5d23ff274a2f 2018-06-25 11:52:36 +02:00
Matt Harbison
405dd67275 ensure each message line printed in the Mercurial hook gets a trailing newline
I noticed that the exception printed in the previous commit started on the same
line as the print for the `str(e)` case right before it.  Since this also prints
the content of urllib2.URLError.read(), it seems better to remove any existing
newline and re-add it, than to just assume the `str(e)` case was the only
problem.
2018-06-22 16:42:05 -04:00
Matt Harbison
2d103b7f95 optionally print tracebacks when the Mercurial hook swallows an exception
If `ui.traceback=True` is set on the server, this prints the stacktrace for the
exception on the client side.  Otherwise, nothing happens.  I tried allowing the
exception to propagate back to Mercurial, but then the client sees this message
with 4.4.2 and 4.6.1:

    abort: remote error:
    Mercurial/Python process ends with return code 1

Something odd changed when upgrading from CentOS 7.4 to 7.5 around forwarding
requests from the loopback address that I don't fully understand.  First, we
were getting a ValueError from inside `opener.open()` saying that 'localhost'
didn't match the host listed in the SSL certificate.  That wasn't visible until
adding this.

Then what happened is a connection refused out of the same function, so the
traceback is added to the other handler too.  Running the equivalent command on
the command line from the 'vcs' host stopped working in 7.5:

  $ curl https://vcs.domain.com/hook/hg/?ping=true
  curl: (7) Failed connect to vcs.domain.com:443; Connection refused

But it works when run on another machine targeting that same 'vcs' host.  Adding
another firewall rule allows everything to work from the 'vcs' host again:

  $ iptables -t nat -I OUTPUT -p tcp -o lo --dport 443 -j REDIRECT --to-ports 8443
2018-06-22 16:33:52 -04:00
Matt Harbison
a051eb159c #989 load global configuration in hgweb on Mercurial 4.1 and later 2018-06-22 16:06:35 -04:00
René Pfeuffer
9d2d70f9df Simplify things 2018-06-20 16:08:51 +02:00
René Pfeuffer
7f19b5baff Fix typo 2018-06-20 11:11:14 +02:00
Sebastian Sdorra
92444fa73b json before xml 2017-06-28 22:02:05 +02:00
Sebastian Sdorra
e734ff8268 removed unnecessary json url extension 2017-06-28 22:01:11 +02:00
Sebastian Sdorra
e826b833cc switch from jersey 1.x to resteasy 2017-06-27 20:16:05 +02:00
Sebastian Sdorra
3f27dd8cca [maven-release-plugin] prepare for next development iteration 2018-05-04 11:14:45 +02:00
Sebastian Sdorra
a0b3b154c8 [maven-release-plugin] prepare release 1.60 2018-05-04 11:14:45 +02:00
Sebastian Sdorra
7d6c65799e #972 use javahg version which is compatible with java 7 2018-04-12 11:57:00 +02:00
Sebastian Sdorra
247ee63a95 [maven-release-plugin] prepare for next development iteration 2018-04-11 10:09:12 +02:00
Sebastian Sdorra
92a492f68b [maven-release-plugin] prepare release 1.59 2018-04-11 10:09:11 +02:00
Gábor Stefanik
e230c0f4cd make {extras} work on old versions of Hg 2018-04-06 20:30:15 +00:00
Sebastian Sdorra
7ed4dbcf00 fix hgweb execution for mercurial versions prior 4.1 2018-04-06 14:01:00 +02:00
Sebastian Sdorra
dd313036ff [maven-release-plugin] prepare for next development iteration 2018-04-06 08:28:51 +02:00
Sebastian Sdorra
482589fc67 [maven-release-plugin] prepare release 1.58 2018-04-06 08:28:50 +02:00
Sebastian Sdorra
ff2afceb55 update javahg to version 0.13 2018-04-05 19:48:04 +02:00
Sebastian Sdorra
3d401b93ea #970 added help text for enable httppostargs 2018-04-03 11:56:51 +02:00
Sebastian Sdorra
acebd0f25e #970 wrap requests only if http postargs is enabled 2018-04-03 11:14:05 +02:00
Sebastian Sdorra
8047d36028 #970 use iso-8859-1 for http post args instead of us-ascii 2018-04-03 11:00:16 +02:00
Sebastian Sdorra
b43e406b76 #970 initial support of mercurials httppostargs protocol 2018-03-30 11:20:22 +02:00
Sebastian Sdorra
a34acd8ed4 #970 added option to enable the experimental httppostargs protocol of mercurial 2018-03-29 22:14:28 +02:00