James Moger [Fri, 22 Jul 2011 21:49:13 +0000 (17:49 -0400)]
Unit test for GitServlet.
This unit test is not part of the suite since it requires firing up
gitblit, commiting, and stopping gitblit. This is the first step in
evolving unit testing of cloning/pushing.
If an object id was not specified Gitblit used HEAD to perform the
operation. This breaks under some conditions like working with a
repository that does not have any commits on master but does have
commits on a vcs-import branch.
The new approach is to centralize the resolution of unspecified object
ids to a common method which resolves HEAD first but uses the most
recently modified branch if HEAD points to nothing.
This commit also includes a non-functional method for creating an empty
branch. I couldn't figure out how to make JGit create an orphaned
branch.
James Moger [Thu, 21 Jul 2011 18:48:15 +0000 (14:48 -0400)]
Rollback to Jetty 7.4.3 for now.
Jetty 7.4.4 introduces a fix to correct url generation. Unfortunately,
this "fix" creates a bug for resolving the root page. Evidently the bug
may really be in Wicket.
James Moger [Thu, 21 Jul 2011 01:06:17 +0000 (21:06 -0400)]
Fixed rename and delete repository (issue 10)
This was due to use of the FileResolver which caches repository objects.
Calling close() on a cached repository instance would decrement a
counter, but the repository would never really close and release all its
resources because the FileResolver "held" the first count/reference so
the object and refs databases were never closed.
The solution was to use reflection to determine the actual "useCnt" of
the repository and then call close() that number of times. In practice,
the "useCnt" is probably always 2, and that is the default value in case
reflection fails.
James Moger [Wed, 29 Jun 2011 00:12:51 +0000 (20:12 -0400)]
Changes for minor 0.5.1 release.
* Clarified SSL certificate generation and configuration in light of the
hostname verificiation that JGit currently does despite
the http.sslVerify=false setting.
* Added some troubleshooting information related to filesystem
permissions and reading repositories.
* Switched from JavaService to Apache Commons Daemon. Not sure what
happened to JavaService as it stopped working for me on Windows 7 with
Java 1.6.0_26. Commons Daemon accomplishes the same thing and offers a
nice service control utility.
James Moger [Sat, 25 Jun 2011 12:57:29 +0000 (08:57 -0400)]
Big push for first release.
* Build script overhaul including building & publishing GO, WAR, Docs,
and Site.
* Restored JGit 0.12.1 dependency and backported Blame. Got tired of
waiting for JGit 1.0.0 Maven artifacts.
* Changed Summary Page layout
* Optional cookie authentication
* Added icons for log, tags, and branches panels.
* Show last commit author and short message on branches panel.
* Unit testing.
* Documentation.
James Moger [Sat, 18 Jun 2011 12:28:47 +0000 (08:28 -0400)]
Mostly stable war build.
Reorganization of resources. Dropped most hard-coded webapp
configuration in favor of common web.xml file. Still contemplating
configuring git servlet from web.xml too.
James Moger [Tue, 14 Jun 2011 20:55:13 +0000 (16:55 -0400)]
Added AccessRestrictionFilter and simplified authentication.
Replaced servlet container basic authentication with a custom servlet
filter which performs the same function. The advantage to this is
that the servlet container is now divorced from the webapp.
The login service (realm) also simplified a great deal and removes its
Jetty dependencies.
Additionally, the basic authorization pop-up will be displayed as
needed based on the repository's access restriction. This was
necessary for view-restricted repositories with the RSS feature. Its
also necessary for completely open repositories as before it would
prompt for credentials.