]> source.dussan.org Git - gitblit.git/commitdiff
Mostly stable war build.
authorJames Moger <james.moger@gitblit.com>
Sat, 18 Jun 2011 12:28:47 +0000 (08:28 -0400)
committerJames Moger <james.moger@gitblit.com>
Sat, 18 Jun 2011 12:28:47 +0000 (08:28 -0400)
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.

141 files changed:
.gitignore
build.xml
distrib/gitblit.properties
docs/00_index.mkd
docs/00_setup.mkd
docs/01_faq.mkd
resources/add_16x16.png [new file with mode: 0644]
resources/arrow_down.png [new file with mode: 0644]
resources/arrow_off.png [new file with mode: 0644]
resources/arrow_up.png [new file with mode: 0644]
resources/background.png [new file with mode: 0644]
resources/blank.png [new file with mode: 0644]
resources/book_16x16.png [new file with mode: 0644]
resources/bug_16x16.png [new file with mode: 0644]
resources/bullet_error.png [new file with mode: 0644]
resources/cold_16x16.png [new file with mode: 0644]
resources/commit_branch_16x16.png [new file with mode: 0644]
resources/commit_divide_16x16.png [new file with mode: 0644]
resources/commit_join_16x16.png [new file with mode: 0644]
resources/commit_merge_16x16.png [new file with mode: 0644]
resources/commit_up_16x16.png [new file with mode: 0644]
resources/feed_16x16.png [new file with mode: 0644]
resources/file_16x16.png [new file with mode: 0644]
resources/file_acrobat_16x16.png [new file with mode: 0644]
resources/file_c_16x16.png [new file with mode: 0644]
resources/file_code_16x16.png [new file with mode: 0644]
resources/file_cpp_16x16.png [new file with mode: 0644]
resources/file_cs_16x16.png [new file with mode: 0644]
resources/file_doc_16x16.png [new file with mode: 0644]
resources/file_excel_16x16.png [new file with mode: 0644]
resources/file_h_16x16.png [new file with mode: 0644]
resources/file_java_16x16.png [new file with mode: 0644]
resources/file_php_16x16.png [new file with mode: 0644]
resources/file_ppt_16x16.png [new file with mode: 0644]
resources/file_ruby_16x16.png [new file with mode: 0644]
resources/file_settings_16x16.png [new file with mode: 0644]
resources/file_vs_16x16.png [new file with mode: 0644]
resources/file_world_16x16.png [new file with mode: 0644]
resources/file_zip_16x16.png [new file with mode: 0644]
resources/folder_16x16.png [new file with mode: 0644]
resources/gitblit.css [new file with mode: 0644]
resources/gitblt-favicon.png [new file with mode: 0644]
resources/gitblt-logo.png [new file with mode: 0644]
resources/gitblt2.png [new file with mode: 0644]
resources/gitblt_25.png [new file with mode: 0644]
resources/gitweb-favicon.png [new file with mode: 0644]
resources/lock_16x16.png [new file with mode: 0644]
resources/lock_go_16x16.png [new file with mode: 0644]
resources/lock_pull_16x16.png [new file with mode: 0644]
resources/markdown.css [new file with mode: 0644]
resources/pixel.png [new file with mode: 0644]
resources/search-icon.png [new file with mode: 0644]
resources/shield_16x16.png [new file with mode: 0644]
resources/tag_16x16.png [new file with mode: 0644]
resources/user_16x16.png [new file with mode: 0644]
resources/welcome.mkd [new file with mode: 0644]
src/WEB-INF/web.xml [new file with mode: 0644]
src/com/gitblit/AccessRestrictionFilter.java
src/com/gitblit/Build.java
src/com/gitblit/BuildWebXml.java [new file with mode: 0644]
src/com/gitblit/Constants.java
src/com/gitblit/DownloadZipServlet.java
src/com/gitblit/FileLoginService.java
src/com/gitblit/GitBlit.java
src/com/gitblit/GitBlitServer.java
src/com/gitblit/GitFilter.java
src/com/gitblit/ILoginService.java
src/com/gitblit/IStoredSettings.java
src/com/gitblit/SyndicationServlet.java
src/com/gitblit/utils/JGitUtils.java
src/com/gitblit/utils/StringUtils.java
src/com/gitblit/utils/SyndicationUtils.java
src/com/gitblit/wicket/GitBlitWebApp.properties
src/com/gitblit/wicket/WicketUtils.java
src/com/gitblit/wicket/pages/BasePage.html
src/com/gitblit/wicket/pages/BasePage.java
src/com/gitblit/wicket/pages/DocsPage.java
src/com/gitblit/wicket/pages/LoginPage.html
src/com/gitblit/wicket/pages/MarkdownPage.html
src/com/gitblit/wicket/pages/MarkdownPage.java
src/com/gitblit/wicket/pages/RepositoriesPage.html
src/com/gitblit/wicket/pages/RepositoriesPage.java
src/com/gitblit/wicket/pages/RepositoryPage.html
src/com/gitblit/wicket/pages/RepositoryPage.java
src/com/gitblit/wicket/pages/SummaryPage.html
src/com/gitblit/wicket/pages/SummaryPage.java
src/com/gitblit/wicket/panels/RepositoriesPanel.html
src/com/gitblit/wicket/panels/SearchPanel.html
src/com/gitblit/wicket/panels/SearchPanel.java
src/com/gitblit/wicket/panels/UsersPanel.html
src/com/gitblit/wicket/resources/add_16x16.png [deleted file]
src/com/gitblit/wicket/resources/arrow_down.png [deleted file]
src/com/gitblit/wicket/resources/arrow_off.png [deleted file]
src/com/gitblit/wicket/resources/arrow_up.png [deleted file]
src/com/gitblit/wicket/resources/background.png [deleted file]
src/com/gitblit/wicket/resources/blank.png [deleted file]
src/com/gitblit/wicket/resources/book_16x16.png [deleted file]
src/com/gitblit/wicket/resources/bug_16x16.png [deleted file]
src/com/gitblit/wicket/resources/bullet_error.png [deleted file]
src/com/gitblit/wicket/resources/cold_16x16.png [deleted file]
src/com/gitblit/wicket/resources/commit_branch_16x16.png [deleted file]
src/com/gitblit/wicket/resources/commit_divide_16x16.png [deleted file]
src/com/gitblit/wicket/resources/commit_join_16x16.png [deleted file]
src/com/gitblit/wicket/resources/commit_merge_16x16.png [deleted file]
src/com/gitblit/wicket/resources/commit_up_16x16.png [deleted file]
src/com/gitblit/wicket/resources/feed_16x16.png [deleted file]
src/com/gitblit/wicket/resources/file_16x16.png [deleted file]
src/com/gitblit/wicket/resources/file_acrobat_16x16.png [deleted file]
src/com/gitblit/wicket/resources/file_c_16x16.png [deleted file]
src/com/gitblit/wicket/resources/file_code_16x16.png [deleted file]
src/com/gitblit/wicket/resources/file_cpp_16x16.png [deleted file]
src/com/gitblit/wicket/resources/file_cs_16x16.png [deleted file]
src/com/gitblit/wicket/resources/file_doc_16x16.png [deleted file]
src/com/gitblit/wicket/resources/file_excel_16x16.png [deleted file]
src/com/gitblit/wicket/resources/file_h_16x16.png [deleted file]
src/com/gitblit/wicket/resources/file_java_16x16.png [deleted file]
src/com/gitblit/wicket/resources/file_php_16x16.png [deleted file]
src/com/gitblit/wicket/resources/file_ppt_16x16.png [deleted file]
src/com/gitblit/wicket/resources/file_ruby_16x16.png [deleted file]
src/com/gitblit/wicket/resources/file_settings_16x16.png [deleted file]
src/com/gitblit/wicket/resources/file_vs_16x16.png [deleted file]
src/com/gitblit/wicket/resources/file_world_16x16.png [deleted file]
src/com/gitblit/wicket/resources/file_zip_16x16.png [deleted file]
src/com/gitblit/wicket/resources/folder_16x16.png [deleted file]
src/com/gitblit/wicket/resources/gitblit.css [deleted file]
src/com/gitblit/wicket/resources/gitblt-favicon.png [deleted file]
src/com/gitblit/wicket/resources/gitblt-logo.png [deleted file]
src/com/gitblit/wicket/resources/gitblt2.png [deleted file]
src/com/gitblit/wicket/resources/gitblt_25.png [deleted file]
src/com/gitblit/wicket/resources/gitweb-favicon.png [deleted file]
src/com/gitblit/wicket/resources/lock_16x16.png [deleted file]
src/com/gitblit/wicket/resources/lock_go_16x16.png [deleted file]
src/com/gitblit/wicket/resources/lock_pull_16x16.png [deleted file]
src/com/gitblit/wicket/resources/markdown.css [deleted file]
src/com/gitblit/wicket/resources/pixel.png [deleted file]
src/com/gitblit/wicket/resources/search-icon.png [deleted file]
src/com/gitblit/wicket/resources/shield_16x16.png [deleted file]
src/com/gitblit/wicket/resources/tag_16x16.png [deleted file]
src/com/gitblit/wicket/resources/user_16x16.png [deleted file]
src/com/gitblit/wicket/resources/welcome.mkd [deleted file]
src/log4j.properties

index 1819e8ea18012fd8468e0edc1991a330a7ff685f..7cc5c3bc7b16f17b2b5f43e73cc8043cce9fffa1 100644 (file)
@@ -10,3 +10,5 @@
 /git
 /target
 /build.properties
+/war
+/*.war
index ddb0dfbf1669b90284d68723acb5dd8cd3ea21cd..ee01de7da592c614aaa71cce9c2fb0133028e818 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -5,17 +5,16 @@
        <property name="project.jar" value="gitblit.jar" />\r
        <property name="project.mainclass" value="com.gitblit.Launcher" />\r
        <property name="project.build.dir" value="${basedir}/build" />\r
+       <property name="project.resources.dir" value="${basedir}/resources" />\r
 \r
        <loadproperties srcfile="${basedir}/build.properties" />\r
-\r
-       <!-- Build Gitblit -->\r
-       <target name="main" description="Compiles Gitblit from source to website">\r
-\r
+       \r
+       <target name="buildinfo">\r
                <!-- build date -->\r
                <tstamp>\r
                        <format property="gb.buildDate" pattern="yyyy-MM-dd" />\r
                </tstamp>\r
-\r
+       \r
                <!-- extract Gitblit version number from source code -->\r
                <loadfile property="gb.version" srcfile="${basedir}/src/com/gitblit/Constants.java">\r
                        <filterchain>\r
@@ -30,7 +29,7 @@
                                </tokenfilter>\r
                        </filterchain>\r
                </loadfile>\r
-\r
+       \r
                <!-- extract JGit version number from source code -->\r
                <loadfile property="jgit.version" srcfile="${basedir}/src/com/gitblit/Constants.java">\r
                        <filterchain>\r
                        </filterchain>\r
                </loadfile>\r
                <echo>Building Gitblit ${gb.version}</echo>\r
+               \r
+               <property name="distribution.zipfile" value="gitblit-${gb.version}.zip" />\r
+               <property name="distribution.warfile" value="gitblit-${gb.version}.war" />\r
+       </target>\r
+       \r
+       <!-- Build Gitblit GO -->\r
+       <target name="main" description="Compiles Gitblit from source to website" depends="buildinfo">\r
 \r
                <!-- copy required distribution files to project folder -->\r
                <copy todir="${basedir}" overwrite="false">\r
@@ -62,8 +68,9 @@
                <mkdir dir="${project.build.dir}" />\r
                <javac srcdir="${basedir}/src" destdir="${project.build.dir}">\r
                        <include name="com/gitblit/Build.java" />\r
+                       <include name="com/gitblit/BuildWebXml.java" />\r
                        <include name="com/gitblit/Constants.java" />\r
-                       <include name="com/gitblit/utils/StringUtils.java" />\r
+                       <include name="com/gitblit/utils/StringUtils.java" />                   \r
                </javac>\r
                <java classpath="${project.build.dir}" classname="com.gitblit.Build" />\r
 \r
@@ -87,6 +94,9 @@
                        <fileset dir="${project.build.dir}">\r
                                <include name="**/*" />\r
                        </fileset>\r
+                       <fileset dir="${project.resources.dir}">\r
+                               <exclude name="thumbs.db" />\r
+                       </fileset>\r
                        <manifest>\r
                                <attribute name="Main-Class" value="${project.mainclass}" />\r
                        </manifest>\r
                <mkdir dir="${basedir}/site" />\r
                <copy todir="${basedir}/site">\r
                        <!-- Copy selected Gitblit resources -->\r
-                       <fileset dir="${basedir}/src/com/gitblit/wicket/resources">\r
+                       <fileset dir="${project.resources.dir}">\r
                                <include name="background.png" />\r
                                <include name="gitblit.css" />\r
                                <include name="markdown.css" />\r
                <mkdir dir="${basedir}/deploy/docs" />\r
                <copy todir="${basedir}/deploy/docs">\r
                        <!-- Copy selected Gitblit resources -->\r
-                       <fileset dir="${basedir}/src/com/gitblit/wicket/resources">\r
+                       <fileset dir="${project.resources.dir}">\r
                                <include name="background.png" />\r
                                <include name="gitblit.css" />\r
                                <include name="markdown.css" />\r
 \r
                </java>\r
                \r
-               <!-- Create Zip deployment -->\r
-               <property name="distribution.zipfile" value="gitblit-${gb.version}.zip" />\r
+               <!-- Create Zip deployment -->          \r
                <zip destfile="${distribution.zipfile}">\r
                        <fileset dir="${basedir}/deploy">\r
                                <include name="**/*" />\r
        </target>\r
                \r
        \r
+       <!-- Build Gitblit WAR -->\r
+       <target name="buildWAR" description="Build the Gitblit WAR" depends="buildinfo">\r
+               <path id="master-classpath">\r
+                       <fileset dir="${basedir}/ext">\r
+                               <include name="*.jar" />\r
+                       </fileset>\r
+               </path>\r
+                       \r
+               <delete dir="${basedir}/war" />\r
+               <mkdir dir="${basedir}/war/WEB-INF/lib"/>\r
+               \r
+               <!-- Gitblit web.xml --> \r
+               <java classpath="${project.build.dir}" classname="com.gitblit.BuildWebXml">\r
+                       <classpath refid="master-classpath" />\r
+               </java>\r
+\r
+               <!-- Gitblit resources -->\r
+               <copy todir="${basedir}/war">\r
+                       <fileset dir="${project.resources.dir}">\r
+                               <exclude name="thumbs.db" />\r
+                       </fileset>\r
+               </copy>\r
+               \r
+               <!-- Gitblit library dependencies -->\r
+               <copy todir="${basedir}/war/WEB-INF/lib">\r
+                       <fileset dir="${basedir}/ext">\r
+                               <exclude name="*-sources.jar" />\r
+                               <exclude name="*-javadoc.jar" />\r
+                               <exclude name="jcommander*.jar" />\r
+                               <exclude name="jetty*.jar" />\r
+                               <exclude name="junit*.jar" />\r
+                               <exclude name="servlet*.jar" />\r
+                       </fileset>\r
+               </copy>\r
+\r
+               <!-- Gitblit classes -->\r
+               <mkdir dir="${basedir}/war/WEB-INF/classes"/>\r
+               <copy todir="${basedir}/war/WEB-INF/classes">\r
+                       <fileset dir="${basedir}/bin">\r
+                               <exclude name="WEB-INF/web.xml" />\r
+                               <exclude name="com/gitblit/tests/" />\r
+                               <exclude name="com/gitblit/Build*.class" />\r
+                               <exclude name="com/gitblit/GitBlitServer*.class" />\r
+                               <exclude name="com/gitblit/Launcher*.class" />\r
+                               <exclude name="com/gitblit/MakeCertificate*.class" />\r
+                               <exclude name="com/gitblit/Thumbnailer*.class" />\r
+                       </fileset>\r
+               </copy>\r
+\r
+               <!-- Build the WAR file -->\r
+               <jar basedir="${basedir}/war" destfile="${distribution.warfile}" compress="true" />\r
+       </target>\r
+\r
+       \r
+       <!-- Publish binaries to github -->\r
+       <target name="publishBinaries" description="Publish the Gitblit distribution to Github">\r
+               <!-- TODO -->\r
+               <!-- https://github.com/oyvindkinsey/GitHubUploadTask -->\r
+       </target>\r
+\r
+       \r
        <!-- Publish site to hosting service -->\r
        <!-- You must add ext/commons-net-1.4.0.jar to your     ANT classpath. -->\r
        <target name="publishSite" description="Publish the Gitblit site to a webserver (requires ext/commons-net-1.4.0.jar)">\r
                <fileset dir="${basedir}/site" />\r
                </ftp>\r
        </target>\r
-               \r
        \r
-       <!-- Publish distribution to github -->\r
-       <target name="publishDistribution" description="Publish the Gitblit distribution to Github">\r
-               <!-- TODO -->\r
-               <!-- https://github.com/oyvindkinsey/GitHubUploadTask -->\r
-       </target>\r
-</project>\r
+</project>
\ No newline at end of file
index 2d55a5840cdc7eb0a0b4b32779d5c06b62f86025..6adf11e5a6d151792464290eb43be9df757a114e 100644 (file)
@@ -2,8 +2,7 @@
 # Git Servlet Settings\r
 #\r
 \r
-# Allow push/pull over http/https with JGit servlet\r
-# Changing this value requires a server restart.\r
+# Allow push/pull over http/https with JGit servlet.\r
 git.enableGitServlet = true\r
 \r
 # Base folder for repositories\r
@@ -12,11 +11,6 @@ git.enableGitServlet = true
 # e.g. c:/gitrepos\r
 git.repositoriesFolder = git\r
 \r
-# Export all repositories\r
-# Changing this value requires a server restart.\r
-# if false, each exported repository must have a .git/git-daemon-export-ok file\r
-git.exportAll = true\r
-\r
 # Search the repositories folder subfolders for other repositories.\r
 # Repositories MAY NOT be nested (i.e. one repository within another)\r
 # but they may be grouped together in subfolders.\r
@@ -36,7 +30,9 @@ web.authenticateViewPages = false
 # Changing this value requires a server restart.\r
 web.authenticateAdminPages = true\r
 \r
-# Simple user realm file to authenticate users\r
+# Either a simple user realm file to authenticate users\r
+# OR a fully qualified class name that implements the ILoginService interface.\r
+# Any custom implementation must have a public default constructor.\r
 # Changing this value requires a server restart.\r
 realm.realmFile = users.properties\r
 \r
@@ -154,11 +150,11 @@ regex.global = true
 # Example global regex substitutions\r
 # Use !!! to separate the search pattern and the replace pattern\r
 # searchpattern!!!replacepattern\r
-#regex.global.bug = \\b(Bug:)(\\s*[#]?|-){0,1}(\\d+)\\b!!!<a href="http://somehost/bug/$3">Bug-Id: $3</a>\r
-#regex.global.changeid = \\b(Change-Id:\\s*)([A-Za-z0-9]*)\\b!!!<a href="http://somehost/changeid/$2">Change-Id: $2</a>\r
+regex.global.bug = \\b(Bug:)(\\s*[#]?|-){0,1}(\\d+)\\b!!!<a href="http://somehost/bug/$3">Bug-Id: $3</a>\r
+regex.global.changeid = \\b(Change-Id:\\s*)([A-Za-z0-9]*)\\b!!!<a href="http://somehost/changeid/$2">Change-Id: $2</a>\r
 \r
 # Example per-repository regex substitutions overrides global\r
-#regex.myrepository.bug = \\b(Bug:)(\\s*[#]?|-){0,1}(\\d+)\\b!!!<a href="http://elsewhere/bug/$3">Bug-Id: $3</a>\r
+regex.myrepository.bug = \\b(Bug:)(\\s*[#]?|-){0,1}(\\d+)\\b!!!<a href="http://elsewhere/bug/$3">Bug-Id: $3</a>\r
 \r
 #\r
 # Server Settings\r
@@ -168,19 +164,6 @@ regex.global = true
 # The temporary folder to decompress the gitblit webapp. \r
 server.tempFolder = temp\r
 \r
-# The common log4j logging pattern\r
-# http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html\r
-server.log4jPattern = %-5p %d{MM-dd HH:mm:ss.SSS}  %-20.20c{1}  %m%n\r
-\r
-# Alternatively, you may specify a logging pattern for your OS.\r
-# If the os pattern is blank, the common pattern is used.\r
-\r
-# This windows pattern fits (mostly) within the fixed bounds of a command prompt.\r
-server.log4jPattern.windows = %-5p %m%n\r
-\r
-server.log4jPattern.linux =\r
-\r
-\r
 #\r
 # Jetty Settings\r
 #\r
index bcf41e112855e6d88d97657c829fb47f273193c0..7a2bc569c7fd33f96c96aff8a3ca498302a7a8b1 100644 (file)
@@ -4,7 +4,7 @@ Its designed primarily as a tool for small workgroups who want to host [Git][git
  \r
 ### Current Release\r
 \r
-[%VERSION%](http://gitblit.com/%DISTRIBUTION%) based on [%JGIT%][jgit] &nbsp; (*%BUILDDATE%*)\r
+%VERSION% ([go](http://gitblit.com/%GO%)|[war](http://gitblit.com/%WAR%)) based on [%JGIT%][jgit] &nbsp; (*%BUILDDATE%*)\r
 \r
 sources @ [Github][gitbltsrc]\r
 \r
@@ -13,8 +13,7 @@ sources @ [Github][gitbltsrc]
 2. Offer useful features for serving Git repositories.  If feature is complex, refer to #1.\r
 3. All dependencies must be retrievable from a publicly accessible [Maven](http://maven.apache.org) repository.<br/>This is to ensure authenticity of dependencies and to keep the Gitblit distribution svelte.  \r
 \r
-### Features\r
-- Out-of-the-box integrated stack requiring minimal configuration\r
+### Gitblit Features\r
 - JGit SmartHTTP servlet\r
 - Browser and git client authentication\r
 - Four repository access control configurations and a Read-Only flag\r
@@ -29,7 +28,6 @@ sources @ [Github][gitbltsrc]
 - Administrators may create, edit, rename, or delete repositories through the web UI\r
 - Administrators may create, edit, rename, or delete users through the web UI\r
 - Repository Owners may edit repositories through the web UI\r
-- Automatically generates a self-signed certificate for https communications\r
 - Git-notes support\r
 - Branch metrics (uses Google Charts)\r
 - HEAD and branch RSS feeds\r
@@ -41,7 +39,6 @@ sources @ [Github][gitbltsrc]
 - Markdown file view support\r
 - Syntax highlighting for popular source code types\r
 - Customizable regular expression substitution for commit messages (i.e. bug or code review link integration)\r
-- Single text file for server configuration\r
 - Single text file for users configuration\r
 - Optional utility pages\r
     <ul class='noBullets'>\r
@@ -49,12 +46,15 @@ sources @ [Github][gitbltsrc]
     <li>![tickets](bug_16x16.png) Ticgit ticket pages *(based on last MIT release bf57b032 2009-01-27)*</li>\r
     </ul>\r
 \r
+### Gitblit-Go Features\r
+- Out-of-the-box integrated stack requiring minimal configuration\r
+- Automatically generates a self-signed certificate for https communications\r
+- Single text file for server configuration\r
+\r
 ### Limitations\r
-- [%JGIT%][jgit] does not currently [garbage collect or repack](http://www.kernel.org/pub/software/scm/git/docs/git-gc.html)\r
 - HTTP/HTTPS are the only supported protocols\r
 - Access controls are not path-based, they are repository-based\r
 - Only Administrators can create, rename or delete repositories\r
-- Gitblit is an integrated, full-stack solution.  There is no WAR build at this time.\r
 \r
 ### Caveats\r
 - Gitblit may eat your data.  Use at your own risk.\r
@@ -64,7 +64,6 @@ sources @ [Github][gitbltsrc]
 - Code documentation\r
 - Unit testing\r
 - Update Build.java to JGit 1.0.0, when its released\r
-- WAR solution\r
 \r
 ### Idea List\r
 - Consider clone remote repository feature\r
@@ -90,7 +89,7 @@ Gitblit is distributed under the terms of the [Apache Software Foundation licens
 ![block diagram](architecture.png "Gitblit Architecture")\r
 \r
 ### Bundled Dependencies\r
-The following dependencies are bundled with the Gitblit zip distribution file.\r
+The following dependencies are bundled with Gitblit.\r
 \r
 - [google-code-prettify](http://code.google.com/p/google-code-prettify) (Apache 2.0)\r
 - [JavaService](http://forge.ow2.org/projects/javaservice) (BSD and LGPL)\r
@@ -99,7 +98,7 @@ The following dependencies are bundled with the Gitblit zip distribution file.
 - other icons courtesy of [FatCow Hosting](http://www.fatcow.com/free-icons) (Creative Commons CC-BY)\r
 \r
 ### Downloaded Dependencies\r
-The following dependencies are automatically downloaded from the Apache Maven repository and from the Eclipse Maven repository when Gitblit is launched for the first time.\r
+The following dependencies are automatically downloaded by Gitblit-Go (or already bundled with the WAR) from the Apache Maven repository and from the Eclipse Maven repository when Gitblit is launched for the first time.\r
 \r
 - [JGit][jgit] (EDL 1.0)\r
 - [Wicket](http://wicket.apache.org) (Apache 2.0)\r
index ccf38b830e8f66c0f8afc8b251d0c76817ee9ef6..02816e7fc2e5aeb44c54f86f2ede7f3f87260466 100644 (file)
@@ -1,6 +1,6 @@
-## Server Setup and Configuration\r
+## Gitblit-Go Setup and Configuration\r
 \r
-1. Download and unzip [Gitblit %VERSION%](http://gitblit.com/%DISTRIBUTION%).<br/>\r
+1. Download and unzip [Gitblit-Go %VERSION%](http://gitblit.com/%GO%).<br/>\r
 *Its best to eliminate spaces in the path name as that can cause troubleshooting headaches.* \r
 2. The server itself is configured through a simple text file.<br/>\r
 Open `gitblit.properties` in your favorite text editor and make sure to review and set:\r
index 3605387ab3007370b3eb44539f257d78dde757c1..552c89d2a2daebbeea3882eb47c3de8dce366ef9 100644 (file)
@@ -12,10 +12,10 @@ There are a few ways this can occur:
 3. The repository is clone-restricted and your password changed.\r
 4. A regression in Gitblit.  :(\r
 \r
-### Why can't I access Gitblit from another machine?\r
+### Why can't I access Gitblit-Go from another machine?\r
 Please check *server.httpBindInterface* and *server.httpsBindInterface* in `gitblit.properties`.\r
 \r
-### How do I run Gitblit on port 80 or 443 in Linux?\r
+### How do I run Gitblit-Go on port 80 or 443 in Linux?\r
 Linux requires root permissions to serve on ports < 1024.<br/>\r
 Run the server as *root* (security concern) or change the ports you are serving to 8080 (http) and/or 8443 (https). \r
 \r
@@ -47,22 +47,12 @@ Gitblit eliminates all that complication with its 100% Java stack and simple sin
 No.  Gitblit is based on [JGit][jgit] which is a pure Java implementation of the [Git version control system][git].<br/>\r
 Everything you need for Gitblit is either in the zip distribution file or automatically downloaded on execution.\r
 \r
-### What about periodic Git garbage collection (git-gc)?\r
-Good question.  I'm not sure.\r
-\r
-Git repositories grow and grow and periodically need to be repacked every once in a while.  Git calls this process [garbage collection](http://www.kernel.org/pub/software/scm/git/docs/git-gc.html) (which is not to be confused with [garbage collection](http://en.wikipedia.org/wiki/Garbage_collection_(computer_science)).)\r
-\r
-[JGit's][jgit] documentation is sparse and its unclear whether or not JGit performs this function.\r
-\r
 ### Can I run Gitblit in conjunction with my existing Git tooling?\r
-Yes.  You can configure Gitblit to only be a repository viewer.\r
+Yes.\r
 \r
 ### Do I need a JDK or can I use a JRE?\r
 Gitblit will run just fine with a JRE.  Gitblit can optionally use `keytool` from the JDK to generate self-signed certificates, but normally Gitblit uses [BouncyCastle][bouncycastle] for that need.\r
 \r
-### I want to deploy Gitblit into my own servlet container.  Where is the WAR?\r
-At this time there is no WAR build available.\r
-\r
 ### Does Gitblit use a database to store its data?\r
 No.  Gitblit stores its repository configuration information within the `.git/config` file and its user information in `users.properties` or whatever filename is configured in `gitblit.properties`.\r
 \r
@@ -76,6 +66,9 @@ No.  Access restrictions apply to the repository as a whole.
 \r
 Gitblit's simple authentication and authorization mechanism can be used to facilitate one or more of the [workflows outlined here](http://progit.org/book/ch5-1.html).  Should you require more fine-grained access controls you might consider using [gitolite](https://github.com/sitaramc/gitolite).\r
 \r
+### Can I authenticate users against XYZ?\r
+Yes.  The login service is pluggable.  You may write your own authentication module by implementing the *ILoginService* interface.  Set the fully qualified classname as the *realm.realmFile* property.\r
+\r
 ### Why doesn't Gitblit support SSH?\r
 Gitblit could integrate [Apache Mina][mina] to provide SSH access.  However, doing so violates Gitblit's first design principle: [KISS](http://en.wikipedia.org/wiki/KISS_principle).<br/>\r
 SSH support requires creating, exchanging, and managing SSH keys (arguably not more complicated than managing users).  While this is possible, JGit's SmartHTTP implementation is a simpler and universal transport mechanism.\r
diff --git a/resources/add_16x16.png b/resources/add_16x16.png
new file mode 100644 (file)
index 0000000..0ea124a
Binary files /dev/null and b/resources/add_16x16.png differ
diff --git a/resources/arrow_down.png b/resources/arrow_down.png
new file mode 100644 (file)
index 0000000..f31cc81
Binary files /dev/null and b/resources/arrow_down.png differ
diff --git a/resources/arrow_off.png b/resources/arrow_off.png
new file mode 100644 (file)
index 0000000..f9b1ced
Binary files /dev/null and b/resources/arrow_off.png differ
diff --git a/resources/arrow_up.png b/resources/arrow_up.png
new file mode 100644 (file)
index 0000000..63031c3
Binary files /dev/null and b/resources/arrow_up.png differ
diff --git a/resources/background.png b/resources/background.png
new file mode 100644 (file)
index 0000000..6f75e43
Binary files /dev/null and b/resources/background.png differ
diff --git a/resources/blank.png b/resources/blank.png
new file mode 100644 (file)
index 0000000..109296b
Binary files /dev/null and b/resources/blank.png differ
diff --git a/resources/book_16x16.png b/resources/book_16x16.png
new file mode 100644 (file)
index 0000000..e48ff95
Binary files /dev/null and b/resources/book_16x16.png differ
diff --git a/resources/bug_16x16.png b/resources/bug_16x16.png
new file mode 100644 (file)
index 0000000..c7299fd
Binary files /dev/null and b/resources/bug_16x16.png differ
diff --git a/resources/bullet_error.png b/resources/bullet_error.png
new file mode 100644 (file)
index 0000000..b2e6b75
Binary files /dev/null and b/resources/bullet_error.png differ
diff --git a/resources/cold_16x16.png b/resources/cold_16x16.png
new file mode 100644 (file)
index 0000000..79cb756
Binary files /dev/null and b/resources/cold_16x16.png differ
diff --git a/resources/commit_branch_16x16.png b/resources/commit_branch_16x16.png
new file mode 100644 (file)
index 0000000..d1fe717
Binary files /dev/null and b/resources/commit_branch_16x16.png differ
diff --git a/resources/commit_divide_16x16.png b/resources/commit_divide_16x16.png
new file mode 100644 (file)
index 0000000..e611bd5
Binary files /dev/null and b/resources/commit_divide_16x16.png differ
diff --git a/resources/commit_join_16x16.png b/resources/commit_join_16x16.png
new file mode 100644 (file)
index 0000000..51e7de9
Binary files /dev/null and b/resources/commit_join_16x16.png differ
diff --git a/resources/commit_merge_16x16.png b/resources/commit_merge_16x16.png
new file mode 100644 (file)
index 0000000..5a066e5
Binary files /dev/null and b/resources/commit_merge_16x16.png differ
diff --git a/resources/commit_up_16x16.png b/resources/commit_up_16x16.png
new file mode 100644 (file)
index 0000000..30d005f
Binary files /dev/null and b/resources/commit_up_16x16.png differ
diff --git a/resources/feed_16x16.png b/resources/feed_16x16.png
new file mode 100644 (file)
index 0000000..99987a3
Binary files /dev/null and b/resources/feed_16x16.png differ
diff --git a/resources/file_16x16.png b/resources/file_16x16.png
new file mode 100644 (file)
index 0000000..eda4488
Binary files /dev/null and b/resources/file_16x16.png differ
diff --git a/resources/file_acrobat_16x16.png b/resources/file_acrobat_16x16.png
new file mode 100644 (file)
index 0000000..f162783
Binary files /dev/null and b/resources/file_acrobat_16x16.png differ
diff --git a/resources/file_c_16x16.png b/resources/file_c_16x16.png
new file mode 100644 (file)
index 0000000..44045a9
Binary files /dev/null and b/resources/file_c_16x16.png differ
diff --git a/resources/file_code_16x16.png b/resources/file_code_16x16.png
new file mode 100644 (file)
index 0000000..931b0d6
Binary files /dev/null and b/resources/file_code_16x16.png differ
diff --git a/resources/file_cpp_16x16.png b/resources/file_cpp_16x16.png
new file mode 100644 (file)
index 0000000..d3f55ee
Binary files /dev/null and b/resources/file_cpp_16x16.png differ
diff --git a/resources/file_cs_16x16.png b/resources/file_cs_16x16.png
new file mode 100644 (file)
index 0000000..8013020
Binary files /dev/null and b/resources/file_cs_16x16.png differ
diff --git a/resources/file_doc_16x16.png b/resources/file_doc_16x16.png
new file mode 100644 (file)
index 0000000..225c3b0
Binary files /dev/null and b/resources/file_doc_16x16.png differ
diff --git a/resources/file_excel_16x16.png b/resources/file_excel_16x16.png
new file mode 100644 (file)
index 0000000..04e0332
Binary files /dev/null and b/resources/file_excel_16x16.png differ
diff --git a/resources/file_h_16x16.png b/resources/file_h_16x16.png
new file mode 100644 (file)
index 0000000..3f7f539
Binary files /dev/null and b/resources/file_h_16x16.png differ
diff --git a/resources/file_java_16x16.png b/resources/file_java_16x16.png
new file mode 100644 (file)
index 0000000..16620e5
Binary files /dev/null and b/resources/file_java_16x16.png differ
diff --git a/resources/file_php_16x16.png b/resources/file_php_16x16.png
new file mode 100644 (file)
index 0000000..4ac5618
Binary files /dev/null and b/resources/file_php_16x16.png differ
diff --git a/resources/file_ppt_16x16.png b/resources/file_ppt_16x16.png
new file mode 100644 (file)
index 0000000..44bbf26
Binary files /dev/null and b/resources/file_ppt_16x16.png differ
diff --git a/resources/file_ruby_16x16.png b/resources/file_ruby_16x16.png
new file mode 100644 (file)
index 0000000..f29349d
Binary files /dev/null and b/resources/file_ruby_16x16.png differ
diff --git a/resources/file_settings_16x16.png b/resources/file_settings_16x16.png
new file mode 100644 (file)
index 0000000..92953fe
Binary files /dev/null and b/resources/file_settings_16x16.png differ
diff --git a/resources/file_vs_16x16.png b/resources/file_vs_16x16.png
new file mode 100644 (file)
index 0000000..645fa7a
Binary files /dev/null and b/resources/file_vs_16x16.png differ
diff --git a/resources/file_world_16x16.png b/resources/file_world_16x16.png
new file mode 100644 (file)
index 0000000..0a4fa8b
Binary files /dev/null and b/resources/file_world_16x16.png differ
diff --git a/resources/file_zip_16x16.png b/resources/file_zip_16x16.png
new file mode 100644 (file)
index 0000000..1584592
Binary files /dev/null and b/resources/file_zip_16x16.png differ
diff --git a/resources/folder_16x16.png b/resources/folder_16x16.png
new file mode 100644 (file)
index 0000000..f1ed9ab
Binary files /dev/null and b/resources/folder_16x16.png differ
diff --git a/resources/gitblit.css b/resources/gitblit.css
new file mode 100644 (file)
index 0000000..2947418
--- /dev/null
@@ -0,0 +1,819 @@
+/*\r
+ Git:Blit css.\r
+*/\r
+html, body, table, dl, dt, dd, ol, ul, li, form, a, span, tr, th, td, div, em {\r
+       font-family: verdana, sans-serif;\r
+       font-size: 12px;\r
+       line-height: 1.35em;\r
+       margin: 0;\r
+       padding: 0;\r
+       border: 0;\r
+       outline: 0;\r
+}\r
+\r
+body {\r
+       width: 980px;\r
+       margin: 5px;\r
+       background-color: #ffffff;\r
+       color: #000000;\r
+    margin-right: auto;\r
+    margin-left: auto;    \r
+    padding: 0px;\r
+    background: url(background.png) repeat-x scroll 0 0 #FFFFFF;\r
+}\r
+\r
+pre, code, pre.prettyprint, pre.plainprint {\r
+       color: black;\r
+       font-family: monospace;\r
+       font-size:12px;\r
+       border:0px;\r
+}\r
+\r
+pre.prettyprint ol {\r
+       padding-left:25px;\r
+}\r
+\r
+/* age0: age < 60*60*2 */\r
+.age0 {\r
+       color: #008000;\r
+       font-style: italic;\r
+       font-weight: bold;\r
+}\r
+\r
+/* age1: 60*60*2 <= age < 60*60*24*2 */\r
+.age1 {\r
+       color: #008000;\r
+       font-style: italic;\r
+}\r
+\r
+/* age2: 60*60*24*2 <= age */\r
+.age2 {\r
+       font-style: italic;\r
+}\r
+\r
+img.inlineIcon {\r
+       padding-left: 1px;\r
+       padding-right: 1px;\r
+}\r
+\r
+a {\r
+       color: #0000cc;\r
+}\r
+\r
+a:hover, a:visited, a:active {\r
+       color: #880000;\r
+}\r
+\r
+img.logo {\r
+       float: right;\r
+       border-width: 0px;\r
+}\r
+\r
+img.activityGraph {\r
+       float: right;\r
+       border-width: 0px;\r
+       padding: 8px;\r
+}\r
+\r
+div.repositories_message {\r
+       line-height: inherit;\r
+}\r
+\r
+div.header, div.commitHeader {\r
+       background-color: #D2C3AF;\r
+       padding: 3px;\r
+       border: 1px solid #808080;\r
+}\r
+\r
+div.header {\r
+       border-radius: 3px 3px 0 0;\r
+}\r
+\r
+div.commitHeader {\r
+       border-radius: 3px;\r
+}\r
+\r
+div.header a, div.commitHeader a {\r
+       color: black;\r
+       text-decoration: none;\r
+       font-weight: bold;\r
+}\r
+\r
+div.header a:hover, div.commitHeader a:hover {\r
+       text-decoration: underline;\r
+}\r
+\r
+div.pager {\r
+       padding: 0px 0px 15px 5px;\r
+}\r
+\r
+span.empty {\r
+       font-size: 0.9em;\r
+       font-style: italic;\r
+       padding-left:10px;\r
+       color: #008000;\r
+}\r
+\r
+span.link {\r
+       color: #888;\r
+}\r
+\r
+span.link, span.link a {\r
+       font-family: sans-serif;\r
+       font-size: 11px;        \r
+}\r
+\r
+span.link em, div.link span em {\r
+       font-style: normal;\r
+       font-family: sans-serif;\r
+       font-size: 11px;        \r
+}\r
+\r
+div.page_header {\r
+       height: 25px;\r
+       padding: 5px;\r
+       font-family: sans-serif;\r
+       font-weight: bold;\r
+       font-size: 150%;\r
+       color: #888;\r
+       background: transparent;\r
+}\r
+\r
+div.page_header span { \r
+       font-family: inherit;\r
+       font-size: inherit;     \r
+}\r
+\r
+div.page_header a  {\r
+       font-size: inherit;     \r
+       font-family: inherit;\r
+       text-decoration: none;\r
+}\r
+\r
+div.page_header a:visited {\r
+       color: #000000;\r
+}\r
+\r
+div.page_header a:hover {\r
+       color: #E66C2C;\r
+       text-decoration: underline;\r
+}\r
+\r
+div.page_footer {\r
+       clear: both;\r
+       height: 17px;\r
+       color: black;\r
+       background-color: #ffffff;\r
+       padding: 5px;\r
+       border-top: 1px solid #bbb;\r
+       font-style: italic;\r
+}\r
+\r
+div.page_nav {\r
+       color: #ddd;\r
+       background-color: #000070;\r
+       padding: 7px;\r
+       border-radius: 3px;\r
+}\r
+\r
+div.page_nav a {\r
+       color: yellow;\r
+       text-decoration: none;\r
+}\r
+\r
+div.page_nav a:hover { \r
+       text-decoration: underline;\r
+}\r
+\r
+div.page_nav em {\r
+       font-style: normal;\r
+}\r
+\r
+div.page_nav2 {\r
+       padding: 2px 5px 7px 5px;       \r
+}\r
+\r
+div.admin_nav {\r
+       border: 1px solid #888;\r
+       border-bottom: 0px;\r
+       background:#dae0d2;\r
+       text-align: right;\r
+       padding: 5px 5px 5px 2px;       \r
+}\r
+\r
+div.admin_nav a {\r
+       text-decoration: none;\r
+}\r
+\r
+div.admin_nav a:hover {        \r
+       text-decoration: underline;\r
+}\r
+\r
+div.search {\r
+       color:yellow;\r
+       text-align:right;\r
+       float:right;\r
+       padding:4px 4px 3px 3px;\r
+       border-left: 1px solid #8080f0;\r
+       margin: 0px;\r
+       height: 23px;\r
+}\r
+\r
+div.search input {\r
+       vertical-align: top;\r
+       background: url(search-icon.png) no-repeat 4px center;\r
+       color: #ddd;\r
+       background-color: #000070;\r
+       border: 1px solid transparent;\r
+       padding: 2px 2px 2px 22px;\r
+       margin: 0px;\r
+}\r
+\r
+div.search input:hover, div.search input:focus {\r
+       color: white;\r
+       border-bottom: 1px solid orange;        \r
+       outline: none;\r
+}\r
+\r
+div.page_path {\r
+       padding: 8px;\r
+       font-weight: bold;\r
+       border: solid #bbb;\r
+       border-width: 0px 0px 1px;\r
+}\r
+\r
+div.commit_message {\r
+       font-family: monospace;\r
+       padding: 8px;\r
+       border: solid #bbb;\r
+       border-width: 1px 0px 0px;\r
+}\r
+\r
+div.commit_message a {\r
+       font-family: monospace;\r
+}\r
+\r
+div.bug_open, span.bug_open {\r
+       padding: 2px;\r
+       background-color: #803333;\r
+       color: white;   \r
+       text-align: center;\r
+}\r
+\r
+div.bug_resolved, span.bug_resolved {\r
+       padding: 2px;\r
+       background-color: #408040;\r
+       color: white;\r
+       text-align: center;\r
+}\r
+\r
+div.bug_invalid, span.bug_invalid {\r
+       padding: 2px;\r
+       background-color: gray;\r
+       text-align: center;\r
+}\r
+\r
+div.bug_hold, span.bug_hold {\r
+       padding: 2px;\r
+       background-color: orange;\r
+       text-align: center;\r
+}\r
+\r
+div.diff {\r
+       font-family: monospace;\r
+       overflow: auto;\r
+}\r
+\r
+div.diff.header {\r
+       -moz-border-bottom-colors: none;\r
+    -moz-border-image: none;\r
+    -moz-border-left-colors: none;\r
+    -moz-border-right-colors: none;\r
+    -moz-border-top-colors: none;\r
+    background-color: #EDECE6;\r
+    border-color: #D9D8D1;\r
+    border-style: solid;\r
+    border-width: 1px;\r
+    font-weight: bold;\r
+    margin-top: 10px;\r
+    padding: 4px 0 2px;\r
+}\r
+\r
+div.diff.extended_header {\r
+       background-color: #F6F5EE;\r
+    padding: 2px 0;\r
+    font-family: inherit;\r
+}\r
+\r
+span.diff.add {\r
+       color: #008800;\r
+       font-family: inherit;\r
+}\r
+\r
+span.diff.remove {\r
+       color: #FFDDDD;\r
+       font-family: inherit;\r
+}\r
+\r
+span.diff.unchanged {\r
+       color: inherit;\r
+       font-family: inherit;\r
+}\r
+\r
+div.diff.hunk_header {\r
+       -moz-border-bottom-colors: none;\r
+    -moz-border-image: none;\r
+    -moz-border-left-colors: none;\r
+    -moz-border-right-colors: none;\r
+    -moz-border-top-colors: none;\r
+    border-color: #FFE0FF;\r
+    border-style: dotted;\r
+    border-width: 1px 0 0;\r
+    margin-top: 2px;\r
+    font-family: inherit;\r
+}\r
+\r
+span.diff.hunk_info {\r
+       background-color: #FFEEFF;      \r
+       color: #990099;\r
+       font-family: inherit;\r
+}\r
+\r
+span.diff.hunk_section {       \r
+       color: #AA22AA;\r
+       font-family: inherit;\r
+}\r
+\r
+div.diff.add2 {\r
+       background-color: #DDFFDD;\r
+    font-family: inherit;\r
+}\r
+\r
+div.diff.remove2 {\r
+       background-color: #FFDDDD;\r
+    font-family: inherit;\r
+}\r
+\r
+div.diff table {\r
+       border-right: 1px solid #bbb;\r
+       border-bottom: 1px solid #bbb;\r
+       width: 100%;\r
+}\r
+\r
+div.diff table th, div.diff table td {\r
+       margin: 0px;\r
+       padding: 0px;\r
+       font-family: monospace; \r
+}\r
+\r
+div.diff table th {\r
+       background-color: #faf8dc;\r
+       border-left: 1px solid #bbb;    \r
+       text-align: center;\r
+       color: #999;\r
+       padding-left: 5px;\r
+       padding-right: 5px;\r
+       width: 30px;\r
+}\r
+\r
+div.diff table th.header {\r
+       background-color: #D2C3AF;\r
+       border-right: 0px;\r
+       border-bottom: 1px solid #808080;\r
+       font-family: inherit;\r
+       font-size:0.9em;\r
+       color: black;\r
+       padding: 2px;\r
+       text-align: left;\r
+}\r
+\r
+div.diff table td.hunk_header {\r
+       background-color: #dAe2e5 !important;   \r
+       border-bottom: 1px solid #bac2c5;\r
+       color: #555;\r
+}\r
+\r
+div.diff table td {\r
+       border-left: 1px solid #bbb;\r
+       background-color: #fbfbfb;\r
+}\r
+\r
+td.changeType {\r
+       width: 15px;\r
+}\r
+\r
+span.addition, span.modification, span.deletion, span.rename {\r
+       border: 1px solid #888;\r
+       float: left;\r
+       height: 0.8em;\r
+       margin: 0.2em 0.5em 0 0;\r
+       overflow: hidden;\r
+       width: 0.8em;\r
+}\r
+\r
+span.addition {\r
+       background-color: #ccffcc;\r
+}\r
+\r
+span.modification {\r
+       background-color: #ffdd88;\r
+}\r
+\r
+span.deletion {\r
+       background-color: #f8bbbb;\r
+}\r
+\r
+span.rename {\r
+       background-color: #cAc2f5;\r
+}\r
+\r
+div.commitLegend {\r
+       float: right;\r
+       padding: 0.4em 0.4em 0.2em 0.4em;\r
+       vertical-align:top;\r
+       margin: 0px;\r
+}\r
+\r
+div.commitLegend span {\r
+       font-size: 0.9em;\r
+       vertical-align: top;\r
+}\r
+\r
+div.references {\r
+       float: right;\r
+       text-align: right;\r
+}\r
+\r
+a.list {\r
+       text-decoration: none;\r
+       color: #000000;\r
+}\r
+\r
+a.list.subject {\r
+       font-weight: bold;\r
+}\r
+\r
+a.list.name {\r
+       font-weight: bold;      \r
+}\r
+\r
+a.list:hover {\r
+       text-decoration: underline;\r
+       color: #880000;\r
+}\r
+\r
+table {\r
+       border-spacing: 0px;\r
+}\r
+\r
+th {\r
+       padding: 2px 5px;\r
+       font-size: 100%;\r
+       text-align: left;\r
+}\r
+\r
+table.screenshots td {\r
+       text-align: center;\r
+       padding-bottom: 10px;\r
+}\r
+\r
+table.screenshots img {\r
+       border: 1px solid #ccc;\r
+       margin: 5px;\r
+}\r
+\r
+table.plain {\r
+       padding: 8px;\r
+}\r
+\r
+table.plain td {\r
+       white-space: nowrap;\r
+}\r
+\r
+table.plain td.edit {  \r
+       padding: 3px;\r
+}\r
+\r
+table.plain td.editButton {\r
+       padding:0px;\r
+       padding-top: 10px;\r
+}\r
+\r
+table.plain td.edit input {\r
+       margin: 0px;\r
+       outline: 1px solid transparent;\r
+       border: 1px solid #ccc; \r
+       padding-left:5px;\r
+}\r
+\r
+table.plain td.edit input:focus, table.plain td.edit input:hover{\r
+       border: 1px solid orange;\r
+}\r
+\r
+table.pretty, table.comments {\r
+       margin-bottom:5px;\r
+       border-spacing: 0px;\r
+       border-left: 1px solid #bbb;\r
+       border-right: 1px solid #bbb;   \r
+}\r
+\r
+table.pretty, table.comments, table.repositories, table.gitnotes {\r
+       width:100%;\r
+}\r
+\r
+table.pretty td.icon {\r
+       padding: 0px 0px 0px 2px;       \r
+       width: 18px;\r
+}\r
+\r
+table.pretty td.icon img {\r
+       vertical-align: top;\r
+}\r
+\r
+table.pretty td {\r
+       padding: 2px 4px;\r
+}\r
+\r
+table.comments td {\r
+       padding: 4px;\r
+       line-height: 17px;\r
+}\r
+\r
+table.repositories {\r
+       margin-bottom:5px;\r
+       border-spacing: 0px;\r
+}\r
+\r
+table.repositories th {\r
+       background-color:#D2C3AF;\r
+       padding: 4px;\r
+       border-top: 1px solid #808080;\r
+       border-bottom: 1px solid #808080;\r
+}\r
+\r
+table.repositories th.left, table.repositories td.left {\r
+       border-left: 1px solid #808080;\r
+       padding-left: 5px;\r
+}\r
+\r
+table.repositories td.left {\r
+       padding-left: 10px;\r
+}\r
+\r
+table.repositories th.right, table.repositories td.right {\r
+       border-right: 1px solid #808080;\r
+}\r
+\r
+table.repositories td {\r
+       padding: 2px;\r
+}\r
+\r
+table.repositories td.rightAlign {     \r
+       text-align: right;\r
+       border-right: 1px solid #808080;\r
+}      \r
+\r
+table.repositories td.icon img {\r
+       vertical-align: top;\r
+}\r
+\r
+table.repositories th a {\r
+       color:black;/*#ddd;*/\r
+       text-decoration: none;\r
+       font-weight: normal;\r
+}\r
+\r
+table.repositories th a:hover {\r
+       text-decoration: underline;\r
+}\r
+\r
+table.repositories th.wicket_orderDown a, table.repositories th.wicket_orderUp a {\r
+       color: black;\r
+       font-weight: bold;\r
+}\r
+\r
+table.repositories tr.group {\r
+       background-color: #E66C2C;\r
+}\r
+\r
+table.repositories tr.group td {\r
+       font-weight: bold;      \r
+       border-bottom: 1px solid orange;\r
+       color: white;\r
+       background-color: #E66C2C;\r
+       border-left: 1px solid #808080;\r
+       border-right: 1px solid #808080;\r
+       padding-left: 5px;\r
+}\r
+\r
+table.palette { border:0;}\r
+table.palette td.header { \r
+       font-weight: bold; \r
+       background-color: #D2C3AF !important;\r
+       padding: 3px !important;        \r
+       border: 1px solid #808080 !important;\r
+       border-bottom: 0px solid !important;\r
+       border-radius: 3px 3px 0 0;\r
+}\r
+table.palette td.pane {\r
+       padding: 0px;   \r
+}\r
+\r
+table.gitnotes {       \r
+       padding-bottom: 5px;\r
+}\r
+table.gitnotes td {\r
+       border-top: 1px solid #ccc;\r
+       padding-top: 3px;\r
+       vertical-align:top;\r
+}\r
+\r
+table.gitnotes td table td {\r
+       border: none;\r
+       padding-top: 0px;\r
+}\r
+\r
+table.gitnotes td.info {\r
+}\r
+\r
+table.gitnotes td.message {\r
+       width: 65%;\r
+       border-left: 1px solid #ccc;\r
+}\r
+\r
+table.annotated {\r
+       width: 100%;\r
+       border: 1px solid #bbb;\r
+}\r
+\r
+table.annotated tr.even {\r
+       background-color: white;\r
+}\r
+\r
+table.annotated tr.odd {\r
+       background-color: #fdfbdf;\r
+}\r
+\r
+tr th a { padding-right: 15px; background-position: right; background-repeat:no-repeat; }\r
+tr th.wicket_orderDown a {background-image: url(arrow_down.png); }\r
+tr th.wicket_orderUp a { background-image: url(arrow_up.png); }\r
+tr th.wicket_orderNone a { background-image: url(arrow_off.png); }\r
+\r
+tr.light {\r
+       background-color: #ffffff;\r
+}\r
+\r
+tr.light td {\r
+       border-bottom: 1px solid #bbb;  \r
+}\r
+\r
+tr.dark {\r
+       background-color: #faf8dc;\r
+       border-bottom: 1px solid #bbb;  \r
+}\r
+\r
+tr.dark td {\r
+       border-bottom: 1px solid #bbb;  \r
+}\r
+\r
+/* currently both use the same, but it can change */\r
+tr.light:hover,\r
+tr.dark:hover {\r
+       /*background-color: #0099b7;*/\r
+       background-color: #000070;\r
+       color: white;\r
+}\r
+\r
+tr.light:hover a,\r
+tr.dark:hover a {\r
+       color: white;   \r
+}\r
+\r
+td {\r
+       padding-left: 7px;\r
+       padding-right: 7px;\r
+}\r
+\r
+td.author {\r
+       font-style: italic;\r
+}\r
+\r
+td.date {\r
+       font-style: italic;     \r
+}\r
+\r
+span.sha1, span.sha1 a, span.sha1 a span {\r
+       font-family: monospace;\r
+       font-size: 13px;\r
+}\r
+\r
+td.mode {\r
+       text-align: right;\r
+       font-family: monospace;\r
+       width: 8em;\r
+       padding-right:15px;\r
+}\r
+\r
+td.size {\r
+       text-align: right;\r
+       width: 8em;     \r
+       padding-right:15px;\r
+}\r
+\r
+td.rightAlign {\r
+       text-align: right;\r
+}\r
+\r
+td.treeLinks {\r
+       text-align: right;\r
+       width: 13em;\r
+}\r
+\r
+span.metricsTitle {\r
+       font-size: 2em;\r
+}\r
+\r
+span .tagRef, span .headRef, span .localBranch, span .remoteBranch, span .otherRef {   \r
+       padding: 0px 3px;\r
+       margin-right:2px;\r
+       font-family: sans-serif;\r
+       font-size: 9px;\r
+       font-weight: normal;\r
+       border: 1px solid;\r
+       color: black;   \r
+}\r
+\r
+span .tagRef a span, span .headRef a span, span .localBranch a span, span .remoteBranch a span, span .otherRef a span {\r
+       font-size: 9px;\r
+}\r
+\r
+span .tagRef a, span .headRef a, span .localBranch a, span .remoteBranch a, span .otherRef a {\r
+       text-decoration: none;\r
+       color: black !important;\r
+}\r
+\r
+span .tagRef a:hover, span .headRef a:hover, span .localBranch a:hover, span .remoteBranch a:hover, span .otherRef a:hover {\r
+       color: black !important;\r
+       text-decoration: underline;\r
+}\r
+\r
+span .otherRef {\r
+       background-color: #b0e0f0;\r
+       border-color: #80aaaa;  \r
+}\r
+\r
+span .remoteBranch {\r
+       background-color: #cAc2f5;\r
+       border-color: #6c6cbf;\r
+}\r
+\r
+span .tagRef {\r
+       background-color: #ffffaa;\r
+       border-color: #ffcc00;\r
+}\r
+\r
+span .headRef {\r
+       background-color: #ffaaff;\r
+       border-color: #ff00ee;\r
+}\r
+\r
+span .localBranch {\r
+       background-color: #ccffcc;\r
+       border-color: #00cc33;\r
+}\r
+\r
+.feedbackPanelERROR {  \r
+       color: red;\r
+       list-style-image: url(bullet_error.png);\r
+       font-weight: bold;      \r
+       vertical-align: top;\r
+       padding:0;      \r
+       margin:0;       \r
+}\r
+\r
+.feedbackPanelINFO {\r
+       color: green;\r
+       list-style: none;\r
+       font-weight: bold;      \r
+       padding:0;\r
+       margin:0;\r
+}\r
+\r
+/* google-code-prettify line numbers */\r
+li.L0,\r
+li.L1,\r
+li.L2,\r
+li.L3,\r
+li.L4,\r
+li.L5,\r
+li.L6,\r
+li.L7,\r
+li.L8,\r
+li.L9 { color: #888; border-left: 1px solid #ccc; padding-left:5px; list-style-type: decimal !important; }\r
+\r
+/* Alternate shading for lines */\r
+li.L1,\r
+li.L3,\r
+li.L5,\r
+li.L7,\r
+li.L9 { background: #fafafa !important; }
\ No newline at end of file
diff --git a/resources/gitblt-favicon.png b/resources/gitblt-favicon.png
new file mode 100644 (file)
index 0000000..c3c6dc1
Binary files /dev/null and b/resources/gitblt-favicon.png differ
diff --git a/resources/gitblt-logo.png b/resources/gitblt-logo.png
new file mode 100644 (file)
index 0000000..7ec945b
Binary files /dev/null and b/resources/gitblt-logo.png differ
diff --git a/resources/gitblt2.png b/resources/gitblt2.png
new file mode 100644 (file)
index 0000000..c164294
Binary files /dev/null and b/resources/gitblt2.png differ
diff --git a/resources/gitblt_25.png b/resources/gitblt_25.png
new file mode 100644 (file)
index 0000000..ad580fa
Binary files /dev/null and b/resources/gitblt_25.png differ
diff --git a/resources/gitweb-favicon.png b/resources/gitweb-favicon.png
new file mode 100644 (file)
index 0000000..de637c0
Binary files /dev/null and b/resources/gitweb-favicon.png differ
diff --git a/resources/lock_16x16.png b/resources/lock_16x16.png
new file mode 100644 (file)
index 0000000..ddf83d9
Binary files /dev/null and b/resources/lock_16x16.png differ
diff --git a/resources/lock_go_16x16.png b/resources/lock_go_16x16.png
new file mode 100644 (file)
index 0000000..63d4285
Binary files /dev/null and b/resources/lock_go_16x16.png differ
diff --git a/resources/lock_pull_16x16.png b/resources/lock_pull_16x16.png
new file mode 100644 (file)
index 0000000..85c5c53
Binary files /dev/null and b/resources/lock_pull_16x16.png differ
diff --git a/resources/markdown.css b/resources/markdown.css
new file mode 100644 (file)
index 0000000..41bc439
--- /dev/null
@@ -0,0 +1,67 @@
+/*\r
+ * Git:Blit Markdown CSS definition.\r
+ */\r
+\r
+div.markdown {\r
+       line-height: 1.4em;\r
+}\r
+\r
+div.markdown h1,\r
+div.markdown h2, \r
+div.markdown h3, \r
+div.markdown h4, \r
+div.markdown h5, \r
+div.markdown h6 {\r
+    border: 0 none !important;\r
+}\r
+\r
+div.markdown h1 {    \r
+    margin-top: 1em;\r
+    margin-bottom: 0.5em;\r
+    padding-bottom: 0.5em;\r
+    border-bottom: 2px solid #000080 !important;\r
+}\r
+\r
+div.markdown h2 {\r
+    margin-top: 1em;\r
+    margin-bottom: 0.5em;    \r
+    padding-bottom: 0.5em;\r
+       border-bottom: 2px solid #000080 !important;    \r
+}\r
+\r
+div.markdown pre {\r
+       background-color: #f8f8f8;    \r
+    border: 1px solid #2f6fab;\r
+    border-radius: 3px;\r
+    overflow: auto;\r
+    padding: 5px;\r
+}\r
+\r
+div.markdown pre code {\r
+    background-color: inherit;\r
+    border: none;    \r
+    padding: 0;\r
+}\r
+\r
+div.markdown code {\r
+       background-color: #ffffe0;\r
+    border: 1px solid orange;\r
+    border-radius: 3px;\r
+    padding: 0 0.2em;\r
+}\r
+\r
+div.markdown a {\r
+       text-decoration: underline;     \r
+}\r
+\r
+div.markdown ul, div.markdown ol {\r
+       padding-left: 30px;\r
+}\r
+\r
+div.markdown li {\r
+       margin: 0.2em 0 0 0em; padding: 0px;\r
+}\r
+\r
+div.markdown em {\r
+       color: #b05000;\r
+}
\ No newline at end of file
diff --git a/resources/pixel.png b/resources/pixel.png
new file mode 100644 (file)
index 0000000..4d5f6df
Binary files /dev/null and b/resources/pixel.png differ
diff --git a/resources/search-icon.png b/resources/search-icon.png
new file mode 100644 (file)
index 0000000..90e8d2c
Binary files /dev/null and b/resources/search-icon.png differ
diff --git a/resources/shield_16x16.png b/resources/shield_16x16.png
new file mode 100644 (file)
index 0000000..4eb8031
Binary files /dev/null and b/resources/shield_16x16.png differ
diff --git a/resources/tag_16x16.png b/resources/tag_16x16.png
new file mode 100644 (file)
index 0000000..7e75cba
Binary files /dev/null and b/resources/tag_16x16.png differ
diff --git a/resources/user_16x16.png b/resources/user_16x16.png
new file mode 100644 (file)
index 0000000..d5edd4d
Binary files /dev/null and b/resources/user_16x16.png differ
diff --git a/resources/welcome.mkd b/resources/welcome.mkd
new file mode 100644 (file)
index 0000000..130cd8a
--- /dev/null
@@ -0,0 +1,3 @@
+## Welcome to Gitblit\r
+\r
+A quick and easy way to host or view your own [Git](http://www.git-scm.com) repositories.\r
diff --git a/src/WEB-INF/web.xml b/src/WEB-INF/web.xml
new file mode 100644 (file)
index 0000000..d5d3288
--- /dev/null
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<web-app version="2.4"\r
+       xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">\r
+\r
+       <!-- PARAMS --> \r
+        \r
+       <!-- Gitblit Context Listener --><!-- STRIP      \r
+       <listener>\r
+               <listener-class>com.gitblit.GitBlit</listener-class>\r
+       </listener>STRIP -->    \r
+       \r
+       \r
+       <!-- Git Servlet\r
+                <url-pattern> MUST match: \r
+                       * GitFilter\r
+                       * com.gitblit.Constants.GIT_PATH\r
+                       * Wicket Filter ignorePaths parameter --><!-- STRIP\r
+       <servlet>\r
+               <servlet-name>GitServlet</servlet-name>\r
+               <servlet-class>org.jgit.http.transport.GitServlet</servlet-class>\r
+               <init-param>\r
+                       <param-name>base-path</param-name>\r
+                       <param-value>c:/git</param-value>\r
+               </init-param>\r
+               <init-param>\r
+                       <param-name>export-all</param-name>\r
+                       <param-value>1</param-value>\r
+               </init-param>\r
+       </servlet>\r
+       <servlet-mapping>\r
+               <servlet-name>GitServlet</servlet-name>         \r
+               <url-pattern>/git/*</url-pattern>\r
+       </servlet-mapping>STRIP -->\r
+       \r
+       \r
+       <!-- Syndication Servlet\r
+                <url-pattern> MUST match: \r
+                       * SyndicationFilter\r
+                       * com.gitblit.Constants.SYNDICATION_PATH\r
+                       * Wicket Filter ignorePaths parameter -->\r
+       <servlet>\r
+               <servlet-name>SyndicationServlet</servlet-name>\r
+               <servlet-class>com.gitblit.SyndicationServlet</servlet-class>           \r
+       </servlet>\r
+       <servlet-mapping>\r
+               <servlet-name>SyndicationServlet</servlet-name>\r
+               <url-pattern>/feed/*</url-pattern>\r
+       </servlet-mapping>\r
+       \r
+       \r
+       <!-- Zip Servlet\r
+                <url-pattern> MUST match: \r
+                       * ZipServlet\r
+                       * com.gitblit.Constants.ZIP_PATH\r
+                       * Wicket Filter ignorePaths parameter -->\r
+       <servlet>\r
+               <servlet-name>ZipServlet</servlet-name>\r
+               <servlet-class>com.gitblit.DownloadZipServlet</servlet-class>           \r
+       </servlet>\r
+       <servlet-mapping>\r
+               <servlet-name>ZipServlet</servlet-name>\r
+               <url-pattern>/zip/*</url-pattern>\r
+       </servlet-mapping>\r
+       \r
+\r
+       <!-- Git Access Restriction Filter\r
+                <url-pattern> MUST match: \r
+                       * GitServlet\r
+                       * com.gitblit.Constants.GIT_PATH\r
+                       * Wicket Filter ignorePaths parameter -->\r
+       <filter>\r
+               <filter-name>GitFilter</filter-name>\r
+               <filter-class>com.gitblit.GitFilter</filter-class>\r
+       </filter>\r
+       <filter-mapping>\r
+               <filter-name>GitFilter</filter-name>\r
+               <url-pattern>/git/*</url-pattern>\r
+       </filter-mapping>\r
+       \r
+       \r
+       <!-- Syndication Restriction Filter\r
+                <url-pattern> MUST match: \r
+                       * SyndicationServlet\r
+                       * com.gitblit.Constants.SYNDICATION_PATH\r
+                       * Wicket Filter ignorePaths parameter -->\r
+       <filter>\r
+               <filter-name>SyndicationFilter</filter-name>\r
+               <filter-class>com.gitblit.SyndicationFilter</filter-class>\r
+       </filter>\r
+       <filter-mapping>\r
+               <filter-name>SyndicationFilter</filter-name>\r
+               <url-pattern>/feed/*</url-pattern>\r
+       </filter-mapping>\r
+\r
+               \r
+       <!-- Wicket Filter -->\r
+    <filter>\r
+        <filter-name>wicketFilter</filter-name>\r
+        <filter-class>\r
+            org.apache.wicket.protocol.http.WicketFilter\r
+        </filter-class>\r
+        <init-param>\r
+            <param-name>applicationClassName</param-name>\r
+            <param-value>com.gitblit.wicket.GitBlitWebApp</param-value>\r
+        </init-param>\r
+        <init-param>\r
+            <param-name>ignorePaths</param-name>\r
+            <!-- Paths should match \r
+               * SyndicationFilter <url-pattern>\r
+               * SyndicationServlet <url-pattern>\r
+               * com.gitblit.Constants.SYNDICATION_PATH\r
+               * GitFilter <url-pattern>\r
+               * GitServlet <url-pattern>\r
+               * com.gitblit.Constants.GIT_PATH\r
+               * ZipServlet <url-pattern>\r
+               * com.gitblit.Constants.ZIP_PATH -->\r
+            <param-value>git/,feed/,zip/</param-value>\r
+        </init-param>\r
+    </filter>\r
+    <filter-mapping>\r
+        <filter-name>wicketFilter</filter-name>\r
+        <url-pattern>/*</url-pattern>\r
+    </filter-mapping>\r
+</web-app>
\ No newline at end of file
index 3aca1039760c6b479efada905daf746346d35a20..625eaa99080380d7130da9bca31617b903639b1a 100644 (file)
@@ -16,6 +16,7 @@
 package com.gitblit;\r
 \r
 import java.io.IOException;\r
+import java.nio.charset.Charset;\r
 import java.security.Principal;\r
 import java.text.MessageFormat;\r
 import java.util.Enumeration;\r
@@ -32,6 +33,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;\r
 import javax.servlet.http.HttpSession;\r
 \r
+import org.eclipse.jgit.util.Base64;\r
 import org.slf4j.Logger;\r
 import org.slf4j.LoggerFactory;\r
 \r
@@ -114,7 +116,8 @@ public abstract class AccessRestrictionFilter implements Filter {
                        if (authorization != null && authorization.startsWith(BASIC)) {\r
                                // Authorization: Basic base64credentials\r
                                String base64Credentials = authorization.substring(BASIC.length()).trim();\r
-                               String credentials = StringUtils.decodeBase64(base64Credentials);\r
+                               String credentials = new String(Base64.decode(base64Credentials),\r
+                                               Charset.forName("UTF-8"));\r
                                if (GitBlit.isDebugMode()) {\r
                                        logger.info(MessageFormat.format("AUTH: {0} ({1})", authorization, credentials));\r
                                }\r
@@ -131,7 +134,8 @@ public abstract class AccessRestrictionFilter implements Filter {
                                                        // authenticated request permitted.\r
                                                        // pass processing to the restricted servlet.\r
                                                        newSession(accessRequest, httpResponse);\r
-                                                       logger.info("ARF: " + fullUrl + " (" + HttpServletResponse.SC_CONTINUE + ") authenticated");\r
+                                                       logger.info("ARF: " + fullUrl + " (" + HttpServletResponse.SC_CONTINUE\r
+                                                                       + ") authenticated");\r
                                                        chain.doFilter(accessRequest, httpResponse);\r
                                                        return;\r
                                                }\r
@@ -163,7 +167,8 @@ public abstract class AccessRestrictionFilter implements Filter {
                }\r
 \r
                if (GitBlit.isDebugMode()) {\r
-                       logger.info("ARF: " + fullUrl + " (" + HttpServletResponse.SC_CONTINUE + ") unauthenticated");\r
+                       logger.info("ARF: " + fullUrl + " (" + HttpServletResponse.SC_CONTINUE\r
+                                       + ") unauthenticated");\r
                }\r
                // unauthenticated request permitted.\r
                // pass processing to the restricted servlet.\r
@@ -202,19 +207,19 @@ public abstract class AccessRestrictionFilter implements Filter {
        @Override\r
        public void destroy() {\r
        }\r
-       \r
+\r
        /**\r
         * Wraps a standard HttpServletRequest and overrides user principal methods.\r
         */\r
        public static class AccessRestrictionRequest extends ServletRequestWrapper {\r
 \r
                private UserModel user;\r
-               \r
+\r
                public AccessRestrictionRequest(HttpServletRequest req) {\r
                        super(req);\r
                        user = new UserModel("anonymous");\r
                }\r
-               \r
+\r
                void setUser(UserModel user) {\r
                        this.user = user;\r
                }\r
index 30c4aa00a0f001541b3cdd1e983e5e04ed640888..90224f08af71406a95f329712bb721a825e31488 100644 (file)
@@ -312,10 +312,10 @@ public class Build {
                                "c7adc475ca40c288c93054e0f4fe58f3a98c0cb5");\r
 \r
                public static final MavenObject JETTY = new MavenObject("Jetty",\r
-                               "org/eclipse/jetty/aggregate", "jetty-all", "7.4.1.v20110513", 1500000, 1000000,\r
-                               4100000, "1e2de9ed25a7c6ae38717d5ffdc7cfcd6be4bd46",\r
-                               "7b6279d16ce8f663537d9faf55ea353e748dbbaa",\r
-                               "fa06212e751296f1a7abc15c843b135bf49a112b");\r
+                               "org/eclipse/jetty/aggregate", "jetty-webapp", "7.4.2.v20110526", 1000000, 680000,\r
+                               2720000, "56331143afa22d24d9faba96e86e6371b0686c7c",\r
+                               "9f38230fd589e29c8be0fc3c80fb51c5093c2e1e",\r
+                               "0d48212889c25252c5c14bef62703e28215d80cc");\r
 \r
                public static final MavenObject SERVLET = new MavenObject("Servlet 2.5", "javax/servlet",\r
                                "servlet-api", "2.5", 105000, 158000, 0,\r
@@ -363,8 +363,8 @@ public class Build {
                                "3d32d958b2f7aa58388af5701ea3aafc433e573f",\r
                                "c37518b67ea85af485dd61fe854137eeacc50318");\r
 \r
-               public static final MavenObject JUNIT = new MavenObject("JUnit", "junit", "junit", "3.8.2",\r
-                               120000, 0, 0, "07e4cde26b53a9a0e3fe5b00d1dbbc7cc1d46060", "", "");\r
+               public static final MavenObject JUNIT = new MavenObject("JUnit", "junit", "junit", "4.8.2",\r
+                               237000, 0, 0, "c94f54227b08100974c36170dcb53329435fe5ad", "", "");\r
 \r
                public static final MavenObject MARKDOWNPAPERS = new MavenObject("MarkdownPapers",\r
                                "org/tautua/markdownpapers", "markdownpapers-core", "1.0.0", 87000, 58000, 278000,\r
diff --git a/src/com/gitblit/BuildWebXml.java b/src/com/gitblit/BuildWebXml.java
new file mode 100644 (file)
index 0000000..3b687f6
--- /dev/null
@@ -0,0 +1,80 @@
+/*\r
+ * Copyright 2011 gitblit.com.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package com.gitblit;\r
+\r
+import java.io.File;\r
+import java.io.FileInputStream;\r
+import java.io.FileOutputStream;\r
+import java.io.FileReader;\r
+import java.text.MessageFormat;\r
+import java.util.ArrayList;\r
+import java.util.Collections;\r
+import java.util.List;\r
+import java.util.Properties;\r
+\r
+public class BuildWebXml {\r
+       private static final String PARAMS = "<!-- PARAMS -->";\r
+       \r
+       private static final String [] STRIP_TOKENS = { "<!-- STRIP", "STRIP -->" };\r
+\r
+       private static final String PARAM_PATTERN = "\n\t<context-param>\n\t\t<param-name>{0}</param-name>\n\t\t<param-value>{1}</param-value>\n\t</context-param>\n";\r
+\r
+       public static void main(String[] args) throws Exception {\r
+               // Read the current Gitblit properties\r
+               // TODO extract the comments and inject them into web.xml too\r
+               FileInputStream fis = new FileInputStream(new File("distrib/gitblit.properties"));\r
+               Properties fileSettings = new Properties();             \r
+               fileSettings.load(fis);\r
+               fis.close();\r
+               List<String> keys = new ArrayList<String>(fileSettings.stringPropertyNames());\r
+               Collections.sort(keys);\r
+               \r
+               StringBuilder parameters = new StringBuilder();\r
+               for (String key : keys) {\r
+                       if (!skipKey(key)) {\r
+                               String value = fileSettings.getProperty(key);\r
+                               parameters.append(MessageFormat.format(PARAM_PATTERN, key, value));\r
+                       }\r
+               }\r
+\r
+               // Read the prototype web.xml file\r
+               File webxml = new File("src/WEB-INF/web.xml");\r
+               char [] buffer = new char[(int) webxml.length()];\r
+               FileReader reader = new FileReader(webxml);\r
+               reader.read(buffer);\r
+               reader.close();\r
+               String webXmlContent = new String(buffer);\r
+\r
+               // Insert the Gitblit properties into the prototype web.xml\r
+               for (String stripToken:STRIP_TOKENS) {\r
+                       webXmlContent = webXmlContent.replace(stripToken, "");\r
+               }\r
+               int idx = webXmlContent.indexOf(PARAMS);\r
+               StringBuilder sb = new StringBuilder();\r
+               sb.append(webXmlContent.substring(0, idx));\r
+               sb.append(parameters.toString());\r
+               sb.append(webXmlContent.substring(idx + PARAMS.length()));\r
+\r
+               // Save the merged web.xml to the war build folder\r
+               FileOutputStream os = new FileOutputStream(new File("war/WEB-INF/web.xml"), false);\r
+               os.write(sb.toString().getBytes());\r
+               os.close();\r
+       }\r
+\r
+       private static boolean skipKey(String key) {\r
+               return key.startsWith(Keys.server._ROOT);\r
+       }\r
+}\r
index 68e7b67ed6bfad4549fdbcaa306522a227dabc82..b874a7b09ce995a091b7cb8ac5b082a4ba98d48b 100644 (file)
@@ -33,14 +33,12 @@ public class Constants {
 \r
        public static final String PROPERTIES_FILE = "gitblit.properties";\r
 \r
-       public static final String GIT_SERVLET_PATH = "/git/";\r
+       public static final String GIT_PATH = "/git/";\r
 \r
-       public static final String ZIP_SERVLET_PATH = "/zip/";\r
+       public static final String ZIP_PATH = "/zip/";\r
        \r
-       public static final String SYNDICATION_SERVLET_PATH = "/feed/";\r
+       public static final String SYNDICATION_PATH = "/feed/";\r
        \r
-       public static final String RESOURCE_PATH = "/com/gitblit/wicket/resources/";\r
-\r
        public static final String BORDER = "***********************************************************";\r
 \r
        public static enum AccessRestrictionType {\r
index 3b02cbacc3bcad00f37d836c2edbe5db79952c25..d36b94d2efa4aef37bb173515c5b7b6f8c0bfc3c 100644 (file)
@@ -44,7 +44,7 @@ public class DownloadZipServlet extends HttpServlet {
                if (baseURL.length() > 0 && baseURL.charAt(baseURL.length() - 1) == '/') {\r
                        baseURL = baseURL.substring(0, baseURL.length() - 1);\r
                }\r
-               return baseURL + Constants.ZIP_SERVLET_PATH + "?r=" + repository\r
+               return baseURL + Constants.ZIP_PATH + "?r=" + repository\r
                                + (path == null ? "" : ("&p=" + path))\r
                                + (objectId == null ? "" : ("&h=" + objectId));\r
        }\r
index b59a776327ebdd836450c5003b79c4779cda2bab..e239efc45b8098807d3bc4c206b766067324a870 100644 (file)
@@ -53,8 +53,7 @@ public class FileLoginService extends FileSettings implements ILoginService {
                        if (user.password.equalsIgnoreCase(md5)) {\r
                                returnedUser = user;\r
                        }\r
-               }\r
-               if (user.password.equals(new String(password))) {\r
+               } else if (user.password.equals(new String(password))) {\r
                        returnedUser = user;\r
                }\r
                return returnedUser;\r
index fa593f9218763681b2b85657b27587b4f3c7f64e..1fa8b60fe759f09e2e9989a53f5c6560e988fb7a 100644 (file)
@@ -45,7 +45,7 @@ import com.gitblit.utils.StringUtils;
 \r
 public class GitBlit implements ServletContextListener {\r
 \r
-       private static final GitBlit GITBLIT;\r
+       private static GitBlit gitblit;\r
 \r
        private final Logger logger = LoggerFactory.getLogger(GitBlit.class);\r
 \r
@@ -53,45 +53,48 @@ public class GitBlit implements ServletContextListener {
 \r
        private File repositoriesFolder;\r
 \r
-       private boolean exportAll;\r
+       private boolean exportAll = true;\r
 \r
        private ILoginService loginService;\r
 \r
        private IStoredSettings storedSettings;\r
 \r
-       static {\r
-               GITBLIT = new GitBlit();\r
-       }\r
-\r
-       private GitBlit() {\r
+       public GitBlit() {\r
+               if (gitblit == null) {\r
+                       // Singleton reference when running in standard servlet container\r
+                       gitblit = this;\r
+               }\r
        }\r
 \r
        public static GitBlit self() {\r
-               return GITBLIT;\r
+               if (gitblit == null) {\r
+                       gitblit = new GitBlit();\r
+               }\r
+               return gitblit;\r
        }\r
 \r
        public static boolean getBoolean(String key, boolean defaultValue) {\r
-               return GITBLIT.storedSettings.getBoolean(key, defaultValue);\r
+               return self().storedSettings.getBoolean(key, defaultValue);\r
        }\r
 \r
        public static int getInteger(String key, int defaultValue) {\r
-               return GITBLIT.storedSettings.getInteger(key, defaultValue);\r
+               return self().storedSettings.getInteger(key, defaultValue);\r
        }\r
 \r
        public static String getString(String key, String defaultValue) {\r
-               return GITBLIT.storedSettings.getString(key, defaultValue);\r
+               return self().storedSettings.getString(key, defaultValue);\r
        }\r
 \r
        public static List<String> getStrings(String key) {\r
-               return GITBLIT.storedSettings.getStrings(key);\r
+               return self().storedSettings.getStrings(key);\r
        }\r
 \r
        public static List<String> getAllKeys(String startingWith) {\r
-               return GITBLIT.storedSettings.getAllKeys(startingWith);\r
+               return self().storedSettings.getAllKeys(startingWith);\r
        }\r
 \r
        public static boolean isDebugMode() {\r
-               return GITBLIT.storedSettings.getBoolean(Keys.web.debugMode, false);\r
+               return self().storedSettings.getBoolean(Keys.web.debugMode, false);\r
        }\r
 \r
        public List<String> getOtherCloneUrls(String repositoryName) {\r
@@ -103,6 +106,7 @@ public class GitBlit implements ServletContextListener {
        }\r
 \r
        public void setLoginService(ILoginService loginService) {\r
+               logger.info("Setting up login service " + loginService.toString());\r
                this.loginService = loginService;\r
        }\r
 \r
@@ -353,9 +357,32 @@ public class GitBlit implements ServletContextListener {
        public void configureContext(IStoredSettings settings) {\r
                logger.info("Reading configuration from " + settings.toString());\r
                this.storedSettings = settings;\r
-               repositoriesFolder = new File(settings.getString(Keys.git.repositoriesFolder, "repos"));\r
-               exportAll = settings.getBoolean(Keys.git.exportAll, true);\r
+               repositoriesFolder = new File(settings.getString(Keys.git.repositoriesFolder, "git"));\r
+               logger.info("Git repositories folder " + repositoriesFolder.getAbsolutePath());\r
                repositoryResolver = new FileResolver<Void>(repositoriesFolder, exportAll);\r
+               String realm = settings.getString(Keys.realm.realmFile, "users.properties");\r
+               ILoginService loginService = null;\r
+               try {\r
+                       // Check to see if this "file" is a login service class\r
+                       Class<?> realmClass = Class.forName(realm);\r
+                       if (ILoginService.class.isAssignableFrom(realmClass)) {\r
+                               loginService = (ILoginService) realmClass.newInstance();\r
+                       }\r
+               } catch (Throwable t) {\r
+                       // Not a login service class OR other issue\r
+                       // Use default file login service\r
+                       File realmFile = new File(realm);\r
+                       if (!realmFile.exists()) {\r
+                               try {\r
+                                       realmFile.createNewFile();\r
+                               } catch (IOException x) {\r
+                                       logger.error(\r
+                                                       MessageFormat.format("COULD NOT CREATE REALM FILE {0}!", realmFile), x);\r
+                               }\r
+                       }\r
+                       loginService = new FileLoginService(realmFile);\r
+               }\r
+               setLoginService(loginService);\r
        }\r
 \r
        @Override\r
index 4b6df709741decfd6c621d41b799b1016a955078..3687e4db24ad495583cd0740bf0c16793eacbc3d 100644 (file)
@@ -30,10 +30,6 @@ import java.text.MessageFormat;
 import java.util.ArrayList;\r
 import java.util.List;\r
 \r
-import org.apache.log4j.ConsoleAppender;\r
-import org.apache.log4j.PatternLayout;\r
-import org.apache.wicket.protocol.http.ContextParamWebApplicationFactory;\r
-import org.apache.wicket.protocol.http.WicketFilter;\r
 import org.eclipse.jetty.server.Connector;\r
 import org.eclipse.jetty.server.Server;\r
 import org.eclipse.jetty.server.bio.SocketConnector;\r
@@ -42,7 +38,6 @@ import org.eclipse.jetty.server.session.HashSessionManager;
 import org.eclipse.jetty.server.ssl.SslConnector;\r
 import org.eclipse.jetty.server.ssl.SslSelectChannelConnector;\r
 import org.eclipse.jetty.server.ssl.SslSocketConnector;\r
-import org.eclipse.jetty.servlet.FilterHolder;\r
 import org.eclipse.jetty.servlet.FilterMapping;\r
 import org.eclipse.jetty.servlet.ServletHolder;\r
 import org.eclipse.jetty.util.thread.QueuedThreadPool;\r
@@ -56,7 +51,6 @@ import com.beust.jcommander.Parameter;
 import com.beust.jcommander.ParameterException;\r
 import com.beust.jcommander.Parameters;\r
 import com.gitblit.utils.StringUtils;\r
-import com.gitblit.wicket.GitBlitWebApp;\r
 \r
 public class GitBlitServer {\r
 \r
@@ -121,26 +115,6 @@ public class GitBlitServer {
         */\r
        private static void start(Params params) {\r
                FileSettings settings = params.FILESETTINGS;\r
-               String pattern = settings.getString(Keys.server.log4jPattern,\r
-                               "%-5p %d{MM-dd HH:mm:ss.SSS}  %-20.20c{1}  %m%n");\r
-\r
-               // allow os override of logging pattern\r
-               String os = System.getProperty("os.name").toLowerCase();\r
-               if (os.indexOf("windows") > -1) {\r
-                       String winPattern = settings.getString(Keys.server.log4jPattern_windows, pattern);\r
-                       if (!StringUtils.isEmpty(winPattern)) {\r
-                               pattern = winPattern;\r
-                       }\r
-               } else if (os.indexOf("linux") > -1) {\r
-                       String linuxPattern = settings.getString(Keys.server.log4jPattern_linux, pattern);\r
-                       if (!StringUtils.isEmpty(linuxPattern)) {\r
-                               pattern = linuxPattern;\r
-                       }\r
-               }\r
-\r
-               PatternLayout layout = new PatternLayout(pattern);\r
-               org.apache.log4j.Logger rootLogger = org.apache.log4j.Logger.getRootLogger();\r
-               rootLogger.addAppender(new ConsoleAppender(layout));\r
 \r
                logger = LoggerFactory.getLogger(GitBlitServer.class);\r
                logger.info(Constants.BORDER);\r
@@ -223,55 +197,23 @@ public class GitBlitServer {
                sessionManager.setSecureCookies(params.port <= 0 && params.securePort > 0);\r
                rootContext.getSessionHandler().setSessionManager(sessionManager);\r
 \r
-               // Wicket Filter\r
-               String wicketPathSpec = "/*";\r
-               FilterHolder wicketFilter = new FilterHolder(WicketFilter.class);\r
-               wicketFilter.setInitParameter(ContextParamWebApplicationFactory.APP_CLASS_PARAM,\r
-                               GitBlitWebApp.class.getName());\r
-               wicketFilter.setInitParameter(WicketFilter.FILTER_MAPPING_PARAM, wicketPathSpec);\r
-               wicketFilter.setInitParameter(WicketFilter.IGNORE_PATHS_PARAM, "git/,feed/,zip/");\r
-               rootContext.addFilter(wicketFilter, wicketPathSpec, FilterMapping.DEFAULT);\r
-\r
                // JGit Filter and Servlet\r
-               if (settings.getBoolean(Keys.git.enableGitServlet, true)) {\r
-                       String jgitPathSpec = Constants.GIT_SERVLET_PATH + "*";\r
-                       rootContext.addFilter(GitFilter.class, jgitPathSpec, FilterMapping.DEFAULT);\r
-                       ServletHolder jGitServlet = rootContext.addServlet(GitServlet.class, jgitPathSpec);\r
-                       jGitServlet.setInitParameter("base-path", params.repositoriesFolder);\r
-                       jGitServlet.setInitParameter("export-all",\r
-                                       settings.getBoolean(Keys.git.exportAll, true) ? "1" : "0");\r
-               }\r
+               String jgitPathSpec = Constants.GIT_PATH + "*";\r
+               rootContext.addFilter(GitFilter.class, jgitPathSpec, FilterMapping.DEFAULT);\r
+               ServletHolder jGitServlet = rootContext.addServlet(GitServlet.class, jgitPathSpec);\r
+               jGitServlet.setInitParameter("base-path", params.repositoriesFolder);\r
+               jGitServlet.setInitParameter("export-all", "1");\r
 \r
-               // Syndication Filter and Servlet\r
-               String feedPathSpec = Constants.SYNDICATION_SERVLET_PATH + "*";\r
-               rootContext.addFilter(SyndicationFilter.class, feedPathSpec, FilterMapping.DEFAULT);\r
-               rootContext.addServlet(SyndicationServlet.class, feedPathSpec);\r
-\r
-               // Zip Servlet\r
-               rootContext.addServlet(DownloadZipServlet.class, Constants.ZIP_SERVLET_PATH + "*");\r
-\r
-               // Login Service\r
+               // Ensure there is a defined Login Service\r
                String realmUsers = params.realmFile;\r
                if (StringUtils.isEmpty(realmUsers)) {\r
                        logger.error(MessageFormat.format("PLEASE SPECIFY {0}!!", Keys.realm.realmFile));\r
                        return;\r
                }\r
-               File realmFile = new File(realmUsers);\r
-               if (!realmFile.exists()) {\r
-                       try {\r
-                               realmFile.createNewFile();\r
-                       } catch (IOException x) {\r
-                               logger.error(MessageFormat.format("COULD NOT CREATE REALM FILE {0}!", realmUsers),\r
-                                               x);\r
-                               return;\r
-                       }\r
-               }\r
-               logger.info("Setting up login service from " + realmUsers);\r
-               FileLoginService loginService = new FileLoginService(realmFile);\r
-               GitBlit.self().setLoginService(loginService);\r
-\r
-               logger.info("Git repositories folder "\r
-                               + new File(params.repositoriesFolder).getAbsolutePath());\r
+               \r
+               // Update settings\r
+//             settings.put(Keys.realm.realmFile, params.realmFile);\r
+//             settings.put(Keys.git.repositoriesFolder, params.repositoriesFolder);\r
 \r
                // Set the server's contexts\r
                server.setHandler(rootContext);\r
index 5bd7b330c89a24c671751307bb08539ca234832e..b3104426eea137ee15e6a9a15b575fc3248dccaf 100644 (file)
@@ -65,6 +65,10 @@ public class GitFilter extends AccessRestrictionFilter {
 \r
        @Override\r
        protected boolean canAccess(RepositoryModel repository, UserModel user, String urlRequestType) {\r
+               if (!GitBlit.getBoolean(Keys.git.enableGitServlet, true)) {\r
+                       // Git Servlet disabled\r
+                       return false;\r
+               }\r
                if (repository.isFrozen || repository.accessRestriction.atLeast(AccessRestrictionType.PUSH)) {\r
                        boolean authorizedUser = user.canAccessRepository(repository.name);\r
                        if (urlRequestType.equals(gitReceivePack)) {\r
index d7bfd017903d109a87d219750519c3caa8c9d8e1..0e706cf3518a2f24068553b65e2e6c7c3f074913 100644 (file)
@@ -42,4 +42,6 @@ public interface ILoginService {
        boolean renameRole(String oldRole, String newRole);\r
 \r
        boolean deleteRole(String role);\r
+       \r
+       String toString();\r
 }\r
index 7108c068dc5502772a645233bdaaa090d5c7a68f..403a06763b8bc8c40e39d45d6feda83c91acaa85 100644 (file)
@@ -27,21 +27,25 @@ import com.gitblit.utils.StringUtils;
 public abstract class IStoredSettings {\r
 \r
        protected final Logger logger;\r
-       \r
+\r
        public IStoredSettings(Class<? extends IStoredSettings> clazz) {\r
                logger = LoggerFactory.getLogger(clazz);\r
        }\r
-               \r
+\r
        protected abstract Properties read();\r
 \r
        public List<String> getAllKeys(String startingWith) {\r
-               startingWith = startingWith.toLowerCase();\r
                List<String> keys = new ArrayList<String>();\r
                Properties props = read();\r
-               for (Object o : props.keySet()) {\r
-                       String key = o.toString();\r
-                       if (key.toLowerCase().startsWith(startingWith)) {\r
-                               keys.add(key);\r
+               if (StringUtils.isEmpty(startingWith)) {\r
+                       keys.addAll(props.stringPropertyNames());\r
+               } else {\r
+                       startingWith = startingWith.toLowerCase();\r
+                       for (Object o : props.keySet()) {\r
+                               String key = o.toString();\r
+                               if (key.toLowerCase().startsWith(startingWith)) {\r
+                                       keys.add(key);\r
+                               }\r
                        }\r
                }\r
                return keys;\r
index 19865fe541e84c2932b130ee5d1df2903c1e6261..66dc467a358d66ab3c6da65463c894505a9ed0cb 100644 (file)
@@ -43,7 +43,7 @@ public class SyndicationServlet extends HttpServlet {
                }\r
                StringBuilder url = new StringBuilder();\r
                url.append(baseURL);\r
-               url.append(Constants.SYNDICATION_SERVLET_PATH);\r
+               url.append(Constants.SYNDICATION_PATH);\r
                url.append(repository);\r
                if (!StringUtils.isEmpty(objectId) || length > 0) {\r
                        StringBuilder parameters = new StringBuilder("?");\r
index e8bb3bf2742645f52416ad87facc7ca321920bca..5656efb3d9595e807d4dc5d2a7a05e5269612578 100644 (file)
@@ -402,36 +402,30 @@ public class JGitUtils {
 \r
        public static List<PathChangeModel> getFilesInCommit(Repository r, RevCommit commit) {\r
                List<PathChangeModel> list = new ArrayList<PathChangeModel>();\r
-               RevWalk rw = new RevWalk(r);\r
-               TreeWalk tw = new TreeWalk(r);\r
+               RevWalk rw = new RevWalk(r);            \r
                try {\r
                        if (commit == null) {\r
                                ObjectId object = r.resolve(Constants.HEAD);\r
                                commit = rw.parseCommit(object);\r
-                       }\r
-                       RevTree commitTree = commit.getTree();\r
+                       }                       \r
 \r
-                       tw.reset();\r
-                       tw.setRecursive(true);\r
                        if (commit.getParentCount() == 0) {\r
-                               tw.addTree(commitTree);\r
+                               TreeWalk tw = new TreeWalk(r);\r
+                               tw.reset();\r
+                               tw.setRecursive(true);\r
+                               tw.addTree(commit.getTree());\r
                                while (tw.next()) {\r
                                        list.add(new PathChangeModel(tw.getPathString(), tw.getPathString(), 0, tw\r
                                                        .getRawMode(0), commit.getId().getName(), ChangeType.ADD));\r
                                }\r
+                               tw.release();\r
                        } else {\r
                                RevCommit parent = rw.parseCommit(commit.getParent(0).getId());\r
-                               RevTree parentTree = parent.getTree();\r
-                               tw.addTree(parentTree);\r
-                               tw.addTree(commitTree);\r
-                               tw.setFilter(TreeFilter.ANY_DIFF);\r
-\r
-                               RawTextComparator cmp = RawTextComparator.DEFAULT;\r
                                DiffFormatter df = new DiffFormatter(DisabledOutputStream.INSTANCE);\r
                                df.setRepository(r);\r
-                               df.setDiffComparator(cmp);\r
+                               df.setDiffComparator(RawTextComparator.DEFAULT);\r
                                df.setDetectRenames(true);\r
-                               List<DiffEntry> diffs = df.scan(parentTree, commitTree);\r
+                               List<DiffEntry> diffs = df.scan(parent.getTree(), commit.getTree());\r
                                for (DiffEntry diff : diffs) {\r
                                        if (diff.getChangeType().equals(ChangeType.DELETE)) {\r
                                                list.add(new PathChangeModel(diff.getOldPath(), diff.getOldPath(), 0, diff\r
@@ -447,8 +441,7 @@ public class JGitUtils {
                } catch (Throwable t) {\r
                        LOGGER.error("failed to determine files in commit!", t);\r
                } finally {\r
-                       rw.dispose();\r
-                       tw.release();\r
+                       rw.dispose();                   \r
                }\r
                return list;\r
        }\r
index 363efc9c1dfc86acac29df7e961b6f13c3ed829c..b53b5e1580f0dd9f698632e0d0baa5d6f784ba3b 100644 (file)
 package com.gitblit.utils;\r
 \r
 import java.io.UnsupportedEncodingException;\r
-import java.nio.charset.Charset;\r
 import java.security.MessageDigest;\r
 import java.security.NoSuchAlgorithmException;\r
 import java.util.ArrayList;\r
 import java.util.List;\r
 import java.util.regex.PatternSyntaxException;\r
 \r
-import org.eclipse.jetty.util.log.Log;\r
-import org.eclipse.jgit.util.Base64;\r
-\r
 public class StringUtils {\r
 \r
        public static final String MD5_TYPE = "MD5:";\r
@@ -152,9 +148,10 @@ public class StringUtils {
                        md.update(string.getBytes("iso-8859-1"));\r
                        byte[] digest = md.digest();\r
                        return toHex(digest);\r
-               } catch (Exception e) {\r
-                       Log.warn(e);\r
-                       return null;\r
+               } catch (UnsupportedEncodingException u) {\r
+                       throw new RuntimeException(u);\r
+               } catch (NoSuchAlgorithmException t) {\r
+                       throw new RuntimeException(t);\r
                }\r
        }\r
 \r
@@ -168,11 +165,7 @@ public class StringUtils {
                }\r
                return sb.toString();\r
        }\r
-\r
-       public static String decodeBase64(String base64) {\r
-               return new String(Base64.decode(base64), Charset.forName("UTF-8"));\r
-       }\r
-\r
+       \r
        public static String getRootPath(String path) {\r
                if (path.indexOf('/') > -1) {\r
                        return path.substring(0, path.lastIndexOf('/'));\r
index 5763af3f343902ad34daa2b13d1a30d37b8ea42b..80a1b28859cfaa712392849d2b55252272e6345e 100644 (file)
@@ -48,7 +48,7 @@ public class SyndicationUtils {
                feed.setDescription(description);\r
                SyndImageImpl image = new SyndImageImpl();\r
                image.setTitle(Constants.NAME);\r
-               image.setUrl(hostUrl + Constants.RESOURCE_PATH + "gitblt_25.png");\r
+               image.setUrl(hostUrl + "/gitblt_25.png");\r
                image.setLink(hostUrl);\r
                feed.setImage(image);\r
 \r
index 50a4ef42d67b0234f48d222706f7c9c11d662169..2ed61fa638e38c4fa4211d97c132d1bcaec0975a 100644 (file)
@@ -66,7 +66,7 @@ gb.filesRenamed = {0} files renamed
 gb.missingUsername = Missing Username\r
 gb.edit = edit\r
 gb.searchTypeTooltip = Select Search Type\r
-gb.searchTooltip = Search Git:Blit\r
+gb.searchTooltip = Search Gitblit\r
 gb.delete = delete\r
 gb.docs = docs\r
 gb.accessRestriction = access restriction\r
@@ -86,7 +86,7 @@ gb.viewRestricted = authenticated view, clone, & push
 gb.useTicketsDescription = distributed Ticgit issues\r
 gb.useDocsDescription = enumerates Markdown documentation in repository\r
 gb.showRemoteBranchesDescription = show remote branches\r
-gb.canAdminDescription = can administer Git:Blit server\r
+gb.canAdminDescription = can administer Gitblit server\r
 gb.permittedUsers = permitted users\r
 gb.isFrozen = is frozen\r
 gb.isFrozenDescription = deny push operations\r
index 54f9648cd91839349c4aebac47a2f9a1edbb5817..1897acac6549816cd2cb6dcf8a0a77de5dd07588 100644 (file)
@@ -169,7 +169,7 @@ public class WicketUtils {
        }\r
 \r
        public static ContextImage newImage(String wicketId, String file, String tooltip) {\r
-               ContextImage img = new ContextImage(wicketId, com.gitblit.Constants.RESOURCE_PATH + file);\r
+               ContextImage img = new ContextImage(wicketId, file);\r
                if (!StringUtils.isEmpty(tooltip)) {\r
                        setHtmlTooltip(img, tooltip);\r
                }\r
@@ -177,7 +177,7 @@ public class WicketUtils {
        }\r
 \r
        public static ContextRelativeResource getResource(String file) {\r
-               return new ContextRelativeResource(com.gitblit.Constants.RESOURCE_PATH + file);\r
+               return new ContextRelativeResource(file);\r
        }\r
 \r
        public static String getHostURL(Request request) {\r
index 0da37d403f72ba10367f6e903b6d98fff5fa2e70..cc19fbccb634585f7373dec3f91664bc4a40c0c6 100644 (file)
@@ -4,25 +4,21 @@
       xml:lang="en"  \r
       lang="en"> \r
 \r
-       <!-- Head with Wicket-controlled resources in this package -->\r
+       <!-- Head -->\r
        <wicket:head>\r
                <title wicket:id="title">[page title]</title>\r
-               <wicket:link>\r
-                       <link rel="stylesheet" type="text/css" href="/com/gitblit/wicket/resources/gitblit.css"/>\r
-                       <link rel="shortcut icon" href="/com/gitblit/wicket/resources/gitblt-favicon.png" type="image/png" />\r
-               </wicket:link>\r
+               <link rel="stylesheet" type="text/css" href="gitblit.css"/>\r
+               <link rel="icon" href="gitblt-favicon.png" type="image/png" />\r
        </wicket:head>\r
 \r
        <body>\r
                <!-- page header -->\r
                <div class="page_header">\r
                        <a title="gitblit homepage" href="http://gitblit.com/">\r
-                               <wicket:link>\r
-                                       <img src="/com/gitblit/wicket/resources/gitblt_25.png" width="79" height="25" alt="gitblit" class="logo"/>\r
-                               </wicket:link>\r
+                               <img src="gitblt_25.png" width="79" height="25" alt="gitblit" class="logo"/>\r
                        </a>\r
                        <span>\r
-                               <a href="/"><span wicket:id="siteName">[site name]</span></a> / <span wicket:id="repositoryName">[repository name]</span> <span wicket:id="pageName">[page name]</span>\r
+                               <span wicket:id="siteName">[site name]</span> / <span wicket:id="repositoryName">[repository name]</span> <span wicket:id="pageName">[page name]</span>\r
                        </span> \r
                </div>\r
 \r
index 9031befdec7061cf6523fde0c5eafded3c6b5d32..5a0eb90fc3f26f554d20a5e6f17f71637c94e121 100644 (file)
@@ -63,7 +63,7 @@ public abstract class BasePage extends WebPage {
                if (siteName == null || siteName.trim().length() == 0) {\r
                        siteName = Constants.NAME;\r
                }\r
-               add(new Label("siteName", siteName));\r
+               add(new LinkPanel("siteName", null, siteName, RepositoriesPage.class, null));\r
                add(new LinkPanel("repositoryName", null, repositoryName, SummaryPage.class,\r
                                WicketUtils.newRepositoryParameter(repositoryName)));\r
                add(new Label("pageName", pageName));\r
@@ -122,6 +122,10 @@ public abstract class BasePage extends WebPage {
                HttpServletRequest req = servletWebRequest.getHttpServletRequest();\r
                return req.getServerName();\r
        }\r
+       \r
+       public void warn(String message, Throwable t) {\r
+               logger.warn(message, t);\r
+       }\r
 \r
        public void error(String message, boolean redirect) {\r
                logger.error(message);\r
index 7f41b71b47ccab3e0949afd7795cdcdf54570d04..2f899bbeb701217a56950a57eb224d79ddaebdaa 100644 (file)
@@ -64,7 +64,8 @@ public class DocsPage extends RepositoryPage {
                                                .newPathParameter(repositoryName, entry.commitId, entry.path)));\r
                                item.add(new BookmarkablePageLink<Void>("raw", RawPage.class, WicketUtils\r
                                                .newPathParameter(repositoryName, entry.commitId, entry.path)));\r
-                               item.add(new BookmarkablePageLink<Void>("blame", BlobPage.class).setEnabled(false));\r
+                               item.add(new BookmarkablePageLink<Void>("blame", BlamePage.class,\r
+                                               WicketUtils.newPathParameter(repositoryName, entry.commitId, entry.path)));\r
                                item.add(new BookmarkablePageLink<Void>("history", HistoryPage.class, WicketUtils\r
                                                .newPathParameter(repositoryName, entry.commitId, entry.path)));\r
                                WicketUtils.setAlternatingBackground(item, counter);\r
index 280453d5a8f7286a294142dd816f6ef37125f13a..5f9b779fc4e289a3c81b11a949008270b1b91896 100644 (file)
@@ -7,18 +7,14 @@
        <!-- Head with Wicket-controlled resources in this package -->\r
        <wicket:head>\r
                <title wicket:id="title">[page title]</title>\r
-               <wicket:link>\r
-                       <link rel="stylesheet" type="text/css" href="/com/gitblit/wicket/resources/gitblit.css"/>\r
-                       <link rel="shortcut icon" href="/com/gitblit/wicket/resources/gitblt-favicon.png" type="image/png" />\r
-               </wicket:link>\r
+               <link rel="stylesheet" type="text/css" href="gitblit.css"/>\r
+               <link rel="shortcut icon" href="gitblt-favicon.png" type="image/png" />\r
        </wicket:head>\r
        \r
        <body onload="document.getElementById('username').focus();">\r
                <div>\r
                        <div style="padding-top: 10px;text-align:center;">\r
-                               <wicket:link>\r
-                                       <img src="/com/gitblit/wicket/resources/gitblt_25.png" alt="Git:Blit"/><br/>\r
-                               </wicket:link>\r
+                               <img src="gitblt_25.png" alt="Gitblit"/><br/>\r
                                <div style="padding-top:30px;font-weight:bold;" wicket:id="name">[name]</div>\r
                        </div>\r
 \r
index a0f609042a56102f6b76d3fa8d49bb3ae1617049..1293f7861b16cc7fcc90236d8f6286b655d8b34b 100644 (file)
@@ -6,16 +6,14 @@
       \r
 <!-- contribute markdown css to the page header -->\r
 <wicket:head>\r
-  <wicket:link>\r
-       <link href="/com/gitblit/wicket/resources/markdown.css" type="text/css" rel="stylesheet" />\r
-  </wicket:link>\r
+       <link href="markdown.css" type="text/css" rel="stylesheet" />\r
 </wicket:head>\r
 \r
 <body>\r
 <wicket:extend>\r
                <!-- markdown nav links -->     \r
                <div class="page_nav2">\r
-                       <span wicket:id="blameLink">[blame link]</span> | <a wicket:id="historyLink"><wicket:message key="gb.history"></wicket:message></a> | <a wicket:id="rawLink"><wicket:message key="gb.raw"></wicket:message></a> | <a wicket:id="headLink"><wicket:message key="gb.head"></wicket:message></a>\r
+                       <a wicket:id="blameLink"><wicket:message key="gb.blame"></wicket:message></a>  | <a wicket:id="historyLink"><wicket:message key="gb.history"></wicket:message></a> | <a wicket:id="rawLink"><wicket:message key="gb.raw"></wicket:message></a> | <a wicket:id="headLink"><wicket:message key="gb.head"></wicket:message></a>\r
                </div>  \r
        \r
                <!--  markdown content -->\r
index 9202fb880f4dcd310b8b21bbc6e8e6a1c04d3828..aaf12bad7a9fce6a733566016f235dc7f26633e1 100644 (file)
@@ -39,7 +39,8 @@ public class MarkdownPage extends RepositoryPage {
                RevCommit commit = JGitUtils.getCommit(r, objectId);\r
 \r
                // markdown page links\r
-               add(new Label("blameLink", getString("gb.blame")));\r
+               add(new BookmarkablePageLink<Void>("blameLink", BlamePage.class,\r
+                               WicketUtils.newPathParameter(repositoryName, objectId, markdownPath)));\r
                add(new BookmarkablePageLink<Void>("historyLink", HistoryPage.class,\r
                                WicketUtils.newPathParameter(repositoryName, objectId, markdownPath)));\r
                add(new BookmarkablePageLink<Void>("rawLink", RawPage.class, WicketUtils.newPathParameter(\r
index da91cb2e13400c66fdbcd518604cf150e230a82d..c8ab59783a9000013b845540fc1c7dd2607ace3e 100644 (file)
@@ -4,9 +4,7 @@
       xml:lang="en"  \r
       lang="en"> \r
 <wicket:head>\r
-  <wicket:link>\r
-       <link href="/com/gitblit/wicket/resources/markdown.css" type="text/css" rel="stylesheet" />\r
-  </wicket:link>\r
+       <link href="markdown.css" type="text/css" rel="stylesheet" />\r
 </wicket:head>\r
 \r
 <body>\r
index b0e5e57901f903f95db038142dad99a0d596c318..f97adff565f14314600bec6899c65531f0ccf43b 100644 (file)
@@ -86,7 +86,7 @@ public class RepositoriesPage extends BasePage {
                                                message = MarkdownUtils.transformMarkdown(reader);\r
                                        } catch (Throwable t) {\r
                                                message = "Failed to read " + file;\r
-                                               error(message, t, false);\r
+                                               warn(message, t);\r
                                        }\r
                                } else {\r
                                        message = messageSource + " is not a valid file.";\r
index cff7d0686d54aaedc8ee3f6a3386a014cdafdbe2..e793a1e98931818ffac46104fee42f1773492393 100644 (file)
@@ -19,7 +19,7 @@
                        <!-- page nav links -->\r
                        <div class="page_nav">\r
                                <a style="text-decoration: none;" wicket:id="syndication">\r
-                                       <img style="border:0px;vertical-align:middle;" src="/com/gitblit/wicket/resources/feed_16x16.png"></img>\r
+                                       <img style="border:0px;vertical-align:middle;" src="feed_16x16.png"></img>\r
                                </a>                            \r
                                <a wicket:id="summary"><wicket:message key="gb.summary"></wicket:message></a> | <a wicket:id="log"><wicket:message key="gb.log"></wicket:message></a> | <a wicket:id="branches"><wicket:message key="gb.branches"></wicket:message></a> | <a wicket:id="tags"><wicket:message key="gb.tags"></wicket:message></a> | <a wicket:id="tree"><wicket:message key="gb.tree"></wicket:message></a> <span wicket:id="extra"><span wicket:id="extraSeparator"></span><span wicket:id="extraLink"></span></span>\r
                        </div>\r
index cf14ee192fe655cc3b76b53446767920d84b7441..00ed7554e6f7aea04834bbdc82a8b1dee56a977c 100644 (file)
@@ -40,8 +40,6 @@ import org.eclipse.jgit.diff.DiffEntry.ChangeType;
 import org.eclipse.jgit.lib.PersonIdent;\r
 import org.eclipse.jgit.lib.Repository;\r
 import org.eclipse.jgit.revwalk.RevCommit;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
 \r
 import com.gitblit.GitBlit;\r
 import com.gitblit.Keys;\r
@@ -65,20 +63,19 @@ public abstract class RepositoryPage extends BasePage {
 \r
        private RepositoryModel m;\r
 \r
-       private final Logger logger = LoggerFactory.getLogger(RepositoryPage.class);\r
-\r
-       private final Map<String, String> knownPages = new HashMap<String, String>() {\r
+       private final Map<String, PageRegistration> registeredPages = new HashMap<String, PageRegistration>() {\r
 \r
                private static final long serialVersionUID = 1L;\r
 \r
                {\r
-                       put("summary", "gb.summary");\r
-                       put("log", "gb.log");\r
-                       put("branches", "gb.branches");\r
-                       put("tags", "gb.tags");\r
-                       put("tree", "gb.tree");\r
-                       put("tickets", "gb.tickets");\r
-                       put("edit", "gb.edit");\r
+                       put("summary", new PageRegistration("gb.summary", SummaryPage.class));\r
+                       put("log", new PageRegistration("gb.log", LogPage.class));\r
+                       put("branches", new PageRegistration("gb.branches", BranchesPage.class));\r
+                       put("tags", new PageRegistration("gb.tags", TagsPage.class));\r
+                       put("tree", new PageRegistration("gb.tree", TreePage.class));\r
+                       put("tickets", new PageRegistration("gb.tickets", TicketsPage.class));\r
+                       put("edit", new PageRegistration("gb.edit", EditRepositoryPage.class));\r
+                       put("docs", new PageRegistration("gb.docs", DocsPage.class));\r
                }\r
        };\r
 \r
@@ -95,26 +92,17 @@ public abstract class RepositoryPage extends BasePage {
                RepositoryModel model = getRepositoryModel();\r
 \r
                // standard page links\r
-               add(new BookmarkablePageLink<Void>("summary", SummaryPage.class,\r
-                               WicketUtils.newRepositoryParameter(repositoryName)));\r
-               add(new BookmarkablePageLink<Void>("log", LogPage.class,\r
-                               WicketUtils.newRepositoryParameter(repositoryName)));\r
-               add(new BookmarkablePageLink<Void>("branches", BranchesPage.class,\r
-                               WicketUtils.newRepositoryParameter(repositoryName)));\r
-               add(new BookmarkablePageLink<Void>("tags", TagsPage.class,\r
-                               WicketUtils.newRepositoryParameter(repositoryName)));\r
-               add(new BookmarkablePageLink<Void>("tree", TreePage.class,\r
-                               WicketUtils.newRepositoryParameter(repositoryName)));\r
+               addRegisteredPageLink("summary");\r
+               addRegisteredPageLink("log");\r
+               addRegisteredPageLink("branches");\r
+               addRegisteredPageLink("tags");\r
+               addRegisteredPageLink("tree");\r
 \r
                // per-repository extra page links\r
                List<String> extraPageLinks = new ArrayList<String>();\r
-\r
-               // Conditionally add tickets link\r
                if (model.useTickets && TicgitUtils.getTicketsBranch(r) != null) {\r
                        extraPageLinks.add("tickets");\r
                }\r
-\r
-               // Conditionally add docs link\r
                if (model.useDocs) {\r
                        extraPageLinks.add("docs");\r
                }\r
@@ -135,26 +123,19 @@ public abstract class RepositoryPage extends BasePage {
                        extraPageLinks.add("edit");\r
                }\r
 \r
+               final String pageName = getPageName();\r
+               final String pageWicketId = getLinkWicketId(pageName);\r
                ListDataProvider<String> extrasDp = new ListDataProvider<String>(extraPageLinks);\r
                DataView<String> extrasView = new DataView<String>("extra", extrasDp) {\r
                        private static final long serialVersionUID = 1L;\r
 \r
                        public void populateItem(final Item<String> item) {\r
                                String extra = item.getModelObject();\r
-                               if (extra.equals("tickets")) {\r
-                                       item.add(new Label("extraSeparator", " | "));\r
-                                       item.add(new LinkPanel("extraLink", null, getString("gb.tickets"),\r
-                                                       TicketsPage.class, WicketUtils.newRepositoryParameter(repositoryName)));\r
-                               } else if (extra.equals("docs")) {\r
-                                       item.add(new Label("extraSeparator", " | "));\r
-                                       item.add(new LinkPanel("extraLink", null, getString("gb.docs"), DocsPage.class,\r
-                                                       WicketUtils.newRepositoryParameter(repositoryName)));\r
-                               } else if (extra.equals("edit")) {\r
-                                       item.add(new Label("extraSeparator", " | "));\r
-                                       item.add(new LinkPanel("extraLink", null, getString("gb.edit"),\r
-                                                       EditRepositoryPage.class, WicketUtils\r
-                                                                       .newRepositoryParameter(repositoryName)));\r
-                               }\r
+                               PageRegistration pageReg = registeredPages.get(extra);\r
+                               item.add(new Label("extraSeparator", " | "));\r
+                               item.add(new LinkPanel("extraLink", null, getString(pageReg.translationKey),\r
+                                               pageReg.pageClass, WicketUtils.newRepositoryParameter(repositoryName))\r
+                                               .setEnabled(!extra.equals(pageWicketId)));\r
                        }\r
                };\r
                add(extrasView);\r
@@ -163,7 +144,7 @@ public abstract class RepositoryPage extends BasePage {
                                .getRelativePathPrefixToContextRoot(), repositoryName, null, 0)));\r
 \r
                // disable current page\r
-               disablePageLink(getPageName());\r
+               disableRegisteredPageLink(pageName);\r
 \r
                // add floating search form\r
                SearchForm searchForm = new SearchForm("searchForm", repositoryName);\r
@@ -174,18 +155,31 @@ public abstract class RepositoryPage extends BasePage {
                setStatelessHint(true);\r
        }\r
 \r
-       public void disablePageLink(String pageName) {\r
-               for (String wicketId : knownPages.keySet()) {\r
-                       String key = knownPages.get(wicketId);\r
+       public String getLinkWicketId(String pageName) {\r
+               for (String wicketId : registeredPages.keySet()) {\r
+                       String key = registeredPages.get(wicketId).translationKey;\r
                        String linkName = getString(key);\r
                        if (linkName.equals(pageName)) {\r
-                               Component c = get(wicketId);\r
-                               if (c != null) {\r
-                                       c.setEnabled(false);\r
-                               }\r
-                               break;\r
+                               return wicketId;\r
                        }\r
                }\r
+               return null;\r
+       }\r
+\r
+       public void disableRegisteredPageLink(String pageName) {\r
+               String wicketId = getLinkWicketId(pageName);\r
+               if (!StringUtils.isEmpty(wicketId)) {\r
+                       Component c = get(wicketId);\r
+                       if (c != null) {\r
+                               c.setEnabled(false);\r
+                       }\r
+               }\r
+       }\r
+\r
+       private void addRegisteredPageLink(String key) {\r
+               PageRegistration pageReg = registeredPages.get(key);\r
+               add(new BookmarkablePageLink<Void>(key, pageReg.pageClass,\r
+                               WicketUtils.newRepositoryParameter(repositoryName)));\r
        }\r
 \r
        protected void addSyndicationDiscoveryLink() {\r
@@ -339,6 +333,16 @@ public abstract class RepositoryPage extends BasePage {
                return WicketUtils.newPathParameter(repositoryName, objectId, path);\r
        }\r
 \r
+       private static class PageRegistration {\r
+               final String translationKey;\r
+               final Class<? extends BasePage> pageClass;\r
+\r
+               PageRegistration(String translationKey, Class<? extends BasePage> pageClass) {\r
+                       this.translationKey = translationKey;\r
+                       this.pageClass = pageClass;\r
+               }\r
+       }\r
+\r
        private static class SearchForm extends StatelessForm<Void> {\r
                private static final long serialVersionUID = 1L;\r
 \r
index 7784a4711e4feaebe51c72a6b5cdf1fa93806b93..bbf8979819b20d0b6cd5baa7238b896713a6bb6d 100644 (file)
@@ -5,9 +5,7 @@
       lang="en"> \r
 \r
 <wicket:head>\r
-  <wicket:link>\r
-       <link href="/com/gitblit/wicket/resources/markdown.css" type="text/css" rel="stylesheet" />\r
-  </wicket:link>\r
+       <link href="markdown.css" type="text/css" rel="stylesheet" />\r
 </wicket:head>\r
 \r
 <body>\r
index 0d0db86bd7715cc5c669535ea31becb4339628cf..e31375c080df6e5c46c25a57a2274aceea4b2443 100644 (file)
@@ -122,7 +122,7 @@ public class SummaryPage extends RepositoryPage {
                        }\r
                        StringBuilder sb = new StringBuilder();\r
                        sb.append(WicketUtils.getHostURL(getRequestCycle().getRequest()));                                      \r
-                       sb.append(Constants.GIT_SERVLET_PATH);\r
+                       sb.append(Constants.GIT_PATH);\r
                        sb.append(repositoryName);\r
                        repositoryUrls.add(sb.toString());\r
                } else {\r
index 1e609e10708bdc1e27815ce8c6ab71c5be87de8e..7e090e80334ee818f958a23bdda1f658fde2fb86 100644 (file)
@@ -21,9 +21,7 @@
        <wicket:fragment wicket:id="adminLinks">\r
                <!-- page nav links --> \r
                <div class="admin_nav">\r
-                       <wicket:link>\r
-                               <img style="vertical-align: top;" src="/com/gitblit/wicket/resources/add_16x16.png"/>\r
-                       </wicket:link>  \r
+                       <img style="vertical-align: top;" src="add_16x16.png"/>\r
                        <a wicket:id="newRepository">\r
                                <wicket:message key="gb.newRepository"></wicket:message>\r
                        </a>\r
@@ -41,9 +39,7 @@
        <wicket:fragment wicket:id="flatRepositoryHeader">\r
                <tr>\r
                        <th class="left" wicket:id="orderByRepository">\r
-                               <wicket:link>\r
-                                       <img style="vertical-align: top; border: 1px solid #888;" src="/com/gitblit/wicket/resources/gitweb-favicon.png"/>\r
-                               </wicket:link>\r
+                               <img style="vertical-align: top; border: 1px solid #888;" src="gitweb-favicon.png"/>\r
                                <wicket:message key="gb.repository">Repository</wicket:message>\r
                        </th>\r
                        <th wicket:id="orderByDescription"><wicket:message key="gb.description">Description</wicket:message></th>\r
@@ -57,9 +53,7 @@
        <wicket:fragment wicket:id="groupRepositoryHeader">\r
                <tr>\r
                        <th class="left">\r
-                               <wicket:link>\r
-                                       <img style="vertical-align: top; border: 1px solid #888;" src="/com/gitblit/wicket/resources/gitweb-favicon.png"/>\r
-                               </wicket:link>\r
+                               <img style="vertical-align: top; border: 1px solid #888;" src="gitweb-favicon.png"/>\r
                                <wicket:message key="gb.repository">Repository</wicket:message>\r
                        </th>\r
                        <th><wicket:message key="gb.description">Description</wicket:message></th>\r
@@ -83,7 +77,7 @@
         <td class="rightAlign">\r
                <span wicket:id="repositoryLinks"></span>\r
                        <a style="text-decoration: none;" wicket:id="syndication">\r
-                               <img style="border:0px;vertical-align:middle;" src="/com/gitblit/wicket/resources/feed_16x16.png"></img>\r
+                               <img style="border:0px;vertical-align:middle;" src="feed_16x16.png"></img>\r
                        </a>\r
                </td>                           \r
        </wicket:fragment>\r
index 7c8f96f235710fa60166d8f990a6491ce4a823b4..bfbcb6ba574261870ad3eaab286e86b559b70bb9 100644 (file)
@@ -8,8 +8,10 @@
 <wicket:panel>\r
 \r
        <!-- header --> \r
-       <div class="header" wicket:id="header">[search header]</div>\r
+       <div wicket:id="commitHeader">[search header]</div>\r
 \r
+       <!-- header --> \r
+       <div style="margin-top:10px;font-weight:bold;" class="header"><wicket:message key="gb.search"></wicket:message>: <span wicket:id="searchString">[search string]</span> (<span wicket:id="searchType">[search type]</span>)</div>\r
        <table class="pretty">\r
                <tbody>\r
                        <tr wicket:id="commit">\r
index 5f82a4286851d49439a431539e255d26cae873c6..759040e672585ec08bb469f745f56cc41cc91d5b 100644 (file)
@@ -19,6 +19,7 @@ import java.util.Date;
 import java.util.List;\r
 import java.util.Map;\r
 \r
+import org.apache.wicket.markup.html.basic.Label;\r
 import org.apache.wicket.markup.html.link.BookmarkablePageLink;\r
 import org.apache.wicket.markup.repeater.Item;\r
 import org.apache.wicket.markup.repeater.data.DataView;\r
@@ -72,9 +73,10 @@ public class SearchPanel extends BasePanel {
                hasMore = commits.size() >= itemsPerPage;\r
 \r
                // header\r
-               add(new LinkPanel("header", "title", commit == null ? "" : commit.getShortMessage(),\r
-                               CommitPage.class, WicketUtils.newObjectParameter(repositoryName,\r
-                                               commit == null ? "" : commit.getName())));\r
+               add(new CommitHeaderPanel("commitHeader", repositoryName, commit));\r
+               \r
+               add(new Label("searchString", value));\r
+               add(new Label("searchType", searchType.toString()));\r
 \r
                ListDataProvider<RevCommit> dp = new ListDataProvider<RevCommit>(commits);\r
                DataView<RevCommit> searchView = new DataView<RevCommit>("commit", dp) {\r
index 39074b2f1bc48651be4a93c3d4f78f5263f7cc31..eed2a887bd734031dd3c106ba6094a23668cf349 100644 (file)
@@ -12,9 +12,7 @@
                <table class="repositories">\r
                <tr>\r
                        <th class="left">\r
-                               <wicket:link>\r
-                                       <img style="vertical-align: top; border: 1px solid #888; background-color: white;" src="/com/gitblit/wicket/resources/user_16x16.png"/>\r
-                               </wicket:link>\r
+                               <img style="vertical-align: top; border: 1px solid #888; background-color: white;" src="user_16x16.png"/>\r
                                <wicket:message key="gb.username">[username]</wicket:message>\r
                        </th>\r
                        <th class="right"></th>\r
@@ -30,9 +28,7 @@
        <wicket:fragment wicket:id="adminLinks">\r
                <!-- page nav links --> \r
                <div class="admin_nav">\r
-                       <wicket:link>\r
-                               <img style="vertical-align: top;" src="/com/gitblit/wicket/resources/add_16x16.png"/>\r
-                       </wicket:link>          \r
+                       <img style="vertical-align: top;" src="add_16x16.png"/>\r
                        <a wicket:id="newUser">\r
                                <wicket:message key="gb.newUser"></wicket:message>\r
                        </a>\r
diff --git a/src/com/gitblit/wicket/resources/add_16x16.png b/src/com/gitblit/wicket/resources/add_16x16.png
deleted file mode 100644 (file)
index 0ea124a..0000000
Binary files a/src/com/gitblit/wicket/resources/add_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/arrow_down.png b/src/com/gitblit/wicket/resources/arrow_down.png
deleted file mode 100644 (file)
index f31cc81..0000000
Binary files a/src/com/gitblit/wicket/resources/arrow_down.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/arrow_off.png b/src/com/gitblit/wicket/resources/arrow_off.png
deleted file mode 100644 (file)
index f9b1ced..0000000
Binary files a/src/com/gitblit/wicket/resources/arrow_off.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/arrow_up.png b/src/com/gitblit/wicket/resources/arrow_up.png
deleted file mode 100644 (file)
index 63031c3..0000000
Binary files a/src/com/gitblit/wicket/resources/arrow_up.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/background.png b/src/com/gitblit/wicket/resources/background.png
deleted file mode 100644 (file)
index 6f75e43..0000000
Binary files a/src/com/gitblit/wicket/resources/background.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/blank.png b/src/com/gitblit/wicket/resources/blank.png
deleted file mode 100644 (file)
index 109296b..0000000
Binary files a/src/com/gitblit/wicket/resources/blank.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/book_16x16.png b/src/com/gitblit/wicket/resources/book_16x16.png
deleted file mode 100644 (file)
index e48ff95..0000000
Binary files a/src/com/gitblit/wicket/resources/book_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/bug_16x16.png b/src/com/gitblit/wicket/resources/bug_16x16.png
deleted file mode 100644 (file)
index c7299fd..0000000
Binary files a/src/com/gitblit/wicket/resources/bug_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/bullet_error.png b/src/com/gitblit/wicket/resources/bullet_error.png
deleted file mode 100644 (file)
index b2e6b75..0000000
Binary files a/src/com/gitblit/wicket/resources/bullet_error.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/cold_16x16.png b/src/com/gitblit/wicket/resources/cold_16x16.png
deleted file mode 100644 (file)
index 79cb756..0000000
Binary files a/src/com/gitblit/wicket/resources/cold_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/commit_branch_16x16.png b/src/com/gitblit/wicket/resources/commit_branch_16x16.png
deleted file mode 100644 (file)
index d1fe717..0000000
Binary files a/src/com/gitblit/wicket/resources/commit_branch_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/commit_divide_16x16.png b/src/com/gitblit/wicket/resources/commit_divide_16x16.png
deleted file mode 100644 (file)
index e611bd5..0000000
Binary files a/src/com/gitblit/wicket/resources/commit_divide_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/commit_join_16x16.png b/src/com/gitblit/wicket/resources/commit_join_16x16.png
deleted file mode 100644 (file)
index 51e7de9..0000000
Binary files a/src/com/gitblit/wicket/resources/commit_join_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/commit_merge_16x16.png b/src/com/gitblit/wicket/resources/commit_merge_16x16.png
deleted file mode 100644 (file)
index 5a066e5..0000000
Binary files a/src/com/gitblit/wicket/resources/commit_merge_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/commit_up_16x16.png b/src/com/gitblit/wicket/resources/commit_up_16x16.png
deleted file mode 100644 (file)
index 30d005f..0000000
Binary files a/src/com/gitblit/wicket/resources/commit_up_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/feed_16x16.png b/src/com/gitblit/wicket/resources/feed_16x16.png
deleted file mode 100644 (file)
index 99987a3..0000000
Binary files a/src/com/gitblit/wicket/resources/feed_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/file_16x16.png b/src/com/gitblit/wicket/resources/file_16x16.png
deleted file mode 100644 (file)
index eda4488..0000000
Binary files a/src/com/gitblit/wicket/resources/file_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/file_acrobat_16x16.png b/src/com/gitblit/wicket/resources/file_acrobat_16x16.png
deleted file mode 100644 (file)
index f162783..0000000
Binary files a/src/com/gitblit/wicket/resources/file_acrobat_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/file_c_16x16.png b/src/com/gitblit/wicket/resources/file_c_16x16.png
deleted file mode 100644 (file)
index 44045a9..0000000
Binary files a/src/com/gitblit/wicket/resources/file_c_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/file_code_16x16.png b/src/com/gitblit/wicket/resources/file_code_16x16.png
deleted file mode 100644 (file)
index 931b0d6..0000000
Binary files a/src/com/gitblit/wicket/resources/file_code_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/file_cpp_16x16.png b/src/com/gitblit/wicket/resources/file_cpp_16x16.png
deleted file mode 100644 (file)
index d3f55ee..0000000
Binary files a/src/com/gitblit/wicket/resources/file_cpp_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/file_cs_16x16.png b/src/com/gitblit/wicket/resources/file_cs_16x16.png
deleted file mode 100644 (file)
index 8013020..0000000
Binary files a/src/com/gitblit/wicket/resources/file_cs_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/file_doc_16x16.png b/src/com/gitblit/wicket/resources/file_doc_16x16.png
deleted file mode 100644 (file)
index 225c3b0..0000000
Binary files a/src/com/gitblit/wicket/resources/file_doc_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/file_excel_16x16.png b/src/com/gitblit/wicket/resources/file_excel_16x16.png
deleted file mode 100644 (file)
index 04e0332..0000000
Binary files a/src/com/gitblit/wicket/resources/file_excel_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/file_h_16x16.png b/src/com/gitblit/wicket/resources/file_h_16x16.png
deleted file mode 100644 (file)
index 3f7f539..0000000
Binary files a/src/com/gitblit/wicket/resources/file_h_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/file_java_16x16.png b/src/com/gitblit/wicket/resources/file_java_16x16.png
deleted file mode 100644 (file)
index 16620e5..0000000
Binary files a/src/com/gitblit/wicket/resources/file_java_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/file_php_16x16.png b/src/com/gitblit/wicket/resources/file_php_16x16.png
deleted file mode 100644 (file)
index 4ac5618..0000000
Binary files a/src/com/gitblit/wicket/resources/file_php_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/file_ppt_16x16.png b/src/com/gitblit/wicket/resources/file_ppt_16x16.png
deleted file mode 100644 (file)
index 44bbf26..0000000
Binary files a/src/com/gitblit/wicket/resources/file_ppt_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/file_ruby_16x16.png b/src/com/gitblit/wicket/resources/file_ruby_16x16.png
deleted file mode 100644 (file)
index f29349d..0000000
Binary files a/src/com/gitblit/wicket/resources/file_ruby_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/file_settings_16x16.png b/src/com/gitblit/wicket/resources/file_settings_16x16.png
deleted file mode 100644 (file)
index 92953fe..0000000
Binary files a/src/com/gitblit/wicket/resources/file_settings_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/file_vs_16x16.png b/src/com/gitblit/wicket/resources/file_vs_16x16.png
deleted file mode 100644 (file)
index 645fa7a..0000000
Binary files a/src/com/gitblit/wicket/resources/file_vs_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/file_world_16x16.png b/src/com/gitblit/wicket/resources/file_world_16x16.png
deleted file mode 100644 (file)
index 0a4fa8b..0000000
Binary files a/src/com/gitblit/wicket/resources/file_world_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/file_zip_16x16.png b/src/com/gitblit/wicket/resources/file_zip_16x16.png
deleted file mode 100644 (file)
index 1584592..0000000
Binary files a/src/com/gitblit/wicket/resources/file_zip_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/folder_16x16.png b/src/com/gitblit/wicket/resources/folder_16x16.png
deleted file mode 100644 (file)
index f1ed9ab..0000000
Binary files a/src/com/gitblit/wicket/resources/folder_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/gitblit.css b/src/com/gitblit/wicket/resources/gitblit.css
deleted file mode 100644 (file)
index 498c1a7..0000000
+++ /dev/null
@@ -1,819 +0,0 @@
-/*\r
- Git:Blit css.\r
-*/\r
-html, body, table, dl, dt, dd, ol, ul, li, form, a, span, tr, th, td, div, em {\r
-       font-family: verdana, sans-serif;\r
-       font-size: 12px;\r
-       line-height: 1.35em;\r
-       margin: 0;\r
-       padding: 0;\r
-       border: 0;\r
-       outline: 0;\r
-}\r
-\r
-body {\r
-       width: 980px;\r
-       margin: 5px;\r
-       background-color: #ffffff;\r
-       color: #000000;\r
-    margin-right: auto;\r
-    margin-left: auto;    \r
-    padding: 0px;\r
-    background: url(background.png) repeat-x scroll 0 0 #FFFFFF;\r
-}\r
-\r
-pre, code, pre.prettyprint, pre.plainprint {\r
-       color: black;\r
-       font-family: monospace;\r
-       font-size:12px;\r
-       border:0px;\r
-}\r
-\r
-pre.prettyprint ol {\r
-       padding-left:25px;\r
-}\r
-\r
-/* age0: age < 60*60*2 */\r
-.age0 {\r
-       color: #008000;\r
-       font-style: italic;\r
-       font-weight: bold;\r
-}\r
-\r
-/* age1: 60*60*2 <= age < 60*60*24*2 */\r
-.age1 {\r
-       color: #008000;\r
-       font-style: italic;\r
-}\r
-\r
-/* age2: 60*60*24*2 <= age */\r
-.age2 {\r
-       font-style: italic;\r
-}\r
-\r
-img.inlineIcon {\r
-       padding-left: 1px;\r
-       padding-right: 1px;\r
-}\r
-\r
-a {\r
-       color: #0000cc;\r
-}\r
-\r
-a:hover, a:visited, a:active {\r
-       color: #880000;\r
-}\r
-\r
-img.logo {\r
-       float: right;\r
-       border-width: 0px;\r
-}\r
-\r
-img.activityGraph {\r
-       float: right;\r
-       border-width: 0px;\r
-       padding: 8px;\r
-}\r
-\r
-div.repositories_message {\r
-       line-height: inherit;\r
-}\r
-\r
-div.header, div.commitHeader {\r
-       background-color: #D2C3AF;\r
-       padding: 3px;\r
-       border: 1px solid #808080;\r
-}\r
-\r
-div.header {\r
-       border-radius: 3px 3px 0 0;\r
-}\r
-\r
-div.commitHeader {\r
-       border-radius: 3px;\r
-}\r
-\r
-div.header a, div.commitHeader a {\r
-       color: black;\r
-       text-decoration: none;\r
-       font-weight: bold;\r
-}\r
-\r
-div.header a:hover, div.commitHeader a:hover {\r
-       text-decoration: underline;\r
-}\r
-\r
-div.pager {\r
-       padding: 0px 0px 15px 5px;\r
-}\r
-\r
-span.empty {\r
-       font-size: 0.9em;\r
-       font-style: italic;\r
-       padding-left:10px;\r
-       color: #008000;\r
-}\r
-\r
-span.link {\r
-       color: #888;\r
-}\r
-\r
-span.link, span.link a {\r
-       font-family: sans-serif;\r
-       font-size: 11px;        \r
-}\r
-\r
-span.link em, div.link span em {\r
-       font-style: normal;\r
-       font-family: sans-serif;\r
-       font-size: 11px;        \r
-}\r
-\r
-div.page_header {\r
-       height: 25px;\r
-       padding: 5px;\r
-       font-family: sans-serif;\r
-       font-weight: bold;\r
-       font-size: 150%;\r
-       color: #888;\r
-       background: transparent;\r
-}\r
-\r
-div.page_header span { \r
-       font-family: inherit;\r
-       font-size: inherit;     \r
-}\r
-\r
-div.page_header a  {\r
-       font-size: inherit;     \r
-       font-family: inherit;\r
-       text-decoration: none;\r
-}\r
-\r
-div.page_header a:visited {\r
-       color: #000000;\r
-}\r
-\r
-div.page_header a:hover {\r
-       color: #E66C2C;\r
-       text-decoration: underline;\r
-}\r
-\r
-div.page_footer {\r
-       clear: both;\r
-       height: 17px;\r
-       color: black;\r
-       background-color: #ffffff;\r
-       padding: 5px;\r
-       border-top: 1px solid #bbb;\r
-       font-style: italic;\r
-}\r
-\r
-div.page_nav {\r
-       color: #ddd;\r
-       background-color: #000070;\r
-       padding: 7px;\r
-       border-radius: 3px;\r
-}\r
-\r
-div.page_nav a {\r
-       color: yellow;\r
-       text-decoration: none;\r
-}\r
-\r
-div.page_nav a:hover { \r
-       text-decoration: underline;\r
-}\r
-\r
-div.page_nav em {\r
-       font-style: normal;\r
-}\r
-\r
-div.page_nav2 {\r
-       padding: 2px 5px 7px 5px;       \r
-}\r
-\r
-div.admin_nav {\r
-       border: 1px solid #888;\r
-       border-bottom: 0px;\r
-       background:#dae0d2;\r
-       text-align: right;\r
-       padding: 5px 5px 5px 2px;       \r
-}\r
-\r
-div.admin_nav a {\r
-       text-decoration: none;\r
-}\r
-\r
-div.admin_nav a:hover {        \r
-       text-decoration: underline;\r
-}\r
-\r
-div.search {\r
-       color:yellow;\r
-       text-align:right;\r
-       float:right;\r
-       padding:4px 4px 3px 3px;\r
-       border-left: 1px solid #8080f0;\r
-       margin: 0px;\r
-       height: 23px;\r
-}\r
-\r
-div.search input {\r
-       vertical-align: top;\r
-       background: url(/com/gitblit/wicket/resources/search-icon.png) no-repeat 4px center;\r
-       color: #ddd;\r
-       background-color: #000070;\r
-       border: 1px solid transparent;\r
-       padding: 2px 2px 2px 22px;\r
-       margin: 0px;\r
-}\r
-\r
-div.search input:hover, div.search input:focus {\r
-       color: white;\r
-       border-bottom: 1px solid orange;        \r
-       outline: none;\r
-}\r
-\r
-div.page_path {\r
-       padding: 8px;\r
-       font-weight: bold;\r
-       border: solid #bbb;\r
-       border-width: 0px 0px 1px;\r
-}\r
-\r
-div.commit_message {\r
-       font-family: monospace;\r
-       padding: 8px;\r
-       border: solid #bbb;\r
-       border-width: 1px 0px 0px;\r
-}\r
-\r
-div.commit_message a {\r
-       font-family: monospace;\r
-}\r
-\r
-div.bug_open, span.bug_open {\r
-       padding: 2px;\r
-       background-color: #803333;\r
-       color: white;   \r
-       text-align: center;\r
-}\r
-\r
-div.bug_resolved, span.bug_resolved {\r
-       padding: 2px;\r
-       background-color: #408040;\r
-       color: white;\r
-       text-align: center;\r
-}\r
-\r
-div.bug_invalid, span.bug_invalid {\r
-       padding: 2px;\r
-       background-color: gray;\r
-       text-align: center;\r
-}\r
-\r
-div.bug_hold, span.bug_hold {\r
-       padding: 2px;\r
-       background-color: orange;\r
-       text-align: center;\r
-}\r
-\r
-div.diff {\r
-       font-family: monospace;\r
-       overflow: auto;\r
-}\r
-\r
-div.diff.header {\r
-       -moz-border-bottom-colors: none;\r
-    -moz-border-image: none;\r
-    -moz-border-left-colors: none;\r
-    -moz-border-right-colors: none;\r
-    -moz-border-top-colors: none;\r
-    background-color: #EDECE6;\r
-    border-color: #D9D8D1;\r
-    border-style: solid;\r
-    border-width: 1px;\r
-    font-weight: bold;\r
-    margin-top: 10px;\r
-    padding: 4px 0 2px;\r
-}\r
-\r
-div.diff.extended_header {\r
-       background-color: #F6F5EE;\r
-    padding: 2px 0;\r
-    font-family: inherit;\r
-}\r
-\r
-span.diff.add {\r
-       color: #008800;\r
-       font-family: inherit;\r
-}\r
-\r
-span.diff.remove {\r
-       color: #FFDDDD;\r
-       font-family: inherit;\r
-}\r
-\r
-span.diff.unchanged {\r
-       color: inherit;\r
-       font-family: inherit;\r
-}\r
-\r
-div.diff.hunk_header {\r
-       -moz-border-bottom-colors: none;\r
-    -moz-border-image: none;\r
-    -moz-border-left-colors: none;\r
-    -moz-border-right-colors: none;\r
-    -moz-border-top-colors: none;\r
-    border-color: #FFE0FF;\r
-    border-style: dotted;\r
-    border-width: 1px 0 0;\r
-    margin-top: 2px;\r
-    font-family: inherit;\r
-}\r
-\r
-span.diff.hunk_info {\r
-       background-color: #FFEEFF;      \r
-       color: #990099;\r
-       font-family: inherit;\r
-}\r
-\r
-span.diff.hunk_section {       \r
-       color: #AA22AA;\r
-       font-family: inherit;\r
-}\r
-\r
-div.diff.add2 {\r
-       background-color: #DDFFDD;\r
-    font-family: inherit;\r
-}\r
-\r
-div.diff.remove2 {\r
-       background-color: #FFDDDD;\r
-    font-family: inherit;\r
-}\r
-\r
-div.diff table {\r
-       border-right: 1px solid #bbb;\r
-       border-bottom: 1px solid #bbb;\r
-       width: 100%;\r
-}\r
-\r
-div.diff table th, div.diff table td {\r
-       margin: 0px;\r
-       padding: 0px;\r
-       font-family: monospace; \r
-}\r
-\r
-div.diff table th {\r
-       background-color: #faf8dc;\r
-       border-left: 1px solid #bbb;    \r
-       text-align: center;\r
-       color: #999;\r
-       padding-left: 5px;\r
-       padding-right: 5px;\r
-       width: 30px;\r
-}\r
-\r
-div.diff table th.header {\r
-       background-color: #D2C3AF;\r
-       border-right: 0px;\r
-       border-bottom: 1px solid #808080;\r
-       font-family: inherit;\r
-       font-size:0.9em;\r
-       color: black;\r
-       padding: 2px;\r
-       text-align: left;\r
-}\r
-\r
-div.diff table td.hunk_header {\r
-       background-color: #dAe2e5 !important;   \r
-       border-bottom: 1px solid #bac2c5;\r
-       color: #555;\r
-}\r
-\r
-div.diff table td {\r
-       border-left: 1px solid #bbb;\r
-       background-color: #fbfbfb;\r
-}\r
-\r
-td.changeType {\r
-       width: 15px;\r
-}\r
-\r
-span.addition, span.modification, span.deletion, span.rename {\r
-       border: 1px solid #888;\r
-       float: left;\r
-       height: 0.8em;\r
-       margin: 0.2em 0.5em 0 0;\r
-       overflow: hidden;\r
-       width: 0.8em;\r
-}\r
-\r
-span.addition {\r
-       background-color: #ccffcc;\r
-}\r
-\r
-span.modification {\r
-       background-color: #ffdd88;\r
-}\r
-\r
-span.deletion {\r
-       background-color: #f8bbbb;\r
-}\r
-\r
-span.rename {\r
-       background-color: #cAc2f5;\r
-}\r
-\r
-div.commitLegend {\r
-       float: right;\r
-       padding: 0.4em 0.4em 0.2em 0.4em;\r
-       vertical-align:top;\r
-       margin: 0px;\r
-}\r
-\r
-div.commitLegend span {\r
-       font-size: 0.9em;\r
-       vertical-align: top;\r
-}\r
-\r
-div.references {\r
-       float: right;\r
-       text-align: right;\r
-}\r
-\r
-a.list {\r
-       text-decoration: none;\r
-       color: #000000;\r
-}\r
-\r
-a.list.subject {\r
-       font-weight: bold;\r
-}\r
-\r
-a.list.name {\r
-       font-weight: bold;      \r
-}\r
-\r
-a.list:hover {\r
-       text-decoration: underline;\r
-       color: #880000;\r
-}\r
-\r
-table {\r
-       border-spacing: 0px;\r
-}\r
-\r
-th {\r
-       padding: 2px 5px;\r
-       font-size: 100%;\r
-       text-align: left;\r
-}\r
-\r
-table.screenshots td {\r
-       text-align: center;\r
-       padding-bottom: 10px;\r
-}\r
-\r
-table.screenshots img {\r
-       border: 1px solid #ccc;\r
-       margin: 5px;\r
-}\r
-\r
-table.plain {\r
-       padding: 8px;\r
-}\r
-\r
-table.plain td {\r
-       white-space: nowrap;\r
-}\r
-\r
-table.plain td.edit {  \r
-       padding: 3px;\r
-}\r
-\r
-table.plain td.editButton {\r
-       padding:0px;\r
-       padding-top: 10px;\r
-}\r
-\r
-table.plain td.edit input {\r
-       margin: 0px;\r
-       outline: 1px solid transparent;\r
-       border: 1px solid #ccc; \r
-       padding-left:5px;\r
-}\r
-\r
-table.plain td.edit input:focus, table.plain td.edit input:hover{\r
-       border: 1px solid orange;\r
-}\r
-\r
-table.pretty, table.comments {\r
-       margin-bottom:5px;\r
-       border-spacing: 0px;\r
-       border-left: 1px solid #bbb;\r
-       border-right: 1px solid #bbb;   \r
-}\r
-\r
-table.pretty, table.comments, table.repositories, table.gitnotes {\r
-       width:100%;\r
-}\r
-\r
-table.pretty td.icon {\r
-       padding: 0px 0px 0px 2px;       \r
-       width: 18px;\r
-}\r
-\r
-table.pretty td.icon img {\r
-       vertical-align: top;\r
-}\r
-\r
-table.pretty td {\r
-       padding: 2px 4px;\r
-}\r
-\r
-table.comments td {\r
-       padding: 4px;\r
-       line-height: 17px;\r
-}\r
-\r
-table.repositories {\r
-       margin-bottom:5px;\r
-       border-spacing: 0px;\r
-}\r
-\r
-table.repositories th {\r
-       background-color:#D2C3AF;\r
-       padding: 4px;\r
-       border-top: 1px solid #808080;\r
-       border-bottom: 1px solid #808080;\r
-}\r
-\r
-table.repositories th.left, table.repositories td.left {\r
-       border-left: 1px solid #808080;\r
-       padding-left: 5px;\r
-}\r
-\r
-table.repositories td.left {\r
-       padding-left: 10px;\r
-}\r
-\r
-table.repositories th.right, table.repositories td.right {\r
-       border-right: 1px solid #808080;\r
-}\r
-\r
-table.repositories td {\r
-       padding: 2px;\r
-}\r
-\r
-table.repositories td.rightAlign {     \r
-       text-align: right;\r
-       border-right: 1px solid #808080;\r
-}      \r
-\r
-table.repositories td.icon img {\r
-       vertical-align: top;\r
-}\r
-\r
-table.repositories th a {\r
-       color:black;/*#ddd;*/\r
-       text-decoration: none;\r
-       font-weight: normal;\r
-}\r
-\r
-table.repositories th a:hover {\r
-       text-decoration: underline;\r
-}\r
-\r
-table.repositories th.wicket_orderDown a, table.repositories th.wicket_orderUp a {\r
-       color: black;\r
-       font-weight: bold;\r
-}\r
-\r
-table.repositories tr.group {\r
-       background-color: #E66C2C;\r
-}\r
-\r
-table.repositories tr.group td {\r
-       font-weight: bold;      \r
-       border-bottom: 1px solid orange;\r
-       color: white;\r
-       background-color: #E66C2C;\r
-       border-left: 1px solid #808080;\r
-       border-right: 1px solid #808080;\r
-       padding-left: 5px;\r
-}\r
-\r
-table.palette { border:0;}\r
-table.palette td.header { \r
-       font-weight: bold; \r
-       background-color: #D2C3AF !important;\r
-       padding: 3px !important;        \r
-       border: 1px solid #808080 !important;\r
-       border-bottom: 0px solid !important;\r
-       border-radius: 3px 3px 0 0;\r
-}\r
-table.palette td.pane {\r
-       padding: 0px;   \r
-}\r
-\r
-table.gitnotes {       \r
-       padding-bottom: 5px;\r
-}\r
-table.gitnotes td {\r
-       border-top: 1px solid #ccc;\r
-       padding-top: 3px;\r
-       vertical-align:top;\r
-}\r
-\r
-table.gitnotes td table td {\r
-       border: none;\r
-       padding-top: 0px;\r
-}\r
-\r
-table.gitnotes td.info {\r
-}\r
-\r
-table.gitnotes td.message {\r
-       width: 65%;\r
-       border-left: 1px solid #ccc;\r
-}\r
-\r
-table.annotated {\r
-       width: 100%;\r
-       border: 1px solid #bbb;\r
-}\r
-\r
-table.annotated tr.even {\r
-       background-color: white;\r
-}\r
-\r
-table.annotated tr.odd {\r
-       background-color: #fdfbdf;\r
-}\r
-\r
-tr th a { padding-right: 15px; background-position: right; background-repeat:no-repeat; }\r
-tr th.wicket_orderDown a {background-image: url(arrow_down.png); }\r
-tr th.wicket_orderUp a { background-image: url(arrow_up.png); }\r
-tr th.wicket_orderNone a { background-image: url(arrow_off.png); }\r
-\r
-tr.light {\r
-       background-color: #ffffff;\r
-}\r
-\r
-tr.light td {\r
-       border-bottom: 1px solid #bbb;  \r
-}\r
-\r
-tr.dark {\r
-       background-color: #faf8dc;\r
-       border-bottom: 1px solid #bbb;  \r
-}\r
-\r
-tr.dark td {\r
-       border-bottom: 1px solid #bbb;  \r
-}\r
-\r
-/* currently both use the same, but it can change */\r
-tr.light:hover,\r
-tr.dark:hover {\r
-       /*background-color: #0099b7;*/\r
-       background-color: #000070;\r
-       color: white;\r
-}\r
-\r
-tr.light:hover a,\r
-tr.dark:hover a {\r
-       color: white;   \r
-}\r
-\r
-td {\r
-       padding-left: 7px;\r
-       padding-right: 7px;\r
-}\r
-\r
-td.author {\r
-       font-style: italic;\r
-}\r
-\r
-td.date {\r
-       font-style: italic;     \r
-}\r
-\r
-span.sha1, span.sha1 a, span.sha1 a span {\r
-       font-family: monospace;\r
-       font-size: 13px;\r
-}\r
-\r
-td.mode {\r
-       text-align: right;\r
-       font-family: monospace;\r
-       width: 8em;\r
-       padding-right:15px;\r
-}\r
-\r
-td.size {\r
-       text-align: right;\r
-       width: 8em;     \r
-       padding-right:15px;\r
-}\r
-\r
-td.rightAlign {\r
-       text-align: right;\r
-}\r
-\r
-td.treeLinks {\r
-       text-align: right;\r
-       width: 13em;\r
-}\r
-\r
-span.metricsTitle {\r
-       font-size: 2em;\r
-}\r
-\r
-span .tagRef, span .headRef, span .localBranch, span .remoteBranch, span .otherRef {   \r
-       padding: 0px 3px;\r
-       margin-right:2px;\r
-       font-family: sans-serif;\r
-       font-size: 9px;\r
-       font-weight: normal;\r
-       border: 1px solid;\r
-       color: black;   \r
-}\r
-\r
-span .tagRef a span, span .headRef a span, span .localBranch a span, span .remoteBranch a span, span .otherRef a span {\r
-       font-size: 9px;\r
-}\r
-\r
-span .tagRef a, span .headRef a, span .localBranch a, span .remoteBranch a, span .otherRef a {\r
-       text-decoration: none;\r
-       color: black !important;\r
-}\r
-\r
-span .tagRef a:hover, span .headRef a:hover, span .localBranch a:hover, span .remoteBranch a:hover, span .otherRef a:hover {\r
-       color: black !important;\r
-       text-decoration: underline;\r
-}\r
-\r
-span .otherRef {\r
-       background-color: #b0e0f0;\r
-       border-color: #80aaaa;  \r
-}\r
-\r
-span .remoteBranch {\r
-       background-color: #cAc2f5;\r
-       border-color: #6c6cbf;\r
-}\r
-\r
-span .tagRef {\r
-       background-color: #ffffaa;\r
-       border-color: #ffcc00;\r
-}\r
-\r
-span .headRef {\r
-       background-color: #ffaaff;\r
-       border-color: #ff00ee;\r
-}\r
-\r
-span .localBranch {\r
-       background-color: #ccffcc;\r
-       border-color: #00cc33;\r
-}\r
-\r
-.feedbackPanelERROR {  \r
-       color: red;\r
-       list-style-image: url(bullet_error.png);\r
-       font-weight: bold;      \r
-       vertical-align: top;\r
-       padding:0;      \r
-       margin:0;       \r
-}\r
-\r
-.feedbackPanelINFO {\r
-       color: green;\r
-       list-style: none;\r
-       font-weight: bold;      \r
-       padding:0;\r
-       margin:0;\r
-}\r
-\r
-/* google-code-prettify line numbers */\r
-li.L0,\r
-li.L1,\r
-li.L2,\r
-li.L3,\r
-li.L4,\r
-li.L5,\r
-li.L6,\r
-li.L7,\r
-li.L8,\r
-li.L9 { color: #888; border-left: 1px solid #ccc; padding-left:5px; list-style-type: decimal !important; }\r
-\r
-/* Alternate shading for lines */\r
-li.L1,\r
-li.L3,\r
-li.L5,\r
-li.L7,\r
-li.L9 { background: #fafafa !important; }
\ No newline at end of file
diff --git a/src/com/gitblit/wicket/resources/gitblt-favicon.png b/src/com/gitblit/wicket/resources/gitblt-favicon.png
deleted file mode 100644 (file)
index f6ac154..0000000
Binary files a/src/com/gitblit/wicket/resources/gitblt-favicon.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/gitblt-logo.png b/src/com/gitblit/wicket/resources/gitblt-logo.png
deleted file mode 100644 (file)
index 7ec945b..0000000
Binary files a/src/com/gitblit/wicket/resources/gitblt-logo.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/gitblt2.png b/src/com/gitblit/wicket/resources/gitblt2.png
deleted file mode 100644 (file)
index c164294..0000000
Binary files a/src/com/gitblit/wicket/resources/gitblt2.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/gitblt_25.png b/src/com/gitblit/wicket/resources/gitblt_25.png
deleted file mode 100644 (file)
index ad580fa..0000000
Binary files a/src/com/gitblit/wicket/resources/gitblt_25.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/gitweb-favicon.png b/src/com/gitblit/wicket/resources/gitweb-favicon.png
deleted file mode 100644 (file)
index de637c0..0000000
Binary files a/src/com/gitblit/wicket/resources/gitweb-favicon.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/lock_16x16.png b/src/com/gitblit/wicket/resources/lock_16x16.png
deleted file mode 100644 (file)
index ddf83d9..0000000
Binary files a/src/com/gitblit/wicket/resources/lock_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/lock_go_16x16.png b/src/com/gitblit/wicket/resources/lock_go_16x16.png
deleted file mode 100644 (file)
index 63d4285..0000000
Binary files a/src/com/gitblit/wicket/resources/lock_go_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/lock_pull_16x16.png b/src/com/gitblit/wicket/resources/lock_pull_16x16.png
deleted file mode 100644 (file)
index 85c5c53..0000000
Binary files a/src/com/gitblit/wicket/resources/lock_pull_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/markdown.css b/src/com/gitblit/wicket/resources/markdown.css
deleted file mode 100644 (file)
index 41bc439..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*\r
- * Git:Blit Markdown CSS definition.\r
- */\r
-\r
-div.markdown {\r
-       line-height: 1.4em;\r
-}\r
-\r
-div.markdown h1,\r
-div.markdown h2, \r
-div.markdown h3, \r
-div.markdown h4, \r
-div.markdown h5, \r
-div.markdown h6 {\r
-    border: 0 none !important;\r
-}\r
-\r
-div.markdown h1 {    \r
-    margin-top: 1em;\r
-    margin-bottom: 0.5em;\r
-    padding-bottom: 0.5em;\r
-    border-bottom: 2px solid #000080 !important;\r
-}\r
-\r
-div.markdown h2 {\r
-    margin-top: 1em;\r
-    margin-bottom: 0.5em;    \r
-    padding-bottom: 0.5em;\r
-       border-bottom: 2px solid #000080 !important;    \r
-}\r
-\r
-div.markdown pre {\r
-       background-color: #f8f8f8;    \r
-    border: 1px solid #2f6fab;\r
-    border-radius: 3px;\r
-    overflow: auto;\r
-    padding: 5px;\r
-}\r
-\r
-div.markdown pre code {\r
-    background-color: inherit;\r
-    border: none;    \r
-    padding: 0;\r
-}\r
-\r
-div.markdown code {\r
-       background-color: #ffffe0;\r
-    border: 1px solid orange;\r
-    border-radius: 3px;\r
-    padding: 0 0.2em;\r
-}\r
-\r
-div.markdown a {\r
-       text-decoration: underline;     \r
-}\r
-\r
-div.markdown ul, div.markdown ol {\r
-       padding-left: 30px;\r
-}\r
-\r
-div.markdown li {\r
-       margin: 0.2em 0 0 0em; padding: 0px;\r
-}\r
-\r
-div.markdown em {\r
-       color: #b05000;\r
-}
\ No newline at end of file
diff --git a/src/com/gitblit/wicket/resources/pixel.png b/src/com/gitblit/wicket/resources/pixel.png
deleted file mode 100644 (file)
index 4d5f6df..0000000
Binary files a/src/com/gitblit/wicket/resources/pixel.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/search-icon.png b/src/com/gitblit/wicket/resources/search-icon.png
deleted file mode 100644 (file)
index 90e8d2c..0000000
Binary files a/src/com/gitblit/wicket/resources/search-icon.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/shield_16x16.png b/src/com/gitblit/wicket/resources/shield_16x16.png
deleted file mode 100644 (file)
index 4eb8031..0000000
Binary files a/src/com/gitblit/wicket/resources/shield_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/tag_16x16.png b/src/com/gitblit/wicket/resources/tag_16x16.png
deleted file mode 100644 (file)
index 7e75cba..0000000
Binary files a/src/com/gitblit/wicket/resources/tag_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/user_16x16.png b/src/com/gitblit/wicket/resources/user_16x16.png
deleted file mode 100644 (file)
index d5edd4d..0000000
Binary files a/src/com/gitblit/wicket/resources/user_16x16.png and /dev/null differ
diff --git a/src/com/gitblit/wicket/resources/welcome.mkd b/src/com/gitblit/wicket/resources/welcome.mkd
deleted file mode 100644 (file)
index 130cd8a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-## Welcome to Gitblit\r
-\r
-A quick and easy way to host or view your own [Git](http://www.git-scm.com) repositories.\r
index 16f12363b4d0a72fe0f683c6aa9b1beedc00881a..dc6dd2b541deb98cf6e29d73eac9bf6f2863bc3f 100644 (file)
@@ -1,12 +1,66 @@
-log4j.debug=false
+#------------------------------------------------------------------------------
+#
+#  The following properties set the logging levels and log appender.  The
+#  log4j.rootCategory variable defines the default log level and one or more
+#  appenders.  For the console, use 'S'.  For the daily rolling file, use 'R'.
+#  For an HTML formatted log, use 'H'.
+#
+#  To override the default (rootCategory) log level, define a property of the
+#  form (see below for available values):
+#
+#        log4j.logger. =
+#
+#    Available logger names:
+#      TODO
+#
+#    Possible Log Levels:
+#      FATAL, ERROR, WARN, INFO, DEBUG
+#
+#------------------------------------------------------------------------------
+log4j.rootCategory=INFO, S
 
-log4j.rootLogger=INFO
-log4j.logger.org=INFO
-log4j.logger.com=INFO
-log4j.logger.net=INFO
+#log4j.rootLogger=INFO
+#log4j.logger.org=INFO
+#log4j.logger.com=INFO
+#log4j.logger.net=INFO
 
-log4j.logger.com.gitblit=DEBUG
+#log4j.logger.com.gitblit=DEBUG
 
 log4j.logger.org.apache.wicket=INFO
 log4j.logger.org.apache.wicket.RequestListenerInterface=WARN
 log4j.logger.org.apache.wicket.protocol.http.HttpSessionStore=WARN
+
+#------------------------------------------------------------------------------
+#
+#  The following properties configure the console (stdout) appender.
+#  See http://logging.apache.org/log4j/docs/api/index.html for details.
+#
+#------------------------------------------------------------------------------
+log4j.appender.S = org.apache.log4j.ConsoleAppender
+log4j.appender.S.layout = org.apache.log4j.PatternLayout
+log4j.appender.S.layout.ConversionPattern = %-5p %m%n
+
+#------------------------------------------------------------------------------
+#
+#  The following properties configure the Daily Rolling File appender.
+#  See http://logging.apache.org/log4j/docs/api/index.html for details.
+#
+#------------------------------------------------------------------------------
+log4j.appender.R = org.apache.log4j.DailyRollingFileAppender
+log4j.appender.R.File = logs/gitblit.log
+log4j.appender.R.Append = true
+log4j.appender.R.DatePattern = '.'yyy-MM-dd
+log4j.appender.R.layout = org.apache.log4j.PatternLayout
+log4j.appender.R.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %c{1} [%p] %m%n
+
+#------------------------------------------------------------------------------
+#
+#  The following properties configure the Rolling File appender in HTML.
+#  See http://logging.apache.org/log4j/docs/api/index.html for details.
+#
+#------------------------------------------------------------------------------
+log4j.appender.H = org.apache.log4j.RollingFileAppender
+log4j.appender.H.File = logs/gitblit.html
+log4j.appender.H.MaxFileSize = 100KB
+log4j.appender.H.Append = false
+log4j.appender.H.layout = org.apache.log4j.HTMLLayout