]> source.dussan.org Git - gitblit.git/log
gitblit.git
4 years agoMerge pull request #1324 from fzs/fix-prefLocale-docsNPE
Florian Zschocke [Mon, 11 Nov 2019 17:30:50 +0000 (18:30 +0100)]
Merge pull request #1324 from fzs/fix-prefLocale-docsNPE

Two fixes: broken links to docs and preferred language selection

4 years agoFix user preferences selecting the wrong preferred locale. 1324/head
Florian Zschocke [Mon, 11 Nov 2019 17:13:11 +0000 (18:13 +0100)]
Fix user preferences selecting the wrong preferred locale.

Due to a wrong comparison, when loading the preferred locale in the
user preferences page, in cases like `zh_CN` or `de_DE` the wrong
locale would be chosen.

As with too many things, the code is duplicated on the `UserPage`
and the `EditUserPage`. And they differ. So extract the choosing of
the preferred language for display into a method in the (more up-to-date)
`UserPage` and call that from the `EditUserPage`.

4 years agoGuard docs pages against bad URLs
Florian Zschocke [Mon, 11 Nov 2019 15:24:45 +0000 (16:24 +0100)]
Guard docs pages against bad URLs

If, for example, an external site links to a docs page or a specific
doc page, and the branch that link points to is no longer existing,
an internal error happens due to a NPE.

The NPE is guarded against and a No Docs page is returned.

4 years agoAdd `clone.bundle` as known command, but reject it as not implemented. 1323/head
Florian Zschocke [Sun, 10 Nov 2019 23:33:02 +0000 (00:33 +0100)]
Add `clone.bundle` as known command, but reject it as not implemented.

4 years agoFix NPE when no action can be parsed from the URL
Florian Zschocke [Sun, 10 Nov 2019 23:10:43 +0000 (00:10 +0100)]
Fix NPE when no action can be parsed from the URL

Renames `static final` variables according to convention to be in all
upper case. That makes it easier to see that in an `equals` comparison
the final variable should come first as it will not trigger a NPE.

Also strip parameters from the URL when extracting the repository
name from it. Parameters can not be part of a repository name, and
this way an empty repository name can be detected.

Fixes #1092

4 years ago:book: Fix link to LDAP sample data LDIF file in setup.
Florian Zschocke [Sun, 10 Nov 2019 17:37:13 +0000 (18:37 +0100)]
:book: Fix link to LDAP sample data LDIF file in setup.

4 years agoIn SSH tests ignore an external SSH tool
Florian Zschocke [Sun, 10 Nov 2019 12:04:29 +0000 (13:04 +0100)]
In SSH tests ignore an external SSH tool

The SshDaemonTest would fail under Windows. That is because JGit looks
at the `GIT_SSH` environment variable. If it is set, the tool the variable
is pointing to is used for the SSH connection. This is a problem when
it is set to "Plink" under Windows, because Plink will not recognize the
server key and will not find it in the registry, cached as a known host.
Since a test can/should not add the key to the registry but simply wants
to ignore it, but there is no way to tell Plink to do so, the tests would
fail.

This patch filters the `GIT_SSH` environment variable from JGit's
`SystemReader`, so that the internal SSH client is used.

4 years agoMerge pull request #1322 from fzs/sshd_update
Florian Zschocke [Sun, 10 Nov 2019 16:56:56 +0000 (17:56 +0100)]
Merge pull request #1322 from fzs/sshd_update

Update dependencies MINA to 2.0.21 and SSHD to 1.2.0

Update SSHD to fix an issue with hmac-sha2-512. This resolves problems with clients that prefer SHA-512 over SHA-256.

This also updates the dependency on SLF4J to the latest version, as the updated dependency on MINA did also bring in higher SLF4J versions.

4 years agoUpdate SLF4J dependency to latest version 1.7.29. 1322/head
Florian Zschocke [Fri, 8 Nov 2019 18:48:05 +0000 (19:48 +0100)]
Update SLF4J dependency to latest version 1.7.29.

4 years agoUpdate SSHD dependency to version 1.2.0.
Florian Zschocke [Fri, 8 Nov 2019 18:19:54 +0000 (19:19 +0100)]
Update SSHD dependency to version 1.2.0.

4 years agoUpdate SSHD dependency to version 1.1.0.
Florian Zschocke [Fri, 8 Nov 2019 16:26:06 +0000 (17:26 +0100)]
Update SSHD dependency to version 1.1.0.

4 years agoUpdate MINA to version 2.0.21.
Florian Zschocke [Fri, 8 Nov 2019 13:55:07 +0000 (14:55 +0100)]
Update MINA to version 2.0.21.

This includes a fix in MINA to a CVE.

4 years agoUpdate BouncyCastle dependency to version 1.57
Florian Zschocke [Sun, 10 Nov 2019 12:02:07 +0000 (13:02 +0100)]
Update BouncyCastle dependency to version 1.57

To support the new PBKDF2 password hashing, the Bouncy Castle provider
needs to be updated to a version that supports PBKDF2 with HMAC SHA265.
The current version doesn't have PBKDF2WithHmacSHA265, and neither does
Java 7, so that under Java 7 it can not be used. This update enables
the new password hashing under Java 7, too.

4 years agoIgnore the `RedisTicketService` tests until they are fixed.
Florian Zschocke [Sun, 10 Nov 2019 12:00:12 +0000 (13:00 +0100)]
Ignore the `RedisTicketService` tests until they are fixed.

Currently the tests cannot run as no Redis is available. Needs to be
fixed at some time.

4 years agoRemove Launcher from Manager and Federation Client.
Florian Zschocke [Fri, 8 Nov 2019 10:27:51 +0000 (11:27 +0100)]
Remove Launcher from Manager and Federation Client.

They will need to be called with the classpath and main class now,
instead of simply using the Jar.

4 years agoMerge pull request #1266 from pingunaut/1262_java9
Florian Zschocke [Thu, 7 Nov 2019 22:55:13 +0000 (23:55 +0100)]
Merge pull request #1266 from pingunaut/1262_java9

Added javax.activation dependency

4 years agoFix NullpointerException when stopping GitBlit Server.
Florian Zschocke [Thu, 7 Nov 2019 22:35:06 +0000 (23:35 +0100)]
Fix NullpointerException when stopping GitBlit Server.

When GitBlit server did not start properly, is running but couldn't
start the `PluginManager`, then stopping the server via the `--stop`
argument on the command line resulted in a NullpointerException.
Which left the server running. Now this is prevented and the server
will actually shut down.

4 years agoFor Java 9+ define the classpath instead of using a Launcher.
Florian Zschocke [Thu, 7 Nov 2019 19:00:17 +0000 (20:00 +0100)]
For Java 9+ define the classpath instead of using a Launcher.

The (moxie and other) Launcher do not work with Java 9 and later anymore.
It used to dynamically extend the classpath, misusing an internal
interface of the `URLClassLoader`. This is no longer possible since Java 9,
which closed that path and does not offer any way to dynamically extend
the classpath during runtime.

So the choice is between providing one large Jar with everything in it,
providing a Jar that has the Jars in `ext` listed explicitly in its
manifest, and specifying the classpath on the command line where
the `ext` directory can be added and all contained jar files will
be put on the classpath.

The motivation for the Launcher class was to be able to simply drop
new jar files into a directory and they will be picked up at the
application start, without having to specify a classpath. We opt
for solution three here. This way jar files can still be dropped
into the ext directory, albeit the directory needs to be added to
the classpath on the command line. Unfortunately using a wildcard
is not possible in the manifest file. We change the calls in the
script files accordingly. This seems like a good compromise,
since no one will run the application manually typing the whole
commandline anyway.

This also does away with the splash screen, by the way. Again,
doesn't seem like a big loss, as I don't think it was ever shown
for the Authority.

Personally, I am not convinced that it is the best way, because
I don't really think that the use case of dropping whatever jar
files into the `ext` directory is a valid one that happened a lot.

This does not yet fix the client programs, which still use a
Launcher. Maybe for them a all-in-one Jar is a better solution.

Fixes #1262
Fixes #1294

4 years agoReport Java versions used during build and server start.
Florian Zschocke [Thu, 7 Nov 2019 18:54:41 +0000 (19:54 +0100)]
Report Java versions used during build and server start.

With three versions about to be supported right now
it is getting more important to know which Java version is
used when building and testing Gitblit, and which Java
version is used to run Gitblit.

So have the Moxie build report the javac version, and the
JVM version that Moxie is running on. These might be
different.
The `GitBlitServer` will print the Java version and vendor,
so that it gets visible if a user would paste a log output
for analysis.

4 years agoUpdate to recommended com.sun.activation package. 1266/head
Florian Zschocke [Thu, 7 Nov 2019 14:28:21 +0000 (15:28 +0100)]
Update to recommended com.sun.activation package.

Update the dependency to the recommended JAF stand-alone
com.sun.activation:javax.activation:1.2.0

4 years agoSetup build matrix for OpenJDK 8, 9 and 11 on Circle CI
Florian Zschocke [Wed, 6 Nov 2019 15:20:27 +0000 (16:20 +0100)]
Setup build matrix for OpenJDK 8, 9 and 11 on Circle CI

4 years agoTravis: Build and test on JDK 7, 8 and 11.
Florian Zschocke [Wed, 6 Nov 2019 13:44:00 +0000 (14:44 +0100)]
Travis: Build and test on JDK 7, 8 and 11.

This uses the Trusty (14.04) image since that in the only one
where all three JDKs are available.

4 years agoMerge branch 'pingunaut-1166_more_secure_password_hashes' into master.
Florian Zschocke [Wed, 6 Nov 2019 11:39:55 +0000 (12:39 +0100)]
Merge branch 'pingunaut-1166_more_secure_password_hashes' into master.

4 years agoAdd more PasswordHash tests with strings beyond iso-8859-1.
Florian Zschocke [Wed, 6 Nov 2019 11:35:31 +0000 (12:35 +0100)]
Add more PasswordHash tests with strings beyond iso-8859-1.

4 years agoUse the new PasswordHash classes.
Florian Zschocke [Tue, 5 Nov 2019 21:26:11 +0000 (22:26 +0100)]
Use the new PasswordHash classes.

Integrate the `PasswordHash` class and subclass in the user
and password editing and authentication. Replaces the old code and
the previous `SecurePasswordHashingUtils` class.

4 years agoAdd support for PBKDF2 to PasswordHash
Florian Zschocke [Tue, 5 Nov 2019 12:43:06 +0000 (13:43 +0100)]
Add support for PBKDF2 to PasswordHash

Integrate the work of pingunaut to add support for PBKDF2 password
hashing. A new class `PasswordHashPbkdf2` is added, which builds
on his `SecurePasswordHashUtils` class, but makes it a subclass
of `PasswordHash`. This will replace the original class when
integrating the new PasswordHash way into GitBlit.

4 years agoAdd a PasswordHash class as a central place to deal with password hashes.
Florian Zschocke [Tue, 5 Nov 2019 12:06:07 +0000 (13:06 +0100)]
Add a PasswordHash class as a central place to deal with password hashes.

Instead of having to deal with the implementation details of hashing
and verifying passwords in multiple places, have a central unit
be responsible for it. Otherwise we need to edit three different places
when adding a new hashing scheme.
With this class adding a new hashing scheme just requires creating a
new subclass of `PasswordHash` and registering its type in the enum
`PasswordHash.Type`.
The rest of the code will use a common interface for all hashing
schemes and doesn't need to be changed when a new one is added.

5 years agoencoded email's sender name with utf-8.
william [Thu, 2 Mar 2017 06:06:22 +0000 (14:06 +0800)]
encoded email's sender name with utf-8.

5 years agoSet default to `expanded` for collapsible repo groups.
Florian Zschocke [Sat, 15 Jun 2019 19:37:07 +0000 (21:37 +0200)]
Set default to `expanded` for collapsible repo groups.

Move the new property `web.collapsibleRepositoryGroups` into the
`web` section, close to the list type property. Set the default
to be `expanded`, so that the new feature is visible but the list
is still the full list like before.

Add new value `tree` to the description of the property
`web.repositoryListType`.

5 years agoRemove "folding outlines" and sort repositories before subfolders.
Florian Zschocke [Sat, 15 Jun 2019 19:09:36 +0000 (21:09 +0200)]
Remove "folding outlines" and sort repositories before subfolders.

Remove guard rails at the left to get a cleaner look.
To make it easier to determine which repositories belong to which
folder, display the repositories first, then the subfolder.

Decreased indentation a little.

5 years agoAdd support nested groups on the Repositories page
Florian Zschocke [Sat, 15 Jun 2019 12:34:29 +0000 (14:34 +0200)]
Add support nested groups on the Repositories page

Fix for #725.
Also covers #527.

This is a squashed commit of the following commits,
merging and closing pull request #1267:

commit 55fee41769ffab1aff59344fe117d481687aa743
Author: Martin Spielmann <mail@martinspielmann.de>
Date:   Mon Nov 6 17:19:53 2017 +0100

    declared local variable final to fix travis build

commit 131e4d14a48c2a3fdce621fa54637de50684d040
Author: Martin Spielmann <mail@martinspielmann.de>
Date:   Mon Nov 6 14:11:55 2017 +0100

    fix formatting (use tab for identation)

commit 8da5f6d5967894f157251c320928acdab3a451e7
Author: Martin Spielmann <mail@martinspielmann.de>
Date:   Mon Nov 6 13:45:39 2017 +0100

    Add repositoryListType tree. Addresses #725, 527 and includes #1224

commit 6c061651fb95212ae242dbca06c8d9ef80146201
Merge: f365daa3 40ee9653
Author: Martin Spielmann <mail@martinspielmann.de>
Date:   Sat Nov 4 13:19:08 2017 +0100

    Merge remote-tracking branch 'collapsible/ticket/527' into 725_nested_repos

commit f365daa3b1d6be135365f9b11bdece320beabf4e
Author: Martin Spielmann <mail@martinspielmann.de>
Date:   Sat Nov 4 13:10:24 2017 +0100

    first working version of tree model

5 years agocollapsible group repositories
ybosy [Fri, 7 Apr 2017 08:46:35 +0000 (10:46 +0200)]
collapsible group repositories

5 years agoAdd build dependency on parboiled to fix build of documentation.
Florian Zschocke [Thu, 13 Jun 2019 19:03:32 +0000 (21:03 +0200)]
Add build dependency on parboiled to fix build of documentation.

Updating JaCoCo in commit 23072ffb broke the build of the
HTML documentation. As found out by @chirontt, adding parboiled
as a build dependency fixes it.

Fixes #1220 and closes #1313

5 years agoEscape folder names in JGitUtils to allow special characters. Fixes #999
Martin Spielmann [Sat, 28 Jan 2017 14:24:57 +0000 (15:24 +0100)]
Escape folder names in JGitUtils to allow special characters. Fixes #999

5 years agoFix revLog test that broke due to changes in the hello-world repository.
Florian Zschocke [Mon, 10 Jun 2019 20:11:35 +0000 (22:11 +0200)]
Fix revLog test that broke due to changes in the hello-world repository.

5 years agoCreate unit tests for special characters in path names
Florian Zschocke [Mon, 10 Jun 2019 19:32:02 +0000 (21:32 +0200)]
Create unit tests for special characters in path names

Create a regression test for issue #999.
Add directories with '[]' ans '()' in the name to the
hello-world repository, so that they can be used in unit
tests for repository paths with special characters.

5 years agoNull-safe compare for ticket milestones without due date
Fritz Schrogl [Sun, 18 Feb 2018 15:21:33 +0000 (16:21 +0100)]
Null-safe compare for ticket milestones without due date

5 years agoDo not resolve symbolic links to repositories.
Florian Zschocke [Mon, 10 Jun 2019 14:37:15 +0000 (16:37 +0200)]
Do not resolve symbolic links to repositories.

When symbolic links under the base repository folder point to repositories
outside the base repository folder, the forming of relative repository
names failed and resulted in NullPointerExceptions.

Create the relative path by not following symbolic links, i.e. the link
name is taken as is and not resolved to the external path.

This also changes the whole `exactPath` method to work on Paths, instead
of Files.

Fixes #891 and fixes #837.

5 years agoMerge branch 'chirontt-external_repos_zipped' into master.
Florian Zschocke [Fri, 7 Jun 2019 20:43:51 +0000 (22:43 +0200)]
Merge branch 'chirontt-external_repos_zipped' into master.

5 years agoZips of recreated hello-world.git and all external repositories for testing.
chirontt [Sat, 27 Apr 2019 18:51:26 +0000 (14:51 -0400)]
Zips of recreated hello-world.git and all external repositories for testing.

This hello-world.git repo is created using the native Git for Windows
software.

Various test classes in the GitBlitSuite test suite require the presence
of the hello-world.git repo in github.com/git/ which has been missing,
hence causing many test failures in the suite. This recreation of the
hello-world.git repo aims to conform to the many test cases'
requirements in the suite, and to be checked in as part of the gitblit
repo, thus eliminates the requirement of a remote hello-world.git repo
during the test run. The repo is now stored is a zip ball in the new
src/test/data folder.

The hello-world repo's various commit IDs were hard-coded in various
test classes. These commit IDs, which must now have new values in the
recreated repo, are now extracted out to the
src/test/data/hello-world.properties file. The gitblit's build.xml is
modified to generate the HelloworldKeys.java file containing the
hello-world.properties file's key strings, in similar fashion as the
existing generation of the com.gitblit.Keys.java file. And these key
strings in HelloworldKeys.java are now used in the various test classes,
thus eliminating the hard-coding of the hello-world repo's commit IDs in
the test code.

During the test run by GitBlitSuite test suite, some repos from GitHub
were cloned and became part of the test data. These repos are now zipped
to be part of gitblit repo itself, thus eliminating the network fetch at
the start of test run which can be slow, especially with the JGit repo
cloning which is huge and time consuming. The cloned JGit repo is now
zipped and checked in to gitblit, along with the other 4 repos
(hello-world, ambition, gitective and ticgit). They will be unzipped
during the test suite run and be available in the local file system,
thus avoiding the need for some network fetch.

Special note on the zipped JGit repo: this repo is big (and growing all
the time on GitHub), and takes up about 32MB of disk space after cloning
from GitHub. I've made it smaller by resetting HEAD back to a commit of
5 years ago (with git reset --hard <commitId> command), to put it back
to roughly where/when the tests were written for it (which is not quite,
because there are tons of commit history since which can't be removed.)
The local JGit repo is then garbage-collected (with git gc --prune
--aggressive) to reduce its size to about 19MB.

Zipped it is still 17MB. This is a lot of MBs for a few tests.
So the JGit repo is not included in this commit.

Fixes #1275

5 years agoFix for various test failures.
chirontt [Sun, 28 Apr 2019 19:51:21 +0000 (15:51 -0400)]
Fix for various test failures.

Most of failures were due to temporary test repos, users and/or teams
being left behind after the test run, and these left-over stuff in
$baseFolder/data/git caused assertion errors in many tests in subsequent
test runs. This fix tries to delete those left-over stuff at the end of
each test, mainly in their @Afterclass code blocks.

PushLogTest.java is deleted as it doesn't work, and has been superseded
with better tests in various protocol test suites (GitServletTest,
GitDaemonTest, SshDaemonTest, etc.)

5 years agoMigrate to Circle CI version 2
Florian Zschocke [Thu, 6 Jun 2019 13:28:16 +0000 (15:28 +0200)]
Migrate to Circle CI version 2

The new Circle CI requires a completely different configuration.

6 years agoAdded javax.activation dependency "
Martin Spielmann [Fri, 3 Nov 2017 21:43:34 +0000 (22:43 +0100)]
Added javax.activation dependency "
thanks to this dependency, one can start gitblit with java 9 without using deprecated internal module --add-modules java.activation

7 years agoMerge pull request #1243 from sebastianopilla/master
James Moger [Mon, 5 Jun 2017 11:30:35 +0000 (04:30 -0700)]
Merge pull request #1243 from sebastianopilla/master

Fixes the 30 seconds timeout when cloning over HTTP

7 years agoRename the setting to httpIdleTimeout 1243/head
Sebastiano Pilla [Sat, 3 Jun 2017 12:25:01 +0000 (14:25 +0200)]
Rename the setting to httpIdleTimeout

7 years agoAdds the
Sebastiano Pilla [Wed, 31 May 2017 22:07:45 +0000 (00:07 +0200)]
Adds the

server.httpTimeout

setting to allow cloning big repositories over HTTP. This change fixes the java.util.concurrent.TimeoutException issue described in https://groups.google.com/d/topic/gitblit/UvDC48NpmF4/discussion .

7 years agoMerge pull request #1239 from pingunaut/1226_sshkey_form_feedback
James Moger [Mon, 22 May 2017 11:47:54 +0000 (07:47 -0400)]
Merge pull request #1239 from pingunaut/1226_sshkey_form_feedback

1226 sshkey form feedback

7 years agoMerge pull request #1238 from pingunaut/master
James Moger [Mon, 22 May 2017 11:46:30 +0000 (07:46 -0400)]
Merge pull request #1238 from pingunaut/master

Add nullcheck  during favorite protocol determination

7 years agoRemove unused code 1239/head
Martin Spielmann [Sun, 21 May 2017 22:42:47 +0000 (00:42 +0200)]
Remove unused code

7 years agoRevert "Fix nullpointer exception with unsupported URL protocol #1237"
Martin Spielmann [Sun, 21 May 2017 22:39:49 +0000 (00:39 +0200)]
Revert "Fix nullpointer exception with unsupported URL protocol #1237"

This reverts commit 51b9b7f9016899bbf8a39f6bc33a916a3d2b3838.

7 years agoRevert "Add feedback to SSH Key Form. #1226" 1238/head
Martin Spielmann [Sun, 21 May 2017 22:32:23 +0000 (00:32 +0200)]
Revert "Add feedback to SSH Key Form. #1226"

This reverts commit c3e317a28899915036517c3a05a2b883796f633d.
Was added by mistake here. Should go into own branch to be able to merge with upstream using separate PR

7 years agoAdd feedback to SSH Key Form. #1226
Martin Spielmann [Sun, 21 May 2017 22:29:08 +0000 (00:29 +0200)]
Add feedback to SSH Key Form. #1226

if key is empty of can not be parsed, form did provide any feedback to
user before

7 years agoFix nullpointer exception with unsupported URL protocol #1237
Martin Spielmann [Sun, 21 May 2017 20:50:48 +0000 (22:50 +0200)]
Fix nullpointer exception with unsupported URL protocol #1237

7 years agoMerge pull request #4 from gitblit/master
Martin [Mon, 24 Apr 2017 19:30:06 +0000 (21:30 +0200)]
Merge pull request #4 from gitblit/master

merge upstream master

7 years agoMerge pull request #1168 from lucamilanesio/bump-to-lucene-5.5.2
Florian Zschocke [Sat, 18 Mar 2017 12:37:25 +0000 (13:37 +0100)]
Merge pull request #1168 from lucamilanesio/bump-to-lucene-5.5.2

Bump to Lucene 5.5.2

The new code will create Lucene indices in a new directory named after codec and index version.
This provides for easy and safe up- and downgrades. But it also means that the old indices will
stick around on disk. What this version is missing is a kind of "garbage collection" deleting old, unused
indices when they are no longer needed. That task needs to be done manually currently. We should
at leas at some point provide a script for it.

7 years agoReindex tickets on server start if no index exists 1168/head
Florian Zschocke [Sun, 5 Mar 2017 19:12:48 +0000 (20:12 +0100)]
Reindex tickets on server start if no index exists

Check if tickets need to be reindexed when the server starts. This is the
case if no ticket index exists. In that case the ticket index is built.

This is done during the start of the `ITicketService`.

For this the interface of `ITicketService` needed to change. The `start`
method was defined abstract and the specific ticket services had to
implement it. None does any real starting stuff in it.
The `start` method is now final. It calls a new abstract method `onStart`
which the specific ticket services need to implement. In the existing
implementations I just changed `start` to `onStart`.

7 years agoRevert "Add library `lucene-backward-codecs` to migrate indices."
Florian Zschocke [Mon, 9 Jan 2017 13:43:46 +0000 (14:43 +0100)]
Revert "Add library `lucene-backward-codecs` to migrate indices."

This reverts commit 662fb9012fb6897c9b05c939232919797e665f38.

7 years agoUse versioned index directories for repository indices.
Florian Zschocke [Sun, 5 Mar 2017 16:11:50 +0000 (17:11 +0100)]
Use versioned index directories for repository indices.

Change from the index version of a repository index being stored in a config
file to also using index directories with the version in the name. For that,
`LuceneRepoIndexStore` is added, which adds the fixed `lucene` part to the path.
It also gives out the location of the `lucene.conf` file, which is now stored in
the index directory. This way it is automatically deleted when the directory is
deleted.

I believe that it should also provide means to store branch aliases and tips,
i.e. hide the config file completely. But this isn't implemented with this
commit, the `LuceneService` is still aware that a config file is used.

7 years agoIntroduce an index version for the ticket index
Florian Zschocke [Sun, 5 Mar 2017 15:45:44 +0000 (16:45 +0100)]
Introduce an index version for the ticket index

In order to be able to update the index definition, the ticket index
is assigned a version number, 2. This way the definiton can be updated
and compatability with existing index files can be checked.
The actual index is stored in a directory of name `indexVersion_codecVersion`.
This wayit is veriy easy to check if an index of a certain version exists on the
filesystem. It allows to have multiple indexes of different versions present,
so that a downgrade of the software is possible without having to reindex
again. Of coure, this is only possible if no new tickets were created since these
would be missing in the old index.

A new class `LuceneIndexStore` is introduced, which abstracts away the versioned
index directory. The idea is, that this provides one place to keep the Lucene
codec version and to allow to code compatibility rules into this class, so that
older indices can still be used if they are compatible.

7 years agoAdd DocValues to support sorting of ticket index fields.
Florian Zschocke [Sun, 26 Feb 2017 17:44:02 +0000 (18:44 +0100)]
Add DocValues to support sorting of ticket index fields.

In order to support sorting, Lucene 5 needs DocValue fields in an index.
So in order to make the ticket index work, i.e. show any tickets on the
tickets page, the ticket index needs to be changed, adding a DocValues
field.

The DocValuesFields are implemented for the current index, which does not
use multiple values for a field. Should at any time in the future an
existing numeric field get multiple values stored in a document, then
the index needs to know that and use SortedNumeric DocValues and SortFields
instead.

7 years agoReplace deprecated BooleanQuery constructor with builder.
Florian Zschocke [Sat, 21 Jan 2017 18:09:18 +0000 (19:09 +0100)]
Replace deprecated BooleanQuery constructor with builder.

Also replace deprecated `search` method with the one without a filter
argument, since the filter isn't used anyhow.

7 years agoUpdate link target to Lucene 5.5 query syntax, moving the link to the page.
Florian Zschocke [Sat, 21 Jan 2017 17:05:53 +0000 (18:05 +0100)]
Update link target to Lucene 5.5 query syntax, moving the link to the page.

Update the link target to the query parser syntax page of the 5.5 version.

Refactor the `LuceneSearchPage` to use an `ExternalLink` for the link
to the lucene page, so that the link target is kept and updated in the
Java code. Move the link out of the language files. This was way too
cumbersome to update the link target (which is probably why no one ever
did).

The query help text is changed to contain a variable:
`gb.queryHelp = here be some ${querySyntax} help`, which is replaced by
Wicket with a link.
The link text is a new lange file property: `gb.querySyntax`.

7 years agoRemove obsolete Lucene version constants.
Florian Zschocke [Sat, 14 Jan 2017 23:11:16 +0000 (00:11 +0100)]
Remove obsolete Lucene version constants.

7 years agoAdd library `lucene-backward-codecs` to migrate indices.
Florian Zschocke [Mon, 9 Jan 2017 13:43:46 +0000 (14:43 +0100)]
Add library `lucene-backward-codecs` to migrate indices.

To be able to read and migrate Lucene indices from old (4.x)
formats to new (5.x) ones, add the `lucene-backward-codecs`
library to the project.
It is added to the `ext` directory and therefore to the classpath.
According to the Lucene documentation, having it in the classpath
can affect performance. But right now the `ext` directory is the
only one available and even for a separate tool for offline
migration the library would be needed.

7 years agoExclude Lucene transitive dependencies.
Florian Zschocke [Mon, 2 Jan 2017 15:59:44 +0000 (16:59 +0100)]
Exclude Lucene transitive dependencies.

Exclude Lucene dependencies `lucene-spatial` and `lucene-join`.
They were added during the update but are not needed. This patch
excludes them explicitly so that they do not show up in the
generated IDE files and `ext` directory.

7 years agoBump to Lucene 5.5.2
Luca Milanesio [Thu, 22 Dec 2016 00:42:56 +0000 (00:42 +0000)]
Bump to Lucene 5.5.2

7 years agoMerge pull request #1207 from j123b567/fix/cs_locale
James Moger [Fri, 3 Mar 2017 15:53:03 +0000 (10:53 -0500)]
Merge pull request #1207 from j123b567/fix/cs_locale

Better Czech localization

7 years agoBetter Czech localization 1207/head
Jan Breuer [Fri, 3 Mar 2017 14:37:37 +0000 (15:37 +0100)]
Better Czech localization

7 years agoMerge pull request #1202 from j123b567/feature/treeViewTable
James Moger [Tue, 21 Feb 2017 14:30:18 +0000 (09:30 -0500)]
Merge pull request #1202 from j123b567/feature/treeViewTable

Prevent last column on Tree page from wraping

7 years agoPrevent last column on Tree page from wraping 1202/head
Jan Breuer [Mon, 20 Feb 2017 16:35:49 +0000 (17:35 +0100)]
Prevent last column on Tree page from wraping

With localizations, there can be longer text then 13em so there is a line break.
This fix prevent this line breaking and thus every line has normal height again.

7 years agoMerge pull request #1201 from j123b567/bug/1114
James Moger [Thu, 16 Feb 2017 13:17:20 +0000 (08:17 -0500)]
Merge pull request #1201 from j123b567/bug/1114

Fix #1114 HttpUtils getGitblitURL does not support nonstandard ports

7 years agoFix #1114 HttpUtils getGitblitURL does not support nonstandard ports 1201/head
Jan Breuer [Wed, 15 Feb 2017 17:58:55 +0000 (18:58 +0100)]
Fix #1114 HttpUtils getGitblitURL does not support nonstandard ports

X-Forwarded-Host can contain port number and it is added twice in that situation
This fix just prevent adding port number if it is already there

7 years agoMerge pull request #1200 from j123b567/locale/cs
James Moger [Wed, 15 Feb 2017 13:35:06 +0000 (08:35 -0500)]
Merge pull request #1200 from j123b567/locale/cs

Add Czech locale

7 years agoAdd Czech locale 1200/head
Jan Breuer [Mon, 13 Feb 2017 22:08:15 +0000 (23:08 +0100)]
Add Czech locale

7 years agoMerge pull request #1192 from mystygage/listBranchForRepository
James Moger [Wed, 8 Feb 2017 14:34:07 +0000 (09:34 -0500)]
Merge pull request #1192 from mystygage/listBranchForRepository

List branches from only one repository if a repository name is given

7 years agoMerge pull request #1198 from WilliamFromTW/master
James Moger [Wed, 8 Feb 2017 14:26:42 +0000 (09:26 -0500)]
Merge pull request #1198 from WilliamFromTW/master

New Setting "Default Language" when creating user

7 years agoNew Setting "Default Language" when creating user. 1198/head
william [Wed, 8 Feb 2017 00:35:01 +0000 (08:35 +0800)]
New Setting "Default Language" when creating user.

7 years agoList branches from only one repository if a repository name is given 1192/head
Markus Fömpe [Thu, 26 Jan 2017 12:50:54 +0000 (13:50 +0100)]
List branches from only one repository if a repository name is given

e.g.: https://localhost:8443/rpc/?req=LIST_REPOSITORY_BRANCHES&name=repo.git

Fix #1184

7 years agoMerge pull request #1187 from gitblit/revert-1186-listBranchForRepository
James Moger [Wed, 25 Jan 2017 14:17:53 +0000 (09:17 -0500)]
Merge pull request #1187 from gitblit/revert-1186-listBranchForRepository

Revert "New rpc endpoint for listing all branches from a given repository"

7 years agoRevert "New rpc endpoint for listing all branches from a given repository" 1187/head
James Moger [Wed, 25 Jan 2017 14:17:41 +0000 (09:17 -0500)]
Revert "New rpc endpoint for listing all branches from a given repository"

7 years agoMerge pull request #1186 from mystygage/listBranchForRepository
James Moger [Wed, 25 Jan 2017 14:17:12 +0000 (09:17 -0500)]
Merge pull request #1186 from mystygage/listBranchForRepository

New rpc endpoint for listing all branches from a given repository

7 years agoNew rpc endpoint for listing all branches from a given repository 1186/head
Markus Fömpe [Tue, 24 Jan 2017 10:54:01 +0000 (11:54 +0100)]
New rpc endpoint for listing all branches from a given repository

7 years agofix bug "get user default language null exception"
william [Wed, 25 Jan 2017 09:29:05 +0000 (17:29 +0800)]
fix bug "get user default language null exception"

7 years agoSending email (certificate zip file) based on locale that user selected 1185/head
william [Tue, 24 Jan 2017 09:30:01 +0000 (17:30 +0800)]
Sending email (certificate zip file) based on locale that user selected

7 years agoMerge pull request #1183 from RainerW/fixApacheProxySample
James Moger [Mon, 23 Jan 2017 18:56:24 +0000 (13:56 -0500)]
Merge pull request #1183 from RainerW/fixApacheProxySample

Documentation  update : "behind apache" also edit "Ajax-Location" header

7 years agowhen apache terminates https, the Ajax-Location header needs to be rewritten as well 1183/head
RainerW [Mon, 23 Jan 2017 18:35:25 +0000 (19:35 +0100)]
when apache terminates https, the Ajax-Location header needs to be rewritten as well

7 years agoMerge pull request #6 from fzs/sshAuthMethods
Florian Zschocke [Sat, 21 Jan 2017 15:31:52 +0000 (16:31 +0100)]
Merge pull request #6 from fzs/sshAuthMethods

Set list of offered SSH authentication methods.

7 years agoMerge pull request #1178 from srbala/patch-1
Florian Zschocke [Mon, 16 Jan 2017 19:51:30 +0000 (20:51 +0100)]
Merge pull request #1178 from srbala/patch-1

Update declaration to Servlet 3.0 in web.xml and weblogic.xml.
Fixes #1132

7 years agoUpdate weblogic.xml 1178/head
Bala Raman [Mon, 16 Jan 2017 19:29:45 +0000 (14:29 -0500)]
Update weblogic.xml

Update to web app 3.0 xsd

7 years agoUpdate to web.xml, fix to #1132
Bala Raman [Mon, 16 Jan 2017 00:05:48 +0000 (19:05 -0500)]
Update to web.xml, fix to #1132

Update to web.xml, fix to #1132

Fixes to namespace to fix xml parse error, where strict validation required

7 years agofix comment 1172/head
Martin Spielmann [Sat, 7 Jan 2017 12:58:07 +0000 (13:58 +0100)]
fix comment

7 years agoReplaced duplicated strings by using constant
Martin Spielmann [Sat, 7 Jan 2017 12:53:36 +0000 (13:53 +0100)]
Replaced duplicated strings by using constant

7 years agoUpdate AuthenticationManager to update weakly stored passwords on login
Martin Spielmann [Sat, 7 Jan 2017 12:47:42 +0000 (13:47 +0100)]
Update AuthenticationManager to update weakly stored passwords on login

7 years agoMerge pull request #1171 from pingunaut/usermanager-file-instantiation
James Moger [Fri, 6 Jan 2017 14:41:44 +0000 (09:41 -0500)]
Merge pull request #1171 from pingunaut/usermanager-file-instantiation

Update UserManager to support construction of IUserServices with IRuntimeManager as a constructor parameter

7 years agoextracted method 1171/head
Martin Spielmann [Fri, 6 Jan 2017 00:09:37 +0000 (01:09 +0100)]
extracted method

7 years agoMerge pull request #1176 from ds5apn/master
James Moger [Thu, 5 Jan 2017 14:52:12 +0000 (09:52 -0500)]
Merge pull request #1176 from ds5apn/master

Update korean translation for gitblit new version.

7 years agoUpdate korean translation for gitblit new version. 1176/head
DONGSU, KIM [Thu, 5 Jan 2017 06:48:45 +0000 (15:48 +0900)]
Update korean translation for gitblit new version.

7 years agoIncrease minor version number to 9
Florian Zschocke [Mon, 2 Jan 2017 14:47:32 +0000 (15:47 +0100)]
Increase minor version number to 9

Bump version to 1.9.0-SNAPSHOT, increasing the minor as the next
release includes interface changes.

7 years agoMerge branch 'ci', enabling CI services.
Florian Zschocke [Mon, 2 Jan 2017 12:06:48 +0000 (13:06 +0100)]
Merge branch 'ci', enabling CI services.

7 years agoAdd build definition file for Circle CI
Florian Zschocke [Thu, 15 Dec 2016 21:10:37 +0000 (22:10 +0100)]
Add build definition file for Circle CI

Configure the build for Circle CI in the new file circle.yml.
Specify a compile step to have the build fail on compilation error.
The test step is then configured as `ant test`, which will compile
again due to the limits of Ant/Moxie.

Contrary to the documentation, the default Java version on Circle CI
is Java 8.
The project is set as a Java 7 project. We define to use OpenJDK 7,
because the Gitblit build has some trouble with Java 8, I consider
Java 7 the default, and Circle CI does not provide an Oracle JDK 7
installation to use. I could only get it to work with OpenJDK 7.

The Java version is reported in the Circle CI build script to ease
analysis.

Test and coverage reports get stored as artifacts for a build, which
allows to browse them in the Circle CI web interface.