Rafael Cavazin преди 11 години
родител
ревизия
f66e89662c
променени са 100 файла, в които са добавени 2867 реда и са изтрити 5589 реда
  1. 1
    1
      .checkstyle
  2. 58
    48
      .classpath
  3. 23
    34
      .gitignore
  4. 48
    0
      NOTICE
  5. 6
    1
      README.markdown
  6. 160
    0
      build.moxie
  7. 851
    985
      build.xml
  8. 0
    1
      distrib/authority.cmd
  9. 0
    37
      distrib/gitblit
  10. 0
    1
      distrib/gitblit-stop.cmd
  11. 0
    1
      distrib/gitblit.cmd
  12. 0
    3
      distrib/install-service-centos.sh
  13. 0
    3
      distrib/install-service.sh
  14. 0
    767
      docs/01_setup.mkd
  15. 0
    31
      docs/05_roadmap.mkd
  16. 0
    8
      docs/doc_footer.html
  17. 0
    33
      docs/doc_header.html
  18. 0
    8
      docs/site_footer.html
  19. 0
    51
      docs/site_header.html
  20. 290
    46
      gitblit.iml
  21. 52
    0
      release.template
  22. 920
    0
      releases.moxie
  23. Двоични данни
      resources/arrow_page.png
  24. Двоични данни
      resources/gitblt-favicon.png
  25. 0
    54
      src/com/gitblit/FederationClientLauncher.java
  26. 0
    405
      src/com/gitblit/GitServlet.java
  27. 0
    400
      src/com/gitblit/ServletRequestWrapper.java
  28. 0
    967
      src/com/gitblit/build/Build.java
  29. 0
    259
      src/com/gitblit/build/BuildGhPages.java
  30. 0
    385
      src/com/gitblit/build/BuildSite.java
  31. 0
    162
      src/com/gitblit/build/BuildThumbnails.java
  32. 0
    160
      src/com/gitblit/build/BuildWebXml.java
  33. 0
    344
      src/com/gitblit/utils/PushLogUtils.java
  34. 0
    23
      src/com/gitblit/wicket/pages/ActivityPage.html
  35. 0
    38
      src/com/gitblit/wicket/pages/BlobPage.html
  36. 0
    70
      src/com/gitblit/wicket/pages/ProjectPage.html
  37. 0
    82
      src/com/gitblit/wicket/pages/RepositoryPage.html
  38. 0
    18
      src/com/gitblit/wicket/pages/RootSubPage.html
  39. 0
    2
      src/com/gitblit/wicket/pages/prettify/lang-apollo.js
  40. 0
    2
      src/com/gitblit/wicket/pages/prettify/lang-css.js
  41. 0
    2
      src/com/gitblit/wicket/pages/prettify/lang-hs.js
  42. 0
    2
      src/com/gitblit/wicket/pages/prettify/lang-lisp.js
  43. 0
    2
      src/com/gitblit/wicket/pages/prettify/lang-lua.js
  44. 0
    2
      src/com/gitblit/wicket/pages/prettify/lang-ml.js
  45. 0
    1
      src/com/gitblit/wicket/pages/prettify/lang-proto.js
  46. 0
    2
      src/com/gitblit/wicket/pages/prettify/lang-scala.js
  47. 0
    2
      src/com/gitblit/wicket/pages/prettify/lang-sql.js
  48. 0
    2
      src/com/gitblit/wicket/pages/prettify/lang-vb.js
  49. 0
    3
      src/com/gitblit/wicket/pages/prettify/lang-vhdl.js
  50. 0
    2
      src/com/gitblit/wicket/pages/prettify/lang-wiki.js
  51. 0
    2
      src/com/gitblit/wicket/pages/prettify/lang-yaml.js
  52. 0
    1
      src/com/gitblit/wicket/pages/prettify/prettify.css
  53. 0
    33
      src/com/gitblit/wicket/pages/prettify/prettify.js
  54. 0
    30
      src/com/gitblit/wicket/panels/RepositoryUrlPanel.html
  55. 0
    51
      src/com/gitblit/wicket/panels/RepositoryUrlPanel.java
  56. 0
    0
      src/main/config/checkstyle.xml
  57. 0
    0
      src/main/distrib/data/certs/authority.conf
  58. 0
    0
      src/main/distrib/data/certs/instructions.tmpl
  59. 0
    0
      src/main/distrib/data/certs/mail.tmpl
  60. 81
    0
      src/main/distrib/data/clientapps.json
  61. 12
    0
      src/main/distrib/data/git/project.mkd
  62. 243
    7
      src/main/distrib/data/gitblit.properties
  63. 0
    0
      src/main/distrib/data/groovy/.gitignore
  64. 0
    0
      src/main/distrib/data/groovy/blockpush.groovy
  65. 0
    0
      src/main/distrib/data/groovy/fogbugz.groovy
  66. 0
    0
      src/main/distrib/data/groovy/jenkins.groovy
  67. 0
    0
      src/main/distrib/data/groovy/localclone.groovy
  68. 0
    0
      src/main/distrib/data/groovy/protect-refs.groovy
  69. 1
    1
      src/main/distrib/data/groovy/sendmail-html.groovy
  70. 0
    0
      src/main/distrib/data/groovy/sendmail.groovy
  71. 0
    0
      src/main/distrib/data/groovy/thebuggenie.groovy
  72. 0
    0
      src/main/distrib/data/projects.conf
  73. 0
    0
      src/main/distrib/data/users.conf
  74. 1
    1
      src/main/distrib/federation.properties
  75. 21
    0
      src/main/distrib/linux/add-indexed-branch.sh
  76. 2
    0
      src/main/distrib/linux/authority.sh
  77. 2
    0
      src/main/distrib/linux/gitblit-stop.sh
  78. 2
    0
      src/main/distrib/linux/gitblit.sh
  79. 3
    0
      src/main/distrib/linux/install-service-centos.sh
  80. 3
    0
      src/main/distrib/linux/install-service-ubuntu.sh
  81. 0
    0
      src/main/distrib/linux/java-proxy-config.sh
  82. 0
    0
      src/main/distrib/linux/service-centos.sh
  83. 0
    0
      src/main/distrib/linux/service-ubuntu.sh
  84. 1
    1
      src/main/distrib/win/add-indexed-branch.cmd
  85. 0
    0
      src/main/distrib/win/amd64/gitblit.exe
  86. 1
    0
      src/main/distrib/win/authority.cmd
  87. 1
    0
      src/main/distrib/win/gitblit-stop.cmd
  88. 1
    0
      src/main/distrib/win/gitblit.cmd
  89. 0
    0
      src/main/distrib/win/gitblitw.exe
  90. 0
    0
      src/main/distrib/win/ia64/gitblit.exe
  91. 2
    2
      src/main/distrib/win/installService.cmd
  92. 0
    0
      src/main/distrib/win/uninstallService.cmd
  93. 0
    0
      src/main/distrib/win/x86/gitblit.exe
  94. 1
    0
      src/main/java/.gitignore
  95. 46
    3
      src/main/java/WEB-INF/web.xml
  96. 9
    0
      src/main/java/WEB-INF/weblogic.xml
  97. 0
    0
      src/main/java/com/gitblit/.gitignore
  98. 0
    0
      src/main/java/com/gitblit/AccessRestrictionFilter.java
  99. 25
    7
      src/main/java/com/gitblit/AddIndexedBranch.java
  100. 0
    0
      src/main/java/com/gitblit/AuthenticationFilter.java

+ 1
- 1
.checkstyle Целия файл

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<local-check-config name="Gitblit" location="checkstyle.xml" type="project" description="">
<local-check-config name="Gitblit" location="src/main/config/checkstyle.xml" type="project" description="">
<additional-data name="protect-config-file" value="false"/>
</local-check-config>
<fileset name="all" enabled="true" check-config-name="Gitblit" local="true">

+ 58
- 48
.classpath Целия файл

@@ -1,55 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src" />
<classpathentry kind="src" path="resources" />
<classpathentry kind="src" path="tests" output="bin/test-classes" />
<classpathentry kind="lib" path="ext/jcommander-1.17.jar" sourcepath="ext/src/jcommander-1.17-sources.jar" />
<classpathentry kind="lib" path="ext/log4j-1.2.17.jar" sourcepath="ext/src/log4j-1.2.17-sources.jar" />
<classpathentry kind="lib" path="ext/slf4j-api-1.6.6.jar" sourcepath="ext/src/slf4j-api-1.6.6-sources.jar" />
<classpathentry kind="lib" path="ext/slf4j-log4j12-1.6.6.jar" sourcepath="ext/src/slf4j-log4j12-1.6.6-sources.jar" />
<classpathentry kind="lib" path="ext/mail-1.4.3.jar" sourcepath="ext/src/mail-1.4.3-sources.jar" />
<classpathentry kind="lib" path="ext/javax.servlet-api-3.0.1.jar" sourcepath="ext/src/javax.servlet-api-3.0.1-sources.jar" />
<classpathentry kind="lib" path="ext/jetty-webapp-7.6.8.v20121106.jar" sourcepath="ext/src/jetty-webapp-7.6.8.v20121106-sources.jar" />
<classpathentry kind="lib" path="ext/jetty-ajp-7.6.8.v20121106.jar" sourcepath="ext/src/jetty-ajp-7.6.8.v20121106-sources.jar" />
<classpathentry kind="lib" path="ext/wicket-1.4.21.jar" sourcepath="ext/src/wicket-1.4.21-sources.jar" />
<classpathentry kind="lib" path="ext/wicket-auth-roles-1.4.21.jar" sourcepath="ext/src/wicket-auth-roles-1.4.21-sources.jar" />
<classpathentry kind="lib" path="ext/wicket-extensions-1.4.21.jar" sourcepath="ext/src/wicket-extensions-1.4.21-sources.jar" />
<classpathentry kind="lib" path="ext/googlecharts-1.4.21.jar" sourcepath="ext/src/googlecharts-1.4.21-sources.jar" />
<classpathentry kind="lib" path="ext/lucene-core-3.6.1.jar" sourcepath="ext/src/lucene-core-3.6.1-sources.jar" />
<classpathentry kind="lib" path="ext/lucene-highlighter-3.6.1.jar" sourcepath="ext/src/lucene-highlighter-3.6.1-sources.jar" />
<classpathentry kind="lib" path="ext/lucene-memory-3.6.1.jar" sourcepath="ext/src/lucene-memory-3.6.1-sources.jar" />
<classpathentry kind="lib" path="ext/lucene-queries-3.6.1.jar" sourcepath="ext/src/lucene-queries-3.6.1-sources.jar" />
<classpathentry kind="src" path="src/main/java" />
<classpathentry kind="src" path="src/test/java" output="bin/test-classes" />
<classpathentry kind="src" path="src/main/resources" />
<classpathentry kind="lib" path="ext/jcommander-1.17.jar" sourcepath="ext/src/jcommander-1.17.jar" />
<classpathentry kind="lib" path="ext/log4j-1.2.17.jar" sourcepath="ext/src/log4j-1.2.17.jar" />
<classpathentry kind="lib" path="ext/slf4j-api-1.6.6.jar" sourcepath="ext/src/slf4j-api-1.6.6.jar" />
<classpathentry kind="lib" path="ext/slf4j-log4j12-1.6.6.jar" sourcepath="ext/src/slf4j-log4j12-1.6.6.jar" />
<classpathentry kind="lib" path="ext/mail-1.4.3.jar" sourcepath="ext/src/mail-1.4.3.jar" />
<classpathentry kind="lib" path="ext/javax.servlet-api-3.0.1.jar" sourcepath="ext/src/javax.servlet-api-3.0.1.jar" />
<classpathentry kind="lib" path="ext/jetty-webapp-7.6.8.v20121106.jar" sourcepath="ext/src/jetty-webapp-7.6.8.v20121106.jar" />
<classpathentry kind="lib" path="ext/jetty-ajp-7.6.8.v20121106.jar" sourcepath="ext/src/jetty-ajp-7.6.8.v20121106.jar" />
<classpathentry kind="lib" path="ext/wicket-1.4.21.jar" sourcepath="ext/src/wicket-1.4.21.jar" />
<classpathentry kind="lib" path="ext/wicket-auth-roles-1.4.21.jar" sourcepath="ext/src/wicket-auth-roles-1.4.21.jar" />
<classpathentry kind="lib" path="ext/wicket-extensions-1.4.21.jar" sourcepath="ext/src/wicket-extensions-1.4.21.jar" />
<classpathentry kind="lib" path="ext/googlecharts-1.4.21.jar" sourcepath="ext/src/googlecharts-1.4.21.jar" />
<classpathentry kind="lib" path="ext/lucene-core-3.6.1.jar" sourcepath="ext/src/lucene-core-3.6.1.jar" />
<classpathentry kind="lib" path="ext/lucene-highlighter-3.6.1.jar" sourcepath="ext/src/lucene-highlighter-3.6.1.jar" />
<classpathentry kind="lib" path="ext/lucene-memory-3.6.1.jar" sourcepath="ext/src/lucene-memory-3.6.1.jar" />
<classpathentry kind="lib" path="ext/lucene-queries-3.6.1.jar" sourcepath="ext/src/lucene-queries-3.6.1.jar" />
<classpathentry kind="lib" path="ext/jakarta-regexp-1.4.jar" />
<classpathentry kind="lib" path="ext/markdownpapers-core-1.3.2.jar" sourcepath="ext/src/markdownpapers-core-1.3.2-sources.jar" />
<classpathentry kind="lib" path="ext/org.eclipse.jgit-2.2.0.201212191850-r.jar" sourcepath="ext/src/org.eclipse.jgit-2.2.0.201212191850-r-sources.jar" />
<classpathentry kind="lib" path="ext/jsch-0.1.44-1.jar" sourcepath="ext/src/jsch-0.1.44-1-sources.jar" />
<classpathentry kind="lib" path="ext/org.eclipse.jgit.http.server-2.2.0.201212191850-r.jar" sourcepath="ext/src/org.eclipse.jgit.http.server-2.2.0.201212191850-r-sources.jar" />
<classpathentry kind="lib" path="ext/bcprov-jdk15on-1.47.jar" sourcepath="ext/src/bcprov-jdk15on-1.47-sources.jar" />
<classpathentry kind="lib" path="ext/bcmail-jdk15on-1.47.jar" sourcepath="ext/src/bcmail-jdk15on-1.47-sources.jar" />
<classpathentry kind="lib" path="ext/bcpkix-jdk15on-1.47.jar" sourcepath="ext/src/bcpkix-jdk15on-1.47-sources.jar" />
<classpathentry kind="lib" path="ext/rome-0.9.jar" sourcepath="ext/src/rome-0.9-sources.jar" />
<classpathentry kind="lib" path="ext/jdom-1.0.jar" sourcepath="ext/src/jdom-1.0-sources.jar" />
<classpathentry kind="lib" path="ext/gson-1.7.2.jar" sourcepath="ext/src/gson-1.7.2-sources.jar" />
<classpathentry kind="lib" path="ext/groovy-all-1.8.8.jar" sourcepath="ext/src/groovy-all-1.8.8-sources.jar" />
<classpathentry kind="lib" path="ext/unboundid-ldapsdk-2.3.0.jar" sourcepath="ext/src/unboundid-ldapsdk-2.3.0-sources.jar" />
<classpathentry kind="lib" path="ext/ivy-2.2.0.jar" sourcepath="ext/src/ivy-2.2.0-sources.jar" />
<classpathentry kind="lib" path="ext/markdownpapers-core-1.3.2.jar" sourcepath="ext/src/markdownpapers-core-1.3.2.jar" />
<classpathentry kind="lib" path="ext/org.eclipse.jgit-3.0.0.201306101825-r.jar" sourcepath="ext/src/org.eclipse.jgit-3.0.0.201306101825-r.jar" />
<classpathentry kind="lib" path="ext/jsch-0.1.46.jar" sourcepath="ext/src/jsch-0.1.46.jar" />
<classpathentry kind="lib" path="ext/JavaEWAH-0.5.6.jar" sourcepath="ext/src/JavaEWAH-0.5.6.jar" />
<classpathentry kind="lib" path="ext/org.eclipse.jgit.http.server-3.0.0.201306101825-r.jar" sourcepath="ext/src/org.eclipse.jgit.http.server-3.0.0.201306101825-r.jar" />
<classpathentry kind="lib" path="ext/bcprov-jdk15on-1.47.jar" sourcepath="ext/src/bcprov-jdk15on-1.47.jar" />
<classpathentry kind="lib" path="ext/bcmail-jdk15on-1.47.jar" sourcepath="ext/src/bcmail-jdk15on-1.47.jar" />
<classpathentry kind="lib" path="ext/bcpkix-jdk15on-1.47.jar" sourcepath="ext/src/bcpkix-jdk15on-1.47.jar" />
<classpathentry kind="lib" path="ext/rome-0.9.jar" sourcepath="ext/src/rome-0.9.jar" />
<classpathentry kind="lib" path="ext/jdom-1.0.jar" sourcepath="ext/src/jdom-1.0.jar" />
<classpathentry kind="lib" path="ext/gson-1.7.2.jar" sourcepath="ext/src/gson-1.7.2.jar" />
<classpathentry kind="lib" path="ext/groovy-all-1.8.8.jar" sourcepath="ext/src/groovy-all-1.8.8.jar" />
<classpathentry kind="lib" path="ext/unboundid-ldapsdk-2.3.0.jar" sourcepath="ext/src/unboundid-ldapsdk-2.3.0.jar" />
<classpathentry kind="lib" path="ext/ivy-2.2.0.jar" sourcepath="ext/src/ivy-2.2.0.jar" />
<classpathentry kind="lib" path="ext/jcalendar-1.3.2.jar" />
<classpathentry kind="lib" path="ext/commons-compress-1.4.1.jar" sourcepath="ext/src/commons-compress-1.4.1-sources.jar" />
<classpathentry kind="lib" path="ext/xz-1.0.jar" sourcepath="ext/src/xz-1.0-sources.jar" />
<classpathentry kind="lib" path="ext/junit-4.10.jar" sourcepath="ext/src/junit-4.10-sources.jar" />
<classpathentry kind="lib" path="ext/hamcrest-core-1.1.jar" />
<classpathentry kind="lib" path="ext/seleniumhq/selenium-java-2.28.0.jar"/>
<classpathentry kind="lib" path="ext/seleniumhq/selenium-api-2.28.0.jar"/>
<classpathentry kind="lib" path="ext/seleniumhq/selenium-remote-driver-2.28.0.jar"/>
<classpathentry kind="lib" path="ext/seleniumhq/selenium-support-2.28.0.jar"/>
<classpathentry kind="lib" path="ext/seleniumhq/guava-12.0.jar"/>
<classpathentry kind="lib" path="ext/seleniumhq/json-20080701.jar"/>
<classpathentry kind="lib" path="ext/seleniumhq/commons-exec-1.1.jar"/>
<classpathentry kind="lib" path="ext/seleniumhq/httpcore-4.2.1.jar"/>
<classpathentry kind="lib" path="ext/seleniumhq/httpmime-4.2.1.jar"/>
<classpathentry kind="lib" path="ext/seleniumhq/httpclient-4.2.1.jar"/>
<classpathentry kind="lib" path="ext/seleniumhq/commons-logging-1.1.1.jar"/>
<classpathentry kind="lib" path="ext/seleniumhq/selenium-firefox-driver-2.28.0.jar"/>
<classpathentry kind="lib" path="ext/commons-compress-1.4.1.jar" sourcepath="ext/src/commons-compress-1.4.1.jar" />
<classpathentry kind="lib" path="ext/xz-1.0.jar" sourcepath="ext/src/xz-1.0.jar" />
<classpathentry kind="lib" path="ext/force-partner-api-24.0.0.jar" sourcepath="ext/src/force-partner-api-24.0.0.jar" />
<classpathentry kind="lib" path="ext/force-wsc-24.0.0.jar" sourcepath="ext/src/force-wsc-24.0.0.jar" />
<classpathentry kind="lib" path="ext/js-1.7R2.jar" sourcepath="ext/src/js-1.7R2.jar" />
<classpathentry kind="lib" path="ext/freemarker-2.3.19.jar" sourcepath="ext/src/freemarker-2.3.19.jar" />
<classpathentry kind="lib" path="ext/waffle-jna-1.5.jar" sourcepath="ext/src/waffle-jna-1.5.jar" />
<classpathentry kind="lib" path="ext/platform-3.5.0.jar" sourcepath="ext/src/platform-3.5.0.jar" />
<classpathentry kind="lib" path="ext/jna-3.5.0.jar" sourcepath="ext/src/jna-3.5.0.jar" />
<classpathentry kind="lib" path="ext/guava-13.0.1.jar" sourcepath="ext/src/guava-13.0.1.jar" />
<classpathentry kind="lib" path="ext/junit-4.11.jar" sourcepath="ext/src/junit-4.11.jar" />
<classpathentry kind="lib" path="ext/hamcrest-core-1.3.jar" sourcepath="ext/src/hamcrest-core-1.3.jar" />
<classpathentry kind="lib" path="ext/selenium-java-2.28.0.jar" sourcepath="ext/src/selenium-java-2.28.0.jar" />
<classpathentry kind="lib" path="ext/selenium-support-2.28.0.jar" sourcepath="ext/src/selenium-support-2.28.0.jar" />
<classpathentry kind="lib" path="ext/selenium-firefox-driver-2.28.0.jar" sourcepath="ext/src/selenium-firefox-driver-2.28.0.jar" />
<classpathentry kind="lib" path="ext/selenium-remote-driver-2.28.0.jar" sourcepath="ext/src/selenium-remote-driver-2.28.0.jar" />
<classpathentry kind="lib" path="ext/cglib-nodep-2.1_3.jar" sourcepath="ext/src/cglib-nodep-2.1_3.jar" />
<classpathentry kind="lib" path="ext/json-20080701.jar" sourcepath="ext/src/json-20080701.jar" />
<classpathentry kind="lib" path="ext/selenium-api-2.28.0.jar" sourcepath="ext/src/selenium-api-2.28.0.jar" />
<classpathentry kind="lib" path="ext/httpclient-4.2.1.jar" sourcepath="ext/src/httpclient-4.2.1.jar" />
<classpathentry kind="lib" path="ext/httpcore-4.2.1.jar" sourcepath="ext/src/httpcore-4.2.1.jar" />
<classpathentry kind="lib" path="ext/commons-logging-1.1.1.jar" sourcepath="ext/src/commons-logging-1.1.1.jar" />
<classpathentry kind="lib" path="ext/commons-codec-1.6.jar" sourcepath="ext/src/commons-codec-1.6.jar" />
<classpathentry kind="lib" path="ext/commons-exec-1.1.jar" sourcepath="ext/src/commons-exec-1.1.jar" />
<classpathentry kind="lib" path="ext/commons-io-2.2.jar" sourcepath="ext/src/commons-io-2.2.jar" />
<classpathentry kind="output" path="bin/classes" />
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" />
</classpath>

+ 23
- 34
.gitignore Целия файл

@@ -1,35 +1,24 @@
/temp
/lib
/ext
/build
/keystore
/*.zip
/gitblit.properties
/users.properties
/site
/git
/target
/build.properties
/war
/*.war
/proposals
/*.jar
/federation.properties
/mailtest.properties
/.settings/*.prefs
/src/WEB-INF/reference.properties
/bin/
/.settings/
/javadoc
/express
/build-demo.xml
/users.conf
*.directory
/.gradle
/projects.conf
/pom.xml
/deploy
/*.jks
/x509test
/certs
/temp
/lib
/ext
/build
/site
/git
/build.properties
/federation.properties
/mailtest.properties
/test-users.conf
/.settings/
/src/main/java/reference.properties
/src/main/java/WEB-INF/reference.properties
/bin/
/build-demo.xml
*.directory
/.gradle
/pom.xml
/x509test
/data
/*.conf
/build-next.xml
/*.ps1
/*.sh

+ 48
- 0
NOTICE Целия файл

@@ -255,3 +255,51 @@ XZ for Java
http://tukaani.org/xz/java.html
---------------------------------------------------------------------------
Iconic
---------------------------------------------------------------------------
Iconic, release under the
Creative Commons Share Alike 3.0 License.
http://somerandomdude.com/work/iconic
---------------------------------------------------------------------------
AngularJS
---------------------------------------------------------------------------
AngularJS, release under the
MIT License.
http://angularjs.org/
---------------------------------------------------------------------------
FreeMarker
---------------------------------------------------------------------------
FreeMarker, release under a
modified BSD License. (http://www.freemarker.org/docs/app_license.html)
http://www.freemarker.org/
---------------------------------------------------------------------------
Waffle
---------------------------------------------------------------------------
Waffle, release under the
Eclipse Public License, version 1.0
http://dblock.github.io/waffle
---------------------------------------------------------------------------
JNA
---------------------------------------------------------------------------
JNA, release under the
Lesser GNU Public License, version 2.1
https://github.com/twall/jna
---------------------------------------------------------------------------
Guava
---------------------------------------------------------------------------
Guava, release under the
Apache License 2.0.
https://code.google.com/p/guava-libraries

+ 6
- 1
README.markdown Целия файл

@@ -32,4 +32,9 @@ Building Gitblit
3. Select your gitblit project root and **Refresh** the project, this should correct all build problems.
4. Using JUnit, execute the `com.gitblit.tests.GitBlitSuite` test suite.<br/>
*This will clone some repositories from the web and run through the unit tests.*
5. Execute the *com.gitblit.Launcher* class to start Gitblit.
5. Execute the *com.gitblit.GitBlitServer* class to start Gitblit GO.
Building Tips & Tricks
----------------------
1. If you are running Ant from an ANSI-capable console, consider setting the `MX_COLOR` ennvironment variable before executing Ant.<pre>set MX_COLOR=true</pre>
2. The build script will honor your Maven proxy settings. If you need to fine-tune this, please review the [settings.moxie](http://gitblit.github.io/moxie/settings.html) documentation.

+ 160
- 0
build.moxie Целия файл

@@ -0,0 +1,160 @@
#
# Gitblit project descriptor
#

# Specify minimum Moxie version required to build
requires: 0.7.4

# Project Metadata
name: Gitblit
description: pure Java Git solution
groupId: com.gitblit
artifactId: gitblit
version: 1.3.1-SNAPSHOT
inceptionYear: 2011

# Current stable release
releaseVersion: 1.3.0
releaseDate: 2013-07-14

# Project urls
url: 'http://gitblit.com'
issuesUrl: 'http://code.google.com/p/gitblit/issues/list'
socialNetworkUrl: 'https://plus.google.com/114464678392593421684'
forumUrl: 'http://groups.google.com/group/gitblit'

# Licenses section included for POM generation
licenses:
- {
name: Apache ASL v2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
}

# Developers section included for POM generation
developers:
- {
id: james
name: James Moger
url: 'https://plus.google.com/u/0/116428776452027956920'
organization: VAS
organizationUrl: 'http://www.vas.com'
roles: developer
}

# SCM section included for POM generation
scm: {
connection: 'scm:git:git://github.com/gitblit/gitblit.git'
developerConnection: 'scm:git:https://github.com/gitblit/gitblit.git'
url: 'https://github.com/gitblit/gitblit'
tag: HEAD
}

# Mainclass is used for setting jar manifests and using the mx:run target
mainclass: com.gitblit.GitBlitServer

# Moxie supports multiple source directories and allows you to assign
# a scope to each directory.
sourceDirectories:
- compile 'src/main/java'
- test 'src/test/java'
# Moxie supports one site-scoped directory for mx:doc
- site 'src/site'

resourceDirectories:
- compile 'src/main/resources'
- site 'src/site/resources'

# compile for Java 6 class format
tasks: {
'mx:javac' : {
source: 1.6
target: 1.6
compiler: javac1.6
encoding: UTF-8
# stop complaints about bootstrap classpath when compiling with Java 7
compilerArgs: '-Xlint:-options'
}
}

# Generate Eclipse project files.
# Generate IntelliJ IDEA module files.
# Generate a distribution Maven POM (not suitable for building with Maven).
apply: eclipse, intellij, pom

# Copy all retrieved dependencies to the "ext" directory.
# Generated IDE settings (.classpath, etc) will use the artifacts
# from this project-relative directory. This allows the IDE settings
# to be version-controlled and shared.
dependencyDirectory: ext

# Register the Eclipse JGit Maven repositories
registeredRepositories:
- { id: jgit, url: 'http://download.eclipse.org/jgit/maven' }
- { id: jgit-snapshots, url: 'https://repo.eclipse.org/content/groups/snapshots' }

# Source all dependencies from the following repositories in the specified order
repositories: central, jgit-snapshots, jgit

# Convenience properties for dependencies
properties: {
jetty.version : 7.6.8.v20121106
wicket.version : 1.4.21
lucene.version : 3.6.1
jgit.version : 3.0.0.201306101825-r
groovy.version : 1.8.8
bouncycastle.version : 1.47
selenium.version : 2.28.0
}

# Dependencies
#
# May be tagged with ":label" notation to group dependencies.
#
# "@extension" fetches the artifact with the specified extension
# and ignores all transitive dependencies.
#
# "!groupId" or "!groupId:artifactId" excludes all matching transitive
# dependencies in that dependency's dependency graph.
#

dependencies:
# Standard dependencies
- compile 'com.beust:jcommander:1.17' :fedclient :authority
- compile 'log4j:log4j:1.2.17' :war :fedclient :authority
- compile 'org.slf4j:slf4j-api:1.6.6' :war :fedclient :authority
- compile 'org.slf4j:slf4j-log4j12:1.6.6' :war :fedclient :authority
- compile 'javax.mail:mail:1.4.3' :war :fedclient :authority
- compile 'javax.servlet:javax.servlet-api:3.0.1' :fedclient
- compile 'org.eclipse.jetty.aggregate:jetty-webapp:${jetty.version}' @jar
- compile 'org.eclipse.jetty:jetty-ajp:${jetty.version}' @jar
- compile 'org.apache.wicket:wicket:${wicket.version}' :war !org.mockito
- compile 'org.apache.wicket:wicket-auth-roles:${wicket.version}' :war !org.mockito
- compile 'org.apache.wicket:wicket-extensions:${wicket.version}' :war !org.mockito
- compile 'org.wicketstuff:googlecharts:${wicket.version}' :war
- compile 'org.apache.lucene:lucene-core:${lucene.version}' :war :fedclient
- compile 'org.apache.lucene:lucene-highlighter:${lucene.version}' :war :fedclient
- compile 'org.apache.lucene:lucene-memory:${lucene.version}' :war :fedclient
- compile 'org.tautua.markdownpapers:markdownpapers-core:1.3.2' :war
- compile 'org.eclipse.jgit:org.eclipse.jgit:${jgit.version}' :war :fedclient :manager :authority
- compile 'org.eclipse.jgit:org.eclipse.jgit.http.server:${jgit.version}' :war :fedclient :manager :authority
- compile 'org.bouncycastle:bcprov-jdk15on:${bouncycastle.version}' :war :authority
- compile 'org.bouncycastle:bcmail-jdk15on:${bouncycastle.version}' :war :authority
- compile 'org.bouncycastle:bcpkix-jdk15on:${bouncycastle.version}' :war :authority
- compile 'rome:rome:0.9' :war :manager :api
- compile 'com.google.code.gson:gson:1.7.2' :war :fedclient :manager :api
- compile 'org.codehaus.groovy:groovy-all:${groovy.version}' :war
- compile 'com.unboundid:unboundid-ldapsdk:2.3.0' :war
- compile 'org.apache.ivy:ivy:2.2.0' :war
- compile 'com.toedter:jcalendar:1.3.2' :authority
- compile 'org.apache.commons:commons-compress:1.4.1' :war
- compile 'com.force.api:force-partner-api:24.0.0' :war
- compile 'org.freemarker:freemarker:2.3.19' :war
- compile 'com.github.dblock.waffle:waffle-jna:1.5' :war
- test 'junit'
# Dependencies for Selenium web page testing
- test 'org.seleniumhq.selenium:selenium-java:${selenium.version}' @jar
- test 'org.seleniumhq.selenium:selenium-support:${selenium.version}' @jar
- test 'org.seleniumhq.selenium:selenium-firefox-driver:${selenium.version}'
# Dependencies with the "build" scope are retrieved
# and injected into the Ant runtime classpath
- build 'jacoco'

+ 851
- 985
build.xml
Файловите разлики са ограничени, защото са твърде много
Целия файл


+ 0
- 1
distrib/authority.cmd Целия файл

@@ -1 +0,0 @@
@java -jar authority.jar --baseFolder data

+ 0
- 37
distrib/gitblit Целия файл

@@ -1,37 +0,0 @@
#!/bin/sh

set -e

GITBLIT_PATH=/opt/gitblit
GITBLIT_BASE_FOLDER=/opt/gitblit/data
GITBLIT_HTTP_PORT=0
GITBLIT_HTTPS_PORT=8443
source ${GITBLIT_PATH}/java-proxy-config.sh
JAVA="java -server -Xmx1024M ${JAVA_PROXY_CONFIG} -Djava.awt.headless=true -jar"

. /lib/lsb/init-functions

case "$1" in
start)
log_action_begin_msg "Starting gitblit server"
cd $GITBLIT_PATH
$JAVA $GITBLIT_PATH/gitblit.jar --httpsPort $GITBLIT_HTTPS_PORT --httpPort $GITBLIT_HTTP_PORT --baseFolder $GITBLIT_BASE_FOLDER > /dev/null &
log_action_end_msg $?
;;
stop)
log_action_begin_msg "Stopping gitblit server"
cd $GITBLIT_PATH
$JAVA $GITBLIT_PATH/gitblit.jar --baseFolder $GITBLIT_BASE_FOLDER --stop > /dev/null &
log_action_end_msg $?
;;
force-reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/gitblit {start|stop|restart|force-reload}"
exit 1
;;
esac

exit 0

+ 0
- 1
distrib/gitblit-stop.cmd Целия файл

@@ -1 +0,0 @@
@java -jar gitblit.jar --stop --baseFolder data

+ 0
- 1
distrib/gitblit.cmd Целия файл

@@ -1 +0,0 @@
@java -jar gitblit.jar --baseFolder data

+ 0
- 3
distrib/install-service-centos.sh Целия файл

@@ -1,3 +0,0 @@
cp gitblit-centos /etc/init.d/gitblit
chmod +x /etc/init.d/gitblit
sudo chkconfig --add gitblit

+ 0
- 3
distrib/install-service.sh Целия файл

@@ -1,3 +0,0 @@
cp gitblit /etc/init.d/
chmod +x /etc/init.d/gitblit
sudo update-rc.d gitblit defaults

+ 0
- 767
docs/01_setup.mkd Целия файл

@@ -1,767 +0,0 @@
## Gitblit WAR Installation & Setup
1. Download [Gitblit WAR %VERSION%](http://code.google.com/p/gitblit/downloads/detail?name=%WAR%) to the webapps folder of your servlet container.
2. You may have to manually extract the WAR (zip file) to a folder within your webapps folder.
3. By default, the Gitblit webapp is configured through `WEB-INF/data/gitblit.properties`.<br/>
Open `WEB-INF/data/gitblit.properties` in your favorite text editor and make sure to review and set:
- &lt;context-parameter&gt; *git.packedGitLimit* (set larger than the size of your largest repository)
- &lt;context-parameter&gt; *git.streamFileThreshold* (set larger than the size of your largest committed file)
4. You may have to restart your servlet container.
5. Open your browser to <http://localhost/gitblit> or whatever the url should be.
6. Enter the default administrator credentials: **admin / admin** and click the *Login* button
**NOTE:** Make sure to change the administrator username and/or password!!
### WAR Data Location
By default, Gitblit WAR stores all data (users, settings, repositories, etc) in `${contextFolder}/WEB-INF/data`. This is fine for a quick setup, but there are many reasons why you don't want to keep your data within the webapps folder of your servlet container. You may specify an external location for your data by editing `WEB-INF/web.xml` and manipulating the *baseFolder* context parameter. Choose a location that is writeable by your servlet container. Your servlet container may be smart enough to recognize the change and to restart Gitblit.
On the next restart of Gitblit, Gitblit will copy the contents of the `WEB-INF/data` folder to your specified *baseFolder* **IF** the file `${baseFolder}/gitblit.properties` does not already exist. This allows you to get going with minimal fuss.
Specifying an alternate *baseFolder* also allows for simpler upgrades in the future.
## Gitblit GO Installation & Setup
1. Download and unzip [Gitblit GO %VERSION%](http://code.google.com/p/gitblit/downloads/detail?name=%GO%).
*Its best to eliminate spaces in the path name.*
2. The server itself is configured through a simple text file.<br/>
Open `data/gitblit.properties` in your favorite text editor and make sure to review and set:
- *server.httpPort* and *server.httpsPort*
- *server.httpBindInterface* and *server.httpsBindInterface*
- *server.storePassword*
**https** is strongly recommended because passwords are insecurely transmitted form your browser/git client using Basic authentication!
- *git.packedGitLimit* (set larger than the size of your largest repository)
- *git.streamFileThreshold* (set larger than the size of your largest committed file)
3. Execute `authority.cmd` or `java -jar authority.jar --baseFolder data` from a command-line
1. fill out the fields in the *new certificate defaults* dialog
2. enter the store password used in *server.storePassword* when prompted. This generates an SSL certificate for **localhost**.
3. you may want to generate an SSL certificate for the hostname or ip address hostnames you are serving from<br/>**NOTE:** You can only have **one** SSL certificate specified for a port.
5. exit the authority app
4. Execute `gitblit.cmd` or `java -jar gitblit.jar --baseFolder data` from a command-line
5. Open your browser to <http://localhost:8080> or <https://localhost:8443> depending on your chosen configuration.
6. Enter the default administrator credentials: **admin / admin** and click the *Login* button
**NOTE:** Make sure to change the administrator username and/or password!!
### GO Data Location
By default, Gitblit GO stores all data (users, settings, repositories, etc) in the `data` subfolder of your GO installation. You may specify an external location for your data on the command-line by setting the *--baseFolder* argument. If you relocate the data folder then you must supply the *--baseFolder* argument to both GO and the Certificate Authority.
If you are deploying Gitblit to a *nix platform, you might consider moving the data folder out of the GO installation folder and then creating a symlink named "data" that points to your moved folder.
### Creating your own Self-Signed SSL Certificate
Gitblit GO (and Gitblit Certificate Authority) automatically generates a Certificate Authority (CA) certificate and an ssl certificate signed by this CA certificate that is bound to *localhost*.
Remote Eclipse/EGit/JGit clients (<= 2.2.0) will fail to communicate using this certificate because JGit always verifies the hostname of the certificate, regardless of the *http.sslVerify=false* client-side setting.
The EGit failure message is something like:
Cannot get remote repository refs.
Reason: https:/myserver.com/git/myrepo.git: cannot open git-upload-pack
If you want to serve your repositories to another machine over https then you will want to generate a new certificate for the hostname or ip address you are serving from.
1. `authority.cmd` or `java -jar authority.jar --baseFolder data`
2. Click the *new ssl certificate* button (red rosette in the toolbar in upper left of window)
3. Enter the hostname or ip address
4. Make sure the checkbox *serve https with this certificate* is checked
5. In the keystore password prompt, enter the *server.storePassword* password
If you decide to change the value of *server.storePassword* (recommended) <u>after</u> you have already started Gitblit or Gitblit Certificate Authority, then you will have to delete the following files and then restart the Gitblit Certificate Authority app:
1. data/serverKeyStore.jks
2. data/serverTrustStore.jks
3. data/certs/caKeyStore.jks
4. data/certs/ca.crt
5. data/certs/caRevocationList.crl (optional)
### Client SSL Certificates
SINCE 1.2.0
Gitblit supports X509 certificate authentication. This authentication method relies on your servlet container to validate/verify/trust your client certificate and can be used by your browser and your git client.
All X509 certificates have a *distinguished name (DN)* which is a signature of several fields like:
C=US,O=Gitblit,OU=Gitblit,CN=james
Gitblit must be able to map the DN of the certificate to an *existing* account username. The default mapping is to extract the *common name (CN)* value from the DN and use that as the account name. If the CN is a valid account, then the user is authenticated. The servlet container which runs Gitblit validates, verifies, and trusts the certificate passed to Gitblit. If you need to specify an alternative DN mapping you may do so with the *git.certificateUsernameOIDs* setting, but this mapping must be matched to the user account name.
How do you make your servlet container trust a client certificate?
In the WAR variant, you will have to manually setup your servlet container to:
1. want/need client certificates
2. trust a CA certificate used to sign your client certificates
3. generate client certificates signed by your CA certificate
Alternatively, Gitblit GO is designed to facilitate use of client certificate authentication. Gitblit GO ships with a tool that simplifies creation and management of client certificates, Gitblit Certificate Authority.
#### Creating SSL Certificates with Gitblit Certificate Authority
When you generate a new client certificate, a zip file bundle is created which includes a P12 keystore for browsers and a PEM keystore for Git. Both of these are password-protected. Additionally, a personalized README file is generated with setup instructions for popular browsers and Git. The README is generated from `data\certs\instructions.tmpl` and can be modified to suit your needs.
1. `authority.cmd` or `java -jar authority.jar --baseFolder data`
2. Select the user for which to generate the certificate
3. Click the *new certificate* button and enter the expiration date of the certificate. You must also enter a password for the generated keystore. This password is *not* the same as the user's login password. This password is used to protect the privatekey and public certificate you will generate for the selected user. You must also enter a password hint for the user.
4. If your mail server settings are properly configured you will have a *send email* checkbox which you can use to immediately send the generated certificate bundle to the user.
#### Certificate Inspection and Advanced Troubleshooting
X509 certificates can be confusing and tricky even with the simplified Gitblit Certificate Authority tool. If you find you need more tooling to understand your keystores, certificates, and certificate revocation lists (CRLs), I highly recommend [Portecle](http://portecle.sourceforge.net) which can be conveniently launched as a [Java Web Start app](http://portecle.sourceforge.net/webstart/portecle.jnlp).
### Running as a Windows Service
Gitblit uses [Apache Commons Daemon](http://commons.apache.org/daemon) to install and configure its Windows service.
1. Review the contents of the `installService.cmd`
2. Set the *ARCH* value as appropriate for your installed Java Virtual Machine.
3. Add any necessary *--StartParams* as enumerated below in **Command-Line Parameters**.
4. Execute the script.
After service installation you can use the `gitblitw.exe` utility to control and modify the runtime settings of the service.<br/>
Additional service definition options and runtime capabilities of `gitblitw.exe` (prunmgr.exe) are documented [here](http://commons.apache.org/daemon/procrun.html).
**NOTE:**<br/>
If you change the name of the service from *gitblit* you must also change the name of `gitblitw.exe` to match the new service name otherwise the connection between the service and the utility is lost, at least to double-click execution.
#### VM Considerations
By default, the service installation script configures your Windows service to use your default JVM. This setup usually defaults to a client VM.<br/>
If you have installed a JDK, you might consider using the `gitblitw.exe` utility to manually specify the *server* VM.
1. Execute `gitblitw.exe`
2. On the *Java* tab uncheck *Use default*.
3. Manually navigate your filesystem and specify the server VM with the `...` button<br/><pre>
Java Virtual Machine:
C:\Program Files\Java\jre6\bin\server\jvm.dll</pre>
#### Command-Line Parameters
Command-Line parameters override the values in `gitblit.properties` at runtime.
--baseFolder The default base folder for all relative file reference settings
--repositoriesFolder Git Repositories Folder
--userService Authentication and Authorization Service (filename or fully qualified classname)
--useNio Use NIO Connector else use Socket Connector.
--httpPort HTTP port for to serve. (port <= 0 will disable this connector)
--httpsPort HTTPS port to serve. (port <= 0 will disable this connector)
--ajpPort AJP port to serve. (port <= 0 will disable this connector)
--alias Alias in keystore of SSL cert to use for https serving
--storePassword Password for SSL (https) keystore.
--shutdownPort Port for Shutdown Monitor to listen on. (port <= 0 will disable this monitor)
--tempFolder Folder for server to extract built-in webapp
**Example**
java -jar gitblit.jar --userService c:/myrealm.config --storePassword something --baseFolder c:/data
#### Overriding Gitblit GO's Log4j Configuration
You can override Gitblit GO's default Log4j configuration with a command-line parameter to the JVM.
java -Dlog4j.configuration=file:///home/james/log4j.properties -jar gitblit.jar <optional_gitblit_args>
For reference, here is [Gitblit's default Log4j configuration](https://github.com/gitblit/gitblit/blob/master/src/log4j.properties). It includes some file appenders that are disabled by default.
## Running Gitblit behind Apache
Gitblit runs fine behind Apache. You may use either *mod_proxy* (GO or WAR) or *mod_proxy_ajp* (GO).
Each Linux distribution may vary on the exact configuration of Apache 2.2.
Here is a sample configuration that works on Debian 7.0 (Wheezy), your distribution may be different.
1. First we need to make sure we have Apache's proxy modules available.
<pre>
sudo su
cd /etc/apache2/mods-enabled
ln -s ../mods-available/proxy.load proxy.load
ln -s ../mods-available/proxy_balancer.load proxy_balancer.load
ln -s ../mods-available/proxy_http.load proxy_http.load
ln -s ../mods-available/proxy_ajp.load proxy_ajp.load
</pre>
2. Then we need to make sure we are configuring Apache to use the proxy modules and to setup the proxied connection from Apache to Gitblit GO or from Apache to your chosen servlet container. The following snippet is stored as `/etc/apache2/conf.d/gitblit`.
%BEGINCODE%
# Turn off support for true Proxy behaviour as we are acting as
# a transparent proxy
ProxyRequests Off
# Turn off VIA header as we know where the requests are proxied
ProxyVia Off
# Turn on Host header preservation so that the servlet container
# can write links with the correct host and rewriting can be avoided.
#
# This is important for all git push/pull/clone operations.
ProxyPreserveHost On
# Set the permissions for the proxy
&lt;Proxy *&gt;
AddDefaultCharset off
Order deny,allow
Allow from all
&lt;/Proxy&gt;
# The proxy context path must match the Gitblit context path.
# For Gitblit GO, see server.contextPath in gitblit.properties.
#ProxyPass /gitblit http://localhost:8080/gitblit
#ProxyPassreverse /gitblit http://localhost:8080/gitblit
# If your httpd frontend is https but you are proxying http Gitblit WAR or GO
#Header edit Location &#94;http://([&#94;&#8260;]+)/gitblit/ https://&#36;1/gitblit/
# Additionally you will want to tell Gitblit the original scheme and port
#RequestHeader set X-Forwarded-Proto https
#RequestHeader set X-Forwarded-Port 443
# If you are using subdomain proxying then you will want to tell Gitblit the appropriate
# context path for your repository url.
# If you are not using subdomain proxying, then ignore this setting.
#RequestHeader set X-Forwarded-Context /
#ProxyPass /gitblit ajp://localhost:8009/gitblit
%ENDCODE%
**Please** make sure to:
1. Review the security of these settings as appropriate for your deployment
2. Uncomment the *ProxyPass* setting for whichever connection you prefer (http/ajp)
3. Correctly set the ports and context paths both in the *ProxyPass* definition and your Gitblit installation
If you are using Gitblit GO you can easily configure the AJP connector by specifying a non-zero AJP port.
Please remember that on Linux/UNIX, ports < 1024 require root permissions to open.
4. Set *web.mountParameters=false* in `gitblit.properties` or `web.xml` this will use parameterized URLs.
Alternatively, you can respecify *web.forwardSlashCharacter*.
## Upgrading Gitblit
Any important changes to the setting keys or default values will always be mentioned in the [release log](releases.html).
Gitblit v0.8.0 introduced a new default user service implementation which serializes and deserializes user objects into `users.conf`. A `users.conf` file will be automatically created from an existing `users.properties` file on the first launch after an upgrade. To use the `users.conf` service, *realm.userService=users.conf* must be set. This revised user service allows for more sophisticated Gitblit user objects and will facilitate the development of more advanced features without adding the complexity of an embedded SQL database.
`users.properties` and its user service implementation are deprecated as of v0.8.0.
### Upgrading Gitblit WAR (1.2.1+)
1. Make sure your `WEB-INF/web.xml` *baseFolder* context parameter is not `${contextFolder}/WEB-INF/data`!<br/>
If it is, move your `WEB-INF/data` folder to a location writeable by your servlet container.
2. Deploy new WAR
3. Edit the new WAR's `WEB-INF/web.xml` file and set the *baseFolder* context parameter to your external baseFolder.
4. Review and optionally apply any new settings as indicated in the [release log](releases.html) to `${baseFolder}/gitblit.properties`.
### Upgrading Gitblit GO (1.2.1+)
1. Unzip Gitblit GO to a new folder
2. Copy your `data` folder from your current Gitblit installation to the new folder and overwrite any conflicts
3. Review and optionally apply any new settings as indicated in the [release log](releases.html) to `data/gitblit.properties`.
In *nix systems, there are other tricks you can play like symlinking the `data` folder or symlinking the GO folder.
All platforms support the *--baseFolder* command-line argument.
### Upgrading Gitblit WAR (pre-1.2.1)
1. Create a `data` as outlined in step 1 of *Upgrading Gitblit GO (pre-1.2.1)*
2. Copy your existing web.xml to your data folder
3. Deploy new WAR
4. Copy the new WAR's `WEB-INF/data/gitblit.properties` file to your data folder
5. Manually apply any changes you made to your original web.xml file to the gitblit.properties file you copied to your data folder
6. Edit the new WAR's `WEB-INF/web.xml` file and set the *baseFolder* context parameter to your external baseFolder.
### Upgrading Gitblit GO (pre-1.2.1)
1. Create a `data` folder and copy the following files and folders to it:
- **users.conf*
- **projects.conf** *(if you have one)*
- **gitblit.properties**
- **serverKeystore.jks**
- **serverTrustStore.jks**
- *certs** folder
- **git** folder
- **groovy** folder
- **proposals** folder
- and any other custom files (robots.txt, welcome/login markdown files, etc)
- then edit your `gitblit.properties` file and adjust the following settings:
- *git.repositoriesFolder* = ${baseFolder}/git
- *groovy.scriptsFolder* = ${baseFolder}/groovy
- *groovy.grapeFolder* = ${baseFolder}/groovy/grape
- *web.projectsFile* = ${baseFolder}/projects.conf
- *realm.userService* = ${baseFolder}/users.conf
- *web.robots.txt* = ${baseFolder}/robots.txt
- *federation.proposalsFolder* = ${baseFolder}/proposals
- *realm.ldap.backingUserService* = ${baseFolder}/users.conf
- *realm.redmine.backingUserService* = ${baseFolder}/users.conf
- *server.tempFolder* = ${baseFolder}/temp
2. Unzip Gitblit GO to a new folder
3. Copy your `data` folder and overwrite the folder of the same name in the just-unzipped version
4. Review and optionally apply any new settings as indicated in the [release log](releases.html) to `data/gitblit.properties`.
**NOTE:** You may need to adjust your service definitions to include the `--baseFolder data` argument.
#### Upgrading Windows Service
You may need to delete your old service definition and install a new one depending on what has changed in the release.
## Gitblit Configuration
### Administering Repositories
Repositories can be created, edited, renamed, and deleted through the web UI. They may also be created, edited, and deleted from the command-line using real [Git](http://git-scm.com) or your favorite file manager and text editor.
All repository settings are stored within the repository `.git/config` file under the *gitblit* section.
[gitblit]
description = master repository
owner = james
useTickets = false
useDocs = true
showRemoteBranches = false
accessRestriction = clone
isFrozen = false
showReadme = false
federationStrategy = FEDERATE_THIS
isFederated = false
skipSizeCalculation = false
federationSets =
#### Repository Names
Repository names must be case-insensitive-unique but are CASE-SENSITIVE ON CASE-SENSITIVE FILESYSTEMS. The name must be composed of letters, digits, or `/ _ - . ~`<br/>
Whitespace is illegal.
Repositories can be grouped within subfolders. e.g. *libraries/mycoollib.git* and *libraries/myotherlib.git*
All repositories created with Gitblit are *bare* and will automatically have *.git* appended to the name at creation time, if not already specified.
#### Repository Owner
The *Repository Owner* has the special permission of being able to edit a repository through the web UI. The Repository Owner is not permitted to rename the repository, delete the repository, or reassign ownership to another user.
### Access Restrictions and Access Permissions
![permissions matrix](permissions_matrix.png "Permissions and Restrictions")
#### Discrete Permissions (Gitblit v1.2.0+)
Since v1.2.0, Gitblit supports more discrete permissions. While Gitblit does not offer a built-in solution for branch-based permissions like Gitolite, it does allow for the following repository access permissions:
- **V** (view in web ui, RSS feeds, download zip)
- **R** (clone)
- **RW** (clone and push)
- **RWC** (clone and push with ref creation)
- **RWD** (clone and push with ref creation, deletion)
- **RW+** (clone and push with ref creation, deletion, rewind)
These permission codes are combined with the repository path to create a user permission:
RW:mygroup/myrepo.git
#### Discrete Permissions with Regex Matching (Gitblit v1.2.0+)
Gitblit also supports *case-insensitive* regex matching for repository permissions. The following permission grants push privileges to all repositories in the *mygroup* folder.
RW:mygroup/.*
##### Exclusions
When using regex matching it may also be useful to exclude specific repositories or to exclude regex repository matches. You may specify the **X** permission for exclusion. The following example grants clone permission to all repositories except the repositories in mygroup. The user/team will have no access whatsoever to these repositories.
X:mygroup/.*
R:.*
##### Order is Important
The preceding example should suggest that order of permissions is important with regex matching. Here are the rules for determining the permission that is applied to a repository request:
1. If the user is an admin or repository owner, then RW+
2. Else if user has an explicit permission, use that
3. Else check for the first regex match in user permissions
4. Else check for the HIGHEST permission from team memberships
1. If the team is an admin team, then RW+
2. Else if a team has an explicit permission, use that
3. Else check for the first regex match in team permissions
#### No-So-Discrete Permissions (Gitblit <= v1.1.0)
Prior to v1.2.0, Gitblit has two main access permission groupings:
1. what you are permitted to do as an anonymous user
2. **RW+** for any permitted user
#### Committer Verification
You may optionally enable committer verification which requires that each commit be committed by the authenticated user pushing the commits. i.e. If Bob is pushing the commits, Bob **must** be the committer of those commits.
**How is this enforced?**
Bob must set his *user.name* and *user.email* values for the repository to match his Gitblit user account **BEFORE** committing to his repository.
<pre>
[user "bob"]
displayName = Bob Jones
emailAddress = bob@somewhere.com
</pre>
<pre>
git config user.name "Bob Jones"
git config user.email bob@somewhere.com
</pre>
or
git config user.name bob
git config user.email bob@somewhere.com
If the Gitblit account does not specify an email address, then the committer email address is ignored. However, if the account does specify an address it must match the committer's email address. Display name or username can be used as the committer name.
All checks are case-insensitive.
**What about merges?**
You can not use fast-forward merges on your client when using committer verification. You must specify *--no-ff* to ensure that a merge commit is created with your identity as the committer. Only the first parent chain is traversed when verifying commits.
#### Push Log
Gitblit v1.2.1 introduces an incomplete push mechanism. All pushes are logged since 1.2.1, but the log has not yet been exposed through the web ui. This will be a feature of an upcoming release.
### Teams
Since v0.8.0, Gitblit supports *teams* for the original `users.properties` user service and the current default user service `users.conf`. Teams have assigned users and assigned repositories. A user can be a member of multiple teams and a repository may belong to multiple teams. This allows the administrator to quickly add a user to a team without having to keep track of all the appropriate repositories.
### Administering Users (users.conf, Gitblit v0.8.0+)
All users are stored in the `users.conf` file or in the file you specified in `gitblit.properties`. Your file extension must be *.conf* in order to use this user service.
The `users.conf` file uses a Git-style configuration format:
[user "admin"]
password = admin
role = "#admin"
role = "#notfederated"
repository = RW+:repo1.git
repository = RW+:repo2.git
[user "hannibal"]
password = bossman
repository = RWD:topsecret.git
repository = RW+:ateam/[A-Za-z0-9-~_\\./]+
[user "faceman"]
password = vanity
[user "murdock"]
password = crazy
[user "babaracus"]
password = grrrr
[team "ateam"]
user = hannibal
user = faceman
user = murdock
user = babaracus
repository = RW:topsecret.git
mailingList = list@ateam.org
postReceiveScript = sendmail
The `users.conf` file allows flexibility for adding new fields to a UserModel object that the original `users.properties` file does not afford without imposing the complexity of relying on an embedded SQL database.
### Administering Users (users.properties, Gitblit v0.5.0 - v0.7.0)
All users are stored in the `users.properties` file or in the file you specified in `gitblit.properties`. Your file extension must be *.properties* in order to use this user service.
The format of `users.properties` loosely follows Jetty's convention for HashRealms:
username=password,role1,role2,role3...
@teamname=&mailinglist,!username1,!username2,!username3,repository1,repository2,repository3...
### Usernames
Usernames must be unique and are case-insensitive.
Whitespace is illegal.
### Passwords
User passwords are CASE-SENSITIVE and may be *plain*, *md5*, or *combined-md5* formatted (see `gitblit.properties` -> *realm.passwordStorage*).
### User Roles
There are four actual *roles* in Gitblit:
- *#admin*, which grants administrative powers to that user
- *#notfederated*, which prevents an account from being pulled by another Gitblit instance
- *#create*, which allows the user the power to create personal repositories
- *#fork*, which allows the user to create a personal fork of an existing Gitblit-hosted repository
Administrators automatically have access to all repositories. All other *roles* are repository permissions. If a repository is access-restricted, the user must have the repository's name within his/her roles to bypass the access restriction. This is how users are granted access to a restricted repository.
**NOTE:**
The following roles are equivalent:
- myrepo.git
- RW+:myrepo.git
This is to preserve backwards-compatibility with Gitblit <= 1.1.0 which granted rewind power to all access-permitted users.
### Personal Repositories & Forks
Personal Repositories and Forks are related but are controlled individually.
#### Creating a Personal Repository
A user may be granted the power to create personal repositories by specifying the *#create* role through the web ui or through the RPC mechanism via the Gitblit Manager. Personal repositories are exactly like common/shared repositories except that the owner has a few additional administrative powers for that repository, like rename and delete.
#### Creating a Fork
A user may also be granted the power to fork an existing repository hosted on your Gitblit server to their own personal clone by specifying the *#fork* role through the web ui or via the Gitblit Manager.
Forks are mostly likely personal repositories or common/shared repositories except for two important differences:
1. Forks inherit a view/clone access list from the origin repository.
i.e. if Team A has clone access to the origin repository, then by default Team A also has clone access to the fork. This is to facilitate collaboration.
2. Forks are always listed in the fork network, regardless of any access restriction set on the fork.
In other words, if you fork *RepoA.git* to *~me/RepoA.git* and then set the access restriction of *~me/RepoA.git* to *Authenticated View, Clone, & Push* your fork will still be listed in the fork network for *RepoA.git*.
If you really must have an invisible fork, the clone it locally, create a new personal repository for your invisible fork, and push it back to that personal repository.
## Alternative Authentication and Authorization
### LDAP Authentication
*SINCE 1.0.0*
LDAP can be used to authenticate Users and optionally control Team memberships. When properly configured, Gitblit will delegate authentication to your LDAP server and will cache some user information in the usual users file (.conf or .properties).
When using the LDAP User Service, new user accounts can not be manually created from Gitblit. Gitblit user accounts are automatically created for new users on their first succesful authentication through Gitblit against the LDAP server. It is also important to note that the LDAP User Service does not retrieve or store user passwords nor does it implement any LDAP-write functionality.
To use the *LdapUserService* set *realm.userService=com.gitblit.LdapUserService* in your `gitblit.properties` file or your `web.xml` file and then configure the *realm.ldap* settings appropriately for your LDAP environment.
#### Example LDAP Layout
![block diagram](ldapSample.png "LDAP Sample")
Please see [ldapUserServiceSampleData.ldif](https://github.com/gitblit/gitblit/blob/master/tests/com/gitblit/tests/resources/ldapUserServiceSampleData.ldif) to see the data in LDAP that reflects the above picture.
#### Gitblit Settings for Example LDAP Layout
The following are the settings required to configure Gitblit to authenticate against the example LDAP server with LDAP-controlled team memberships.
<table class="table">
<thead>
<tr><th>parameter</th><th>value</th><th>description</th></tr>
</thead>
<tbody>
<tr>
<th>realm.ldap.server</th><td>ldap://localhost:389</td>
<td>Tells Gitblit to connect to the LDAP server on localhost port 389. The URL Must be of form ldap(s)://&lt;server&gt;:&lt;port&gt; with port being optional (389 for ldap, 636 for ldaps).</td>
</tr>
<tr>
<th>realm.ldap.username</th><td>cn=Directory Manager</td>
<td>The credentials that will log into the LDAP server</td>
</tr>
<tr>
<th>realm.ldap.password</th><td>password</td>
<td>The credentials that will log into the LDAP server</td>
</tr>
<tr>
<th>realm.ldap.backingUserService</th><td>users.conf</td>
<td>Where to store all information that is used by Gitblit. All information will be synced here upon user login.</td>
</tr>
<tr>
<th>realm.ldap.maintainTeams</th><td>true</td>
<td>Are team memberships maintained in LDAP (<em>true</em>) or manually in Gitblit (<em>false</em>).</td>
</tr>
<tr>
<th>realm.ldap.accountBase</th><td>OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain</td>
<td>What is the root node for all users in this LDAP system. Subtree searches will start from this node.</td>
</tr>
<tr>
<th>realm.ldap.accountPattern</th><td>(&(objectClass=person)(sAMAccountName=${username}))</td><td>The LDAP search filter that will match a particular user in LDAP. ${username} will be replaced with whatever the user enters as their username in the Gitblit login panel.</td>
</tr>
<tr>
<th>realm.ldap.groupBase</th><td>OU=Groups,OU=UserControl,OU=MyOrganization,DC=MyDomain</td>
<td>What is the root node for all teams in this LDAP system. Subtree searches will start from this node.</td>
</tr>
<tr>
<th>realm.ldap.groupMemberPattern</th><td>(&(objectClass=group)(member=${dn}))</td><td>The LDAP search filter that will match all teams for the authenticating user. ${username} will be replaced with whatever the user enters as their username in the Gitblit login panel. Anything else in ${} will be replaced by Attributes from the User node.</td>
</tr>
<tr>
<th>realm.ldap.admins</th><td>@Git_Admins</td><td>A space-delimited list of usernames and/or teams that indicate admin status in Gitblit. Teams are referenced with a leading <em>@</em> character.</td>
</tr>
</tbody>
</table>
#### LDAP In-Memory Server
You can start Gitblit GO with an in-memory LDAP server by specifying the *--ldapLdifFile* command-line argument. The LDAP server will listen on localhost of the port specified in *realm.ldap.url* of `gitblit.properties`. Additionally, a root user record is automatically created for *realm.ldap.username* and *realm.ldap.password*. Please note that the ldaps:// protocol is not supported for the in-memory server.
### Custom Authentication
This is the simplest choice where you implement custom authentication and delegate all other standard user and team operations to one of Gitblit's user service implementations. This choice insulates your customization from changes in User and Team model classes and additional API that may be added to IUserService.
Please subclass [com.gitblit.GitblitUserService](https://github.com/gitblit/gitblit/blob/master/src/com/gitblit/GitblitUserService.java) and override the *setup()* and *authenticate()* methods.
Make sure to set the *serviceImpl* field in your *setup()* method.
You may use your subclass by specifying its fully qualified classname in the *realm.userService* setting.
Your subclass must be on Gitblit's classpath and must have a public default constructor.
### Custom Everything
Instead of maintaining a `users.conf` or `users.properties` file, you may want to integrate Gitblit into an existing environment.
You may use your own custom *com.gitblit.IUserService* implementation by specifying its fully qualified classname in the *realm.userService* setting.
Your user service class must be on Gitblit's classpath and must have a public default constructor.
Please see the following interface definition [com.gitblit.IUserService](https://github.com/gitblit/gitblit/blob/master/src/com/gitblit/IUserService.java).
## Groovy Hook Scripts
*SINCE 0.8.0*
Gitblit uses Groovy for its push hook mechanism. This mechanism only executes when pushing to Gitblit, not when pushing to some other Git tooling in your stack.
The Groovy hook mechanism allows for dynamic extension of Gitblit to execute custom tasks on receiving and processing push events. The scripts run within the context of your Gitblit instance and therefore have access to Gitblit's internals at runtime.
### Rules, Requirements, & Behaviors
1. Your Groovy scripts must be stored in the *groovy.scriptsFolder* as specified in `gitblit.properties` or `web.xml`.
2. All script files must have the *.groovy* extension. Because of this you may omit the extension when specifying the script.
3. Script filenames must not have spaces!
4. Scripts must be explicitly specified to be executed, no scripts are *automatically* executed by name or extension.
5. A script can be specified to run on *all repositories* by adding the script file name to *groovy.preReceiveScripts* or *groovy.postReceiveScripts* in `gitblit.properties` or `web.xml`.
6. Scripts can be specified for a team.
7. Scripts may also be specified per-repository in the repository's settings.
8. Globally-specified scripts and team-specified scripts are excluded from the list of available scripts in a repository's settings
9. Globally-specified scripts are executed first, in their listed order; followed by team-specified scripts in their listed order by alphabetical team order; followed by per-repository scripts, in their listed order.
10. A script may only be defined once in a pre-receive chain and once in a post-receive chain.
You may execute the same script on pre-receive and post-receive, just not multiple times within a pre-receive or post-receive event.
11. Gitblit does not differentiate between what can be a pre-receive script and what can be a post-receive script.
12. If a script *returns false* then the hook chain is aborted and none of the subsequent scripts will execute.
Some sample scripts are included in the GO and WAR distributions to show you how you can tap into Gitblit with the provided bound variables. Additional implementation details may be specified in the header comment of these examples.
Hook contributions and improvements are welcome.
### Grapes
*SINCE 1.0.0*
[Grape](http://groovy.codehaus.org/Grape) lets you quickly add maven repository dependencies to your Groovy hook script.
<blockquote>Grape (The Groovy Adaptable Packaging Engine or Groovy Advanced Packaging Engine) is the infrastructure enabling the grab() calls in Groovy, a set of classes leveraging <a href="http://ant.apache.org/ivy">Ivy</a> to allow for a repository driven module system for Groovy. This allows a developer to write a script with an essentially arbitrary library requirement, and ship just the script. Grape will, at runtime, download as needed and link the named libraries and all dependencies forming a transitive closure when the script is run from existing repositories such as Ibiblio, Codehaus, and java.net.</blockquote>
%BEGINCODE%
// create and use a primitive array
import org.apache.commons.collections.primitives.ArrayIntList
@Grab(group='commons-primitives', module='commons-primitives', version='1.0')
def createEmptyInts() { new ArrayIntList() }
def ints = createEmptyInts()
ints.add(0, 42)
assert ints.size() == 1
assert ints.get(0) == 42
%ENDCODE%
### Custom Fields
*SINCE 1.0.0*
Gitblit allows custom repository string fields to be defined in `gitblit.properties` or `web.xml`. Entry textfields are automatically created for these fields in the Edit Repository page of Gitblit and the Edit Repository dialog of the Gitblit Manager. These fields are accessible from your Groovy hook scripts as
repository.customFields.myField
This feature allows you to customize the behavior of your hook scripts without hard-coding values in the hook scripts themselves.
### Pre-Receive
Pre-Receive scripts execute after the pushed objects have all been written to the Git repository but before the refs have been updated to point to these new objects.
This is the appropriate point to block a push and is how many Git tools implement branch-write permissions.
### Post-Receive
Post-Receive scripts execute after all refs have been updated.
This is the appropriate point to trigger continuous integration builds or send email notifications, etc.
## Push Email Notifications
Gitblit implements email notifications in *sendmail.groovy* which uses the Groovy Hook Script mechanism. This allows for dynamic customization of the notification process at the installation site and serves as an example push script.
### Enabling Push Notifications
In order to send email notifications on a push to Gitblit, this script must be specified somewhere in the *post-receive* script chain.
You may specify *sendmail* in one of three places:
1. *groovy.postReceiveScripts* in `gitblit.properties` or `web.xml`, globally applied to all repositories
2. post-receive scripts of a Team definition
3. post-receive scripts of a Repository definition
### Destination Addresses
Gitblit does not currently support individual subscriptions to repositories; i.e. a *user* can not subscribe or unsubscribe from push notifications.
However, Repository Managers and Administrators can specify subscribed email addresses in one of three places:
1. *mail.mailingLists* in `gitblit.properties` or `web.xml`, globally applied to all push-notified repositories
2. mailing lists in a Team definition, applied to all repositories that are part of the team definition
3. mailing lists in a Repository definition
All three sources are checked and merged into a unique list of destination addresses for push notifications.
**NOTE:**
Care should be taken when devising your notification scheme as it relates to any VIEW restricted repositories you might have. Setting a global mailing list and activating push notifications for a VIEW restricted repository may send unwanted emails.
## Lucene Search Integration
*SINCE 0.9.0*
Repositories may optionally be indexed using the Lucene search engine. The Lucene search offers several advantages over commit-traversal search:
1. very fast commit and blob searches
2. multi-term searches
3. term-highlighted and syntax-highlighted fragment matches
4. multi-repository searches
### How do I use it?
First you must ensure that *web.allowLuceneIndexing* is set *true* in `gitblit.properties` or `web.xml`. Then you must understand that Lucene indexing is an opt-in feature which means that no repositories are automatically indexed.
Like anything else, this design has pros and cons.
#### Pros
1. no wasted cycles indexing repositories you will never search
2. you specify exactly what branches are indexed; experimental/dead/personal branches can be ignored
#### Cons
1. you specify exactly what branches are indexed
#### I have 300 repositories and you want me to specify indexed branches on each one??
Yeah, I agree that is inconvenient.
If you are using Gitblit GO there is a utility script `add-indexed-branch.cmd` which allows you to specify an indexed branch for many repositories in one step.
If you are using Gitblit WAR then, at present, you are out of luck unless you write your own script to traverse your repositories and use native Git to manipulate each repository config.
git config --add gitblit.indexBranch "default"
git config --add gitblit.indexBranch "refs/heads/master"
#### Indexing Branches
You may specify which branches should be indexed per-repository in the *Edit Repository* page. New/empty repositories may only specify the *default* branch which will resolve to whatever commit HEAD points to or the most recently updated branch if HEAD is unresolvable.
Indexes are built and incrementally updated on a 2 minute cycle so you may have to wait a few minutes before your index is built or before your latest pushes get indexed.
**NOTE:**
After specifying branches, only the content from those branches can be searched via Gitblit. Gitblit will automatically redirect any queries entered on a repository's search box to the Lucene search page. Repositories that do not specify any indexed branches will use the traditional commit-traversal search.
#### Adequate Heap
The initial indexing of an existing repository can potentially exhaust the memory allocated to your Java instance and may throw OutOfMemory exceptions. Be sure to provide your Gitblit server adequate heap space to index your repositories. The heap is set using the *-Xmx* JVM parameter in your Gitblit launch command (e.g. -Xmx1024M).
#### Why does Gitblit check every 2 mins for repository/branch changes?
Gitblit has to balance its design as a complete, integrated Git server and its utility as a repository viewer in an existing Git setup.
Gitblit could build indexes immediately on *edit repository* or on *receiving pushes*, but that design would not work if someone is pushing via ssh://, git://, or file:// (i.e. not pushing to Gitblit http(s)://). For this reason Gitblit has a polling mechanism to check for ref changes every 2 mins. This design works well for all use cases, aside from adding a little lag in updating the index.
## Client Setup and Configuration
### Https with Self-Signed Certificates
You must tell Git/JGit not to verify the self-signed certificate in order to perform any remote Git operations.
**NOTE:**
The default self-signed certificate generated by Gitlbit GO is bound to *localhost*.
If you are using Eclipse/EGit/JGit clients, you will have to generate your own certificate that specifies the exact hostname used in your clone/push url.
You must do this because Eclipse/EGit/JGit (<= 2.1.0) always verifies certificate hostnames, regardless of the *http.sslVerify=false* client-side setting.
- **Eclipse/EGit/JGit**
1. Window->Preferences->Team->Git->Configuration
2. Click the *New Entry* button
3. <pre>Key = <em>http.sslVerify</em>
Value = <em>false</em></pre>
- **Command-line Git** ([Git-Config Manual Page](http://www.kernel.org/pub/software/scm/git/docs/git-config.html))
<pre>git config --global --bool --add http.sslVerify false</pre>
### Http Post Buffer Size
You may find the default post buffer of your git client is too small to push large deltas to Gitblit. Sometimes this can be observed on your client as *hanging* during a push. Other times it can be observed by git erroring out with a message like: error: RPC failed; result=52, HTTP code = 0.
This can be adjusted on your client by changing the default post buffer size:
<pre>git config --global http.postBuffer 524288000</pre>
### Cloning an Access Restricted Repository
- **Eclipse/EGit/JGit**
Nothing special to configure, EGit figures out everything.
<pre>https://yourserver/git/your/repository</pre>
- **Command-line Git**
My testing indicates that your username must be embedded in the url. YMMV.
<pre>https://username@yourserver/git/your/repository</pre>

+ 0
- 31
docs/05_roadmap.mkd Целия файл

@@ -1,31 +0,0 @@
## Roadmap
This is not exactly a formal roadmap but it is a priority list of what might be implemented in future releases.
This list is volatile.
### TODO (high priority)
* Eclipse: create plugin to enumerate repositories and delegate cloning to EGit
* Manager: support federation RPCs
* Manager: redesign ref indicators in log, search, and activity views to support multiple local branches, remote branches, and tags
* Gitblit: Serve repositories on root URL rather than /git (investigate JGit 1.2 GitFilter)
### TODO (medium priority)
* Gitblit: editable settings page in GO/WAR
* Gitblit: Clone Repository feature (issue 5)
* optional scheduled pulls
* optional automatic push to origin/remotes?
* optional manual push to origin/remotes?
* Gitblit: Repository regex substitutions should be stored in .git/.config, not gitblit.properties
### IDEAS
* Gitblit: Pull requests
* Gitblit: Watch/Star like github with personalized activity feed
* Gitblit: Push database or orphan branch
* Gitblit: Re-use the EGit branch visualization table cell renderer as some sort of servlet
* Gitblit: diff should highlight inserted/removed fragment compared to original line
* Gitblit: respect Gerrit branch permissions
* Gitblit: Consider creating more Git model objects and exposing them via the JSON RPC interface to allow inspection/retrieval of Git commits, Git trees, etc from Gitblit.
* Gitblit: Blame coloring by author (issue 2)

+ 0
- 8
docs/doc_footer.html Целия файл

@@ -1,8 +0,0 @@
</div> <!-- markdown -->
<footer>
<p class="pull-right">{0}</p>
The content of this page is licensed under the <a href="http://creativecommons.org/licenses/by/3.0">Creative Commons Attribution 3.0 License</a>.
</footer>
</div> <!-- container -->
</body>
</html>

+ 0
- 33
docs/doc_header.html Целия файл

@@ -1,33 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Gitblit</title>
<link rel="stylesheet" href="./bootstrap/css/bootstrap.css"/>
<link rel="stylesheet" type="text/css" href="./gitblit.css"/>
<link rel="shortcut icon" type="image/png" href="./gitblt-favicon.png" />
<meta name="ROBOTS" content="INDEX, NOFOLLOW">
<meta http-equiv="imagetoolbar" content="no" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="keywords" content="java git server" />
<script type="text/javascript" src="./bootstrap/js/jquery.js"></script>
<script type="text/javascript" src="./bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="prettify/prettify.js"></script>
<link href="prettify/prettify.css" type="text/css" rel="stylesheet" />
</head>
<body onload="prettyPrint()">
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="http://gitblit.com" title="gitblit homepage">
<img src="gitblt_25_white.png" width="79" height="25" alt="gitblit" class="logo"/>
</a>
<ul class="nav">
{1}
</ul>
</div>
</div>
</div>
<div class="container">
<div class="markdown">

+ 0
- 8
docs/site_footer.html Целия файл

@@ -1,8 +0,0 @@
</div> <!-- markdown -->
<footer>
<p class="pull-right">{0}</p>
The content of this page is licensed under the <a href="http://creativecommons.org/licenses/by/3.0">Creative Commons Attribution 3.0 License</a>.
</footer>
</div> <!-- container -->
</body>
</html>

+ 0
- 51
docs/site_header.html Целия файл

@@ -1,51 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Gitblit</title>
<link rel="stylesheet" href="./bootstrap/css/bootstrap.css"/>
<link rel="stylesheet" type="text/css" href="./gitblit.css"/>
<link rel="shortcut icon" type="image/png" href="./gitblt-favicon.png" />
<meta name="ROBOTS" content="INDEX">
<meta http-equiv="imagetoolbar" content="no" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="keywords" content="java git server" />
<script type="text/javascript" src="./bootstrap/js/jquery.js"></script>
<script type="text/javascript" src="./bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="./fancybox/query.mousewheel-3.0.4.pack.js"></script>
<script type="text/javascript" src="./fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<link rel="stylesheet" type="text/css" href="./fancybox/jquery.fancybox-1.3.4.css" media="screen" />
<script type="text/javascript" src="./screenshots.js"></script>
<script type="text/javascript" src="prettify/prettify.js"></script>
<link href="prettify/prettify.css" type="text/css" rel="stylesheet" />
<!-- Place this tag in your head or just before your close body tag -->
<link rel="canonical" href="http://gitblit.com" />
<link rel="publisher" href="https://plus.google.com/114464678392593421684" />
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<!-- ANALYTICS -->
</head>
<body onload="prettyPrint()">
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="http://gitblit.com" title="gitblit homepage">
<img src="gitblt_25_white.png" width="79" height="25" alt="gitblit" class="logo"/>
</a>
<ul class="nav">
{1}
<!-- Google Plus Badge -->
<li><a href="https://plus.google.com/114464678392593421684?prsrc=3" style="margin-top:3px;text-decoration: none;"><img src="https://ssl.gstatic.com/images/icons/gplus-16.png" width="16" height="16" style="border: 0;"/></a></li>
<!-- Google Plus One -->
<li><div style="margin-top:14px;"><g:plusone size="small" href="http://gitblit.com"></g:plusone></div></li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="markdown">

+ 290
- 46
gitblit.iml Целия файл

@@ -5,9 +5,9 @@
<output-test url="file://$MODULE_DIR$/bin/test-classes" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/resources" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
@@ -17,7 +17,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/jcommander-1.17-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/jcommander-1.17.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -28,7 +28,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/log4j-1.2.17-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/log4j-1.2.17.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -39,7 +39,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/slf4j-api-1.6.6-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/slf4j-api-1.6.6.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -50,7 +50,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/slf4j-log4j12-1.6.6-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/slf4j-log4j12-1.6.6.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -61,7 +61,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/mail-1.4.3-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/mail-1.4.3.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -72,7 +72,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/javax.servlet-api-3.0.1-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/javax.servlet-api-3.0.1.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -83,7 +83,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/jetty-webapp-7.6.8.v20121106-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/jetty-webapp-7.6.8.v20121106.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -94,7 +94,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/jetty-ajp-7.6.8.v20121106-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/jetty-ajp-7.6.8.v20121106.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -105,7 +105,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/wicket-1.4.21-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/wicket-1.4.21.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -116,7 +116,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/wicket-auth-roles-1.4.21-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/wicket-auth-roles-1.4.21.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -127,7 +127,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/wicket-extensions-1.4.21-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/wicket-extensions-1.4.21.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -138,7 +138,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/googlecharts-1.4.21-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/googlecharts-1.4.21.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -149,7 +149,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/lucene-core-3.6.1-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/lucene-core-3.6.1.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -160,7 +160,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/lucene-highlighter-3.6.1-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/lucene-highlighter-3.6.1.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -171,7 +171,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/lucene-memory-3.6.1-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/lucene-memory-3.6.1.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -182,7 +182,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/lucene-queries-3.6.1-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/lucene-queries-3.6.1.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -202,40 +202,51 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/markdownpapers-core-1.3.2-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/markdownpapers-core-1.3.2.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="org.eclipse.jgit-2.2.0.201212191850-r.jar">
<library name="org.eclipse.jgit-3.0.0.201306101825-r.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/org.eclipse.jgit-2.2.0.201212191850-r.jar!/" />
<root url="jar://$MODULE_DIR$/ext/org.eclipse.jgit-3.0.0.201306101825-r.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/org.eclipse.jgit-2.2.0.201212191850-r-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/org.eclipse.jgit-3.0.0.201306101825-r.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jsch-0.1.44-1.jar">
<library name="jsch-0.1.46.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/jsch-0.1.44-1.jar!/" />
<root url="jar://$MODULE_DIR$/ext/jsch-0.1.46.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/jsch-0.1.44-1-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/jsch-0.1.46.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="org.eclipse.jgit.http.server-2.2.0.201212191850-r.jar">
<library name="JavaEWAH-0.5.6.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/org.eclipse.jgit.http.server-2.2.0.201212191850-r.jar!/" />
<root url="jar://$MODULE_DIR$/ext/JavaEWAH-0.5.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/org.eclipse.jgit.http.server-2.2.0.201212191850-r-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/JavaEWAH-0.5.6.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="org.eclipse.jgit.http.server-3.0.0.201306101825-r.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/org.eclipse.jgit.http.server-3.0.0.201306101825-r.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/org.eclipse.jgit.http.server-3.0.0.201306101825-r.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -246,7 +257,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/bcprov-jdk15on-1.47-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/bcprov-jdk15on-1.47.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -257,7 +268,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/bcmail-jdk15on-1.47-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/bcmail-jdk15on-1.47.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -268,7 +279,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/bcpkix-jdk15on-1.47-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/bcpkix-jdk15on-1.47.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -279,7 +290,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/rome-0.9-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/rome-0.9.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -290,7 +301,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/jdom-1.0-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/jdom-1.0.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -301,7 +312,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/gson-1.7.2-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/gson-1.7.2.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -312,7 +323,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/groovy-all-1.8.8-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/groovy-all-1.8.8.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -323,7 +334,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/unboundid-ldapsdk-2.3.0-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/unboundid-ldapsdk-2.3.0.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -334,7 +345,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/ivy-2.2.0-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/ivy-2.2.0.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -354,7 +365,7 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/commons-compress-1.4.1-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/commons-compress-1.4.1.jar!/" />
</SOURCES>
</library>
</orderEntry>
@@ -365,28 +376,261 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/xz-1.0-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/xz-1.0.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="force-partner-api-24.0.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/force-partner-api-24.0.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/force-partner-api-24.0.0.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="force-wsc-24.0.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/force-wsc-24.0.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/force-wsc-24.0.0.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="js-1.7R2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/js-1.7R2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/js-1.7R2.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="freemarker-2.3.19.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/freemarker-2.3.19.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/freemarker-2.3.19.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="waffle-jna-1.5.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/waffle-jna-1.5.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/waffle-jna-1.5.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="platform-3.5.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/platform-3.5.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/platform-3.5.0.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jna-3.5.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/jna-3.5.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/jna-3.5.0.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="guava-13.0.1.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/guava-13.0.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/guava-13.0.1.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library name="junit-4.10.jar">
<library name="junit-4.11.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/junit-4.10.jar!/" />
<root url="jar://$MODULE_DIR$/ext/junit-4.11.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/junit-4.10-sources.jar!/" />
<root url="jar://$MODULE_DIR$/ext/src/junit-4.11.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library name="hamcrest-core-1.1.jar">
<library name="hamcrest-core-1.3.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/hamcrest-core-1.1.jar!/" />
<root url="jar://$MODULE_DIR$/ext/hamcrest-core-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/hamcrest-core-1.3.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library name="selenium-java-2.28.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/selenium-java-2.28.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/selenium-java-2.28.0.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library name="selenium-support-2.28.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/selenium-support-2.28.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/selenium-support-2.28.0.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library name="selenium-firefox-driver-2.28.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/selenium-firefox-driver-2.28.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/selenium-firefox-driver-2.28.0.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library name="selenium-remote-driver-2.28.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/selenium-remote-driver-2.28.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/selenium-remote-driver-2.28.0.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library name="cglib-nodep-2.1_3.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/cglib-nodep-2.1_3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/cglib-nodep-2.1_3.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library name="json-20080701.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/json-20080701.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/json-20080701.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library name="selenium-api-2.28.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/selenium-api-2.28.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/selenium-api-2.28.0.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library name="httpclient-4.2.1.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/httpclient-4.2.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/httpclient-4.2.1.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library name="httpcore-4.2.1.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/httpcore-4.2.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/httpcore-4.2.1.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library name="commons-logging-1.1.1.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/commons-logging-1.1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/commons-logging-1.1.1.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library name="commons-codec-1.6.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/commons-codec-1.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/commons-codec-1.6.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library name="commons-exec-1.1.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/commons-exec-1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/commons-exec-1.1.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library name="commons-io-2.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/ext/commons-io-2.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MODULE_DIR$/ext/src/commons-io-2.2.jar!/" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="inheritedJdk" />

+ 52
- 0
release.template Целия файл

@@ -0,0 +1,52 @@
#!/bin/bash
#
# ${project.version} release script
#
# go back one commit to RELEASE commit
echo ""
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Checking out ${project.version} RELEASE commit ${project.commitId}"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo ""
git checkout ${project.commitId}
# build RELEASE artifacts
echo ""
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Building ${project.version} RELEASE artifacts"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo ""
ant clean buildAll
# upload artifacts
echo ""
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Uploading ${project.version} artifacts"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo ""
ant publishBinaries
# build site, update gh-pages, and ftp upload site to hosting provider
echo ""
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Building ${project.version} website"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo ""
ant publishSite
# return to project master
echo ""
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Checking out master"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo ""
git checkout master
# push project branches
echo ""
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Pushing master, gh-pages, and tag ${project.tag}"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo ""
git push origin master gh-pages tag ${project.tag}

+ 920
- 0
releases.moxie Целия файл

@@ -0,0 +1,920 @@
#
# ${project.version} release
#
r18: {
title: ${project.name} ${project.version} released
id: ${project.version}
date: ${project.buildDate}
note: ''
If you have forked repositories and your are upgrading from 1.2.x to 1.3.x, please DO NOT RELOCATE your repositories folder when running 1.3.x the first time. Gitblit will update forked repository configs on the first execution and it is critical that ${git.repositoriesFolder} points to the same location used by 1.2.x.
''
html: ~
text: ~
security: ~
fixes:
- Gitblit-as-viewer with no repository urls failed to display summary page (issue 269)
- Fixed missing model class dependencies in Gitblit Manager build
- Fix for IE10 compatibility mode
- Reset dashboard and activity commit cache on branch REWIND or DELETE
- Fixed bug with adding new local users with external authentication
- Fixed missing clone url on the empty repository page
changes:
- updated Chinese translation
- updated Dutch translation
- updated Spanish translation
- updated Korean translation
additions:
- Added optional browser-side page caching using Last-Modified and Cache-Control for the dashboard, activity, project, and several repository pages
dependencyChanges: ~
settings:
- { name: 'web.pageCacheExpires', defaultValue: 0 }
contributors:
- Rainer Alföldi
- Liyu Wang
- Jeroen Baten
- James Moger
- Stardrad Yin
- Chad Horohoe
- Eduardo Guervós Narvaez
- Dongsu, KIM
}

#
# 1.3.0
#
r17: {
title: Gitblit 1.3.0 Released
id: 1.3.0
date: 2013-07-14
html: ''
Release highlights include:
<ul>
<li>integrated git daemon</li>
<li>compare refs or commits page</li>
<li>completed the Gitblit reflog (formerly pushlog) introduced in 1.2.1</li>
<li>added new dashboard pages</li>
<li>added a stars feature</li>
<li>improved the repository url panel to show your access permission and to offer native app clone links</li>
<li>improved navigation and theme</li>
<li>customizable page header colors and logo</li>
<li>recent activity commit caching to improve performance of dashboard and activity pages</li>
<li>Windows authentication</li>
<li>Salesforce.com authentication</li>
<li>lots of bug fixes</li>
</ul>
<p> </p>
Thank you to <a href="http://syntevo.com">syntevo</a>, <a href="http://atlassian.com">Atlassian</a>, <a href="http://fournova.com">fournova</a>, and <a href="http://github.com">Github</a> for their permission and use of their artwork for the native app clone menus.
''
note: ''
If you have forked repositories and your are upgrading to 1.3.0, please DO NOT RELOCATE your repositories folder when running 1.3.0 the first time. Gitblit will update forked repository configs on the first execution and it is critical that ${git.repositoriesFolder} points to the same location used by 1.2.x.
''
security:
- Raw servlet was insecure. If someone knew the exact repository name and path to a file, the raw blob could be retrieved bypassing security constraints. (issue 198)
fixes:
- Use bash instead of sh in Linux/OSX shell scripts (issue 154)
- Fix NPE when getting user's fork without repository list caching (issue 182)
- Fix internal error on folder history links (issue 192)
- Fix NPE in repositories panel when viewing a federation proposal (issue 195)
- Fix NPEs when initializing the context on a servlet containers which returns a null contextFolder (issue 199)
- Fixed incorrect icon file name for .doc files (issue 200)
- Do not queue emails with no recipients (issue 201)
- Disable view and blame links for deleted blobs (issue 216)
- Fixed 1.2.x regression with individually symlinked repositories (issue 217)
- Fixed UTF-8 encoding errors in email notifications (issue 218)
- Fixed NPE in 1.2.1 Federation Client (issue 219)
- Fixed extracting Groovy scripts on Express installs (issue 220)
- Ensure Redmine url is properly formatted (issue 223)
- Use standard ServletRequestWrapper instead of custom wrapper (issue 224)
- Switch commit message back to a pre and ensure that it is properly escaped when combined with commit message regex substitution (issue 242)
- Fixed AddIndexedBranch tool --branch parameter (issue 247)
- Improve NPE handling for hook script enumeration (issue-253)
- Workaround missing commit information in blame page (JGit bug 374382, issue-254)
- Ignore orphan ".git" folder in the repositories root folder (issue-256)
- Fixed bug where a null permission was added to a user model on a repository rename when the permission had really been inherited from a team membership (issue-259)
- Fixed committer verification with merge commits (issue-264)
- Fixed bug in submodule repository linking (issue-266)
- Could not reset settings with $ or { characters through Gitblit Manager because they are not properly escaped
- Added more error checking to blob page and blame page
- Disable SNI extensions for client SSL connections
- Fixed prettify language extension loading
- Fixed index out of bounds exceptions when generating client certificates for a user when the user's table has been filtered
- Fixed AddindexedBranch tool when specifying the non-default branch.
- Fixed submodule diff display

changes:
- Retrieve summary and metric graphs from Google over https (issue-61)
- Persist originRepository (for forks) in the repository config instead of relying on parsing origin urls which are susceptible to filesystem relocation (issue 190)
- Improved error logging for servlet containers which provide a null contextFolder (issue 199)
- Improve Gerrit change ref decoration in the refs panel (issue 206)
- Display full commit message on commitdiff page (issue-258)
- Improved the repository url display. This display now indicates your repository access permission, per-protocol.
- Automatically encode/decode usernames for urls using %XX notation on space, @, and \
- Disable Gson's pretty printing which has a huge performance gain
- Properly set application/json content-type on api calls
- Make days back filter choices a setting
- Changed default days back filter setting to 7 days
- Set rel="nofollow" on compressed download links
- Improved page title
- Updated Polish translation
- Updated Japanese translation
additions:
- Added a ui for the ref log introduced in 1.2.1 (issue-177)
- Added weblogic.xml to WAR for deployment on WebLogic (issue 199)
- Support setting a custom header logo (issue 208)
- Support header color customizations (issue 209)
- Support username substitution in web.otherUrls (issue 213)
- Option to force client-side basic authentication instead of form-based authentication if web.authenticateViewPages=true (issue 222)
- Set author as tooltip of last change column in the repositories panel (issue-238)
- Setting to automatically create an user account based on an authenticated user principal from the servlet container (issue-246)
- Added WindowsUserService to authenticate users against Windows accounts (issue-250)
- Global and per-repository setting to exclude authors from metrics (issue-251)
- Added commit cache to improve Activity, Dashboard, and Project page generation times
- Added SalesForce.com user service
- Added simple star/unstar function to flag or bookmark interesting repositories
- Added Dashboard page which shows a news feed for starred repositories and offers a filterable list of repositories you care about
- Added client application menus for Git, SmartGit/Hg, SourceTree, Tower, GitHub for Windows, and GitHub for Mac
- Added GO http/https connector thread pool size setting
- Added a server setting to force a particular translation/Locale for all sessions
- Added smart Git Daemon serving. If enabled, git:// access will be offered for any repository which permits anonymous access. If the repository permits anonymous cloning, anonymous git:// clone will be permitted while anonmymous git:// pushes will be rejected.
- Option to automatically tag branch tips on each push with an incremental revision number
- Implemented multiple repository owners
- Optional periodic LDAP user and team pre-fetching & synchronization
- Added config setting to use SMTPS
- Added option to index all local branches in AddIndexedBranches tool
- Display name and version in Tomcat Manager
- FogBugz post-receive hook script
- Chinese translation
- Support --baseFolder parameter in Federation Client

contributors:
- James Moger
- Bandarupalli Satyanarayana
- Chad Horohoe
- Christian Aistleitner
- Colin Bowern
- David Ostrovsky
- Egbert Teeselink
- Hige Maniya
- Hirotaka Honma
- Ikslawek
- Jay Meyer
- John Crygier
- Kensuke Matsuzaki
- Laurens Vrijnsen
- Lee Grofit
- Lukasz Jader
- Martijn Laan
- Matthias Bauer
- Michael Pailloncy
- Michael Schaefers
- Oliver Doepner
- Philip Boutros
- Rafael Cavazin
- Ryan Schneider
- Sakurai Youhei
- Sarah Haselbauer
- Slawomir Bochenski
- Stardrad Yin
- Thomas Pummer
- William Whittle
- Yukihiko Sawanobori
- github/akquinet
- github/dapengme
dependencyChanges:
- JGit 3.0.0.201306101825-r
- Iconic font
- AngularJS 1.0.7
- FreeMarker 2.3.19
- Waffle 1.5
- JNA 3.5.0
- Guava 13.0.1
settings:
- { name: 'git.daemonBindInterface', defaultValue: 'localhost' }
- { name: 'git.daemonPort', defaultValue: 0 }
- { name: 'git.defaultIncrementalPushTagPrefix', defaultValue: 'r' }
- { name: 'mail.smtps', defaultValue: 'false' }
- { name: 'realm.container.autoCreateAccounts', defaultValue: 'false' }
- { name: 'realm.salesforce.backingUserService', defaultValue: 'users.conf' }
- { name: 'realm.salesforce.orgId', defaultValue: 0 }
- { name: 'realm.windows.defaultDomain', defaultValue: ' ' }
- { name: 'realm.windows.backingUserService', defaultValue: 'users.conf' }
- { name: 'web.activityDuration', defaultValue: 7 }
- { name: 'web.activityDurationChoices', defaultValue: '1 3 7 14 21 28' }
- { name: 'web.activityCacheDays', defaultValue: 14 }
- { name: 'web.allowAppCloneLinks', defaultValue: 'true' }
- { name: 'web.forceDefaultLocale', defaultValue: ' ' }
- { name: 'web.headerLogo', defaultValue: '${baseFolder}/logo.png' }
- { name: 'web.headerBackgroundColor', defaultValue: ' ' }
- { name: 'web.headerForegroundColor', defaultValue: ' ' }
- { name: 'web.headerHoverColor', defaultValue: ' ' }
- { name: 'web.headerBorderColor', defaultValue: ' ' }
- { name: 'web.headerBorderFocusColor', defaultValue: ' ' }
- { name: 'web.metricAuthorExclusions', defaultValue: ' ' }
- { name: 'web.overviewReflogCount', defaultValue: 5 }
- { name: 'web.reflogChangesPerPage', defaultValue: 10 }
- { name: 'server.nioThreadPoolSize', defaultValue: 50 }
}

#
# 1.2.1
#
r16: {
title: Gitblit 1.2.1 Released
id: 1.2.1
date: 2013-01-15
html: ''
Because there are now several types of files and folders that must be considered Gitblit data, the default location for data has changed.
<p />
You will need to move a few files around when upgrading. Please review the <a href="upgrade_go.html">upgrading GO</a> or <a href="upgrade_war.html">upgrading WAR</a> page for details.
<p />
<b>Express Users</b> make sure to update your web.xml file with the ${baseFolder} values!
''
fixes:
- Fixed nullpointer on recursively calculating folder sizes when there is a named pipe or symlink in the hierarchy
- Added nullchecking when concurrently forking a repository and trying to display the fork network (issue-187)
- Fixed bug where permission changes were not visible in the web ui to a logged-in user until the user logged-out and then logged back in again (issue-186)
- Fixed nullpointer on creating a repository with mixed case (issue 185)
- Include missing model classes in api library (issue-184)
- Fixed nullpointer when using *web.allowForking = true* && *git.cacheRepositoryList = false* (issue 182)
- Likely fix for commit and commitdiff page failures when a submodule reference changes (issue 178)
- Build project models from the repository model cache, when possible, to reduce page load time (issue 172)
- Fixed loading of Brazilian Portuguese translation from *nix server

additions:
- ''Fanout PubSub service for self-hosted [Sparkleshare](http://sparkleshare.org) notifications.
This service is disabled by default.''
- ''Implemented a simple push log based on a hidden, orphan branch refs/gitblit/pushes (issue 177)
The push log is not currently visible in the ui, but the data will be collected and it will be exposed to the ui in the next release.''
- Support for locally and remotely authenticated accounts in LdapUserService and RedmineUserService (issue 183)
- Added Dutch translation

changes:
- ''Gitblit GO and Gitblit WAR are now both configured by `gitblit.properties`. WAR is no longer configured by `web.xml`.
However, Express for OpenShift continues to be configured by `web.xml`.''
- Support for a *--baseFolder* command-line argument for Gitblit GO and Gitblit Certificate Authority
- Support for specifying a *${baseFolder}* parameter in `gitblit.properties` and `web.xml` for several settings
- Improve history display of a submodule link
- Updated Korean translation
- Updated checkstyle definition
settings:
- { name: fanout.bindInterface, defaultValue: localhost }
- { name: fanout.port, defaultValue: 0 }
- { name: fanout.useNio, defaultValue: 'true' }
- { name: fanout.connectionLimit, defaultValue: 0 }

contributors:
- James Moger
- github/mystygage
- Dongsu, KIM
- Jeroen Baten
- github/inaiat
}

#
# 1.2.0
#
r15: {
title: Gitblit 1.2.0 Released
id: 1.2.0
date: 2012-12-31
note: ''
The permissions model has changed in the 1.2.0 release.
If you are updating your server, you must also update any Gitblit Manager and Federation Client installs to 1.2.0 as well. The data model used by the RPC mechanism has changed slightly for the new permissions infrastructure.
''
fixes:
- Fixed regression in *isFrozen* (issue 181)
- Author metrics can be broken by newlines in email addresses from converted repositories (issue 176)
- Set subjectAlternativeName on generated SSL cert if CN is an ip address (issue 170)
- Fixed incorrect links on history page for files not in the current/active commit (issue 166)
- Empty repository page failed to handle missing repository (issue 160)
- Fixed broken ticgit urls (issue 157)
- Exclude submodules from zip downloads (issue 151)
- Fixed bug where repository ownership was not updated on rename user
- Fixed bug in create/rename repository if you explicitly specified the alias for the root group (e.g. main/myrepo) (issue 143)
- Wrapped Markdown parser with improved exception handler (issue 142)
- Fixed duplicate entries in repository cache (issue 140)
- Fixed connection leak in LDAPUserService (issue 139)
- Fixed bug in commit page where changes to a submodule threw a null pointer exception (issue 132)
- Fixed bug in the diff view for filenames that have non-ASCII characters (issue 128)

additions:
- ''
Implemented discrete repository permissions (issue 36)
- V (view in web ui, RSS feeds, download zip)
- R (clone)
- RW (clone and push)
- RWC (clone and push with ref creation)
- RWD (clone and push with ref creation, deletion)
- RW+ (clone and push with ref creation, deletion, rewind)
While not as sophisticated as Gitolite, this does give finer access controls. These permissions fit in cleanly with the existing users.conf and users.properties files. In Gitblit <= 1.1.0, all your existing user accounts have RW+ access. If you are upgrading to 1.2.0, the RW+ access is *preserved* and you will have to lower/adjust accordingly.
''
- ''Implemented *case-insensitive* regex repository permission matching (issue 36)

This allows you to specify a permission like `RW:mygroup/.*` to grant push privileges to all repositories within the *mygroup* project/folder.''
- Added DELETE, CREATE, and NON-FAST-FORWARD ref change logging
- ''Added support for personal repositories.
Personal repositories can be created by accounts with the *create* permission and are stored in *git.repositoriesFolder/~username*. Each user with personal repositories will have a user page, something like the GitHub profile page. Personal repositories have all the same features as common repositories, except personal repositories can be renamed by their owner.''
- ''Added support for server-side forking of a repository to a personal repository (issue 137)
In order to fork a repository, the user account must have the *fork* permission **and** the repository must *allow forks*. The clone inherits the access list of its origin. i.e. if Team A has clone access to the origin repository, then by default Team A also has clone access to the fork. This is to facilitate collaboration. The fork owner may change access to the fork and add/remove users/teams, etc as required <u>however</u> it should be noted that all personal forks will be enumerated in the fork network regardless of access view restrictions. If you really must have an invisible fork, the clone it locally, create a new repository for your invisible fork, and push it back to Gitblit.''
- Added optional *create-on-push* support
- Added **experimental** JGit-based garbage collection service. This service is disabled by default.
- ''Added support for X509 client certificate authentication. (issue 106)
You can require all git servlet access be authenticated by a client certificate. You may also specify the OID fingerprint to use for mapping a certificate to a username. It should be noted that the user account MUST already exist in Gitblit for this authentication mechanism to work; this mechanism can not be used to automatically create user accounts from a certificate.''
- Revised clean install certificate generation to create a Gitblit GO Certificate Authority certificate; an SSL certificate signed by the CA certificate; and to create distinct server key and server trust stores. <u>The store files have been renamed!</u>
- Added support for Gitblit GO to require usage of client certificates to access the entire server.
- Added **Gitblit Certificate Authority**, an x509 PKI management tool for Gitblit GO to encourage use of x509 client certificate authentication.
- Added web.shortCommitId setting to control length of shortened commit ids
- Added alternate compressed download formats: tar.gz, tar.xz, tar.bzip2 (issue 174)
- Added simple project pages. A project is a subfolder off the *git.repositoriesFolder*.
- Added support for X-Forwarded-Context for Apache subdomain proxy configurations (issue 135)
- Delete branch feature (issue 121)
- Added line links to blob view (issue 130)
- Added HTML sendmail hook script and Gitblit.sendHtmlMail method
- Added RedmineUserService
- Support for committer verification. Requires use of *--no-ff* when merging branches or pull requests. See setup page for details.
- Added Brazilian Portuguese translation

changes:
- Added server setting to specify keystore alias for ssl certificate (issue 98)
- Added optional global and per-repository activity page commit contribution throttle to help tame *really* active repositories (issue 173)
- Added support for symlinks in tree page and commit page (issue 171)
- All access restricted servlets (e.g. DownloadZip, RSS, etc) will try to authenticate using X509 certificates, container principals, cookies, and BASIC headers, in that order.
- Added *groovy* and *scala* to *web.prettyPrintExtensions*
- Added short commit id column to log and history tables (issue 168)
- Teams can now specify the *admin*, *create*, and *fork* roles to simplify user administration
- Use https Gravatar urls to avoid browser complaints
- Added frm to default pretty print extensions (issue 156)
- Expose ReceivePack to Groovy push hooks (issue 125)
- Redirect to summary page when refreshing the empty repository page on a repository that is not empty (issue 129)
- Emit a warning in the log file if running on a Tomcat-based servlet container which is unfriendly to %2F forward-slash url encoding AND Gitblit is configured to mount parameters with %2F forward-slash url encoding (issue 126)
- ''LDAP admin attribute setting is now consistent with LDAP teams setting and admin teams list.
If *realm.ldap.maintainTeams==true* **AND** *realm.ldap.admins* is not empty, then User.canAdmin() is controlled by LDAP administrative team membership. Otherwise, User.canAdmin() is controlled by Gitblit.''
- Support servlet container authentication for existing UserModels (issue 68)

settings:
- { name: web.allowForking, defaultValue: 'true' }
- { name: git.allowCreateOnPush, defaultValue: 'true' }
- { name: git.allowGarbageCollection, defaultValue: 'false' }
- { name: git.garbageCollectionHour, defaultValue: 0 }
- { name: git.defaultGarbageCollectionThreshold, defaultValue: 500k }
- { name: git.defaultGarbageCollectionPeriod, defaultValue: 7 days }
- { name: git.requireClientCertificates, defaultValue: 'false' }
- { name: git.enforceCertificateValidity, defaultValue: 'true' }
- { name: git.certificateUsernameOIDs, defaultValue: CN }
- { name: web.shortCommitIdLength, defaultValue: 8 }
- { name: web.compressedDownloads, defaultValue: zip gz }
- { name: server.requireClientCertificates, defaultValue: 'false' }

dependencyChanges:
- Jetty 7.6.8
- JGit 2.2.0.201212191850-r
- Groovy 1.8.8
- Wicket 1.4.21
- Lucene 3.6.1
- BouncyCastle 1.47
- MarkdownPapers 1.3.2
- JCalendar 1.3.2
- Commons-Compress 1.4.1
- XZ for Java 1.0

contributors:
- James Moger
- github/rafaelcavazin
- github/mallowlabs
- github/sauthieg
- github/ajermakovics
- github/kevinanderson1
- github/jpyeron
}

#
# 1.1.0
#
r14: {
title: Gitblit 1.1.0 Released
id: 1.1.0
date: 2012-08-25
note: If you are updating from an earlier release AND you have indexed branches with the Lucene indexing feature, you need to be aware that this release will completely re-index your repositories. Please be sure to provide ample heap resources as appropriate for your installation.

fixes:
- Bypass Wicket's inability to handle direct url addressing of a view-restricted, grouped repository for new, unauthenticated sessions (e.g. click link from email or rss feed without having an active Wicket session)
- Fixed MailExecutor's failure to cope with mail server connection troubles resulting in 100% CPU usage
- Fixed generated urls in Groovy *sendmail* hook script for grouped repositories
- Fixed generated urls in RSS feeds for grouped repositories
- Fixed nullpointer exception in git servlet security filter (issue 123)
- Eliminated an unnecessary repository enumeration call on the root page which should result in faster page loads (issue 103)
- Gitblit could not delete a Lucene index in a working copy on index upgrade
- Do not index submodule links (issue 119)
- Restore original user or team object on failure to update (issue 118)
- Fixes to relative path determination in repository search algorithm for symlinks (issue 116)
- Fix to GitServlet to allow pushing to symlinked repositories (issue 116)
- Repository URL now uses `X-Forwarded-Proto` and `X-Forwarded-Port`, if available, for reverse proxy configurations (issue 115)
- Output real RAW content, not simulated RAW content (issue 114)
- Fixed Lucene charset encoding bug when reindexing a repository (issue 112)
- Fixed search box linking to Lucene page for grouped repository on Tomcat (issue 111)
- Fixed null pointer in LdapUserSerivce if account has a null email address (issue 110)
- Really fixed failure to update a GO setting from the manager (issue 85)

additions:
- Identified repository list is now cached by default to reduce disk io and to improve performance (issue 103)
- Preliminary bare repository submodule support
- ''
*git.submoduleUrlPatterns* is a space-delimited list of regular expressions for extracting a repository name from a submodule url.
For example, `git.submoduleUrlPatterns = .*?://github.com/(.*)` would extract *gitblit/gitblit.git* from *git://github.git/gitblit/gitblit.git*
**Note:** You may not need this control to work with submodules, but it is there if you do.
- If there are no matches from *git.submoduleUrlPatterns* then the repository name is assumed to be whatever comes after the last `/` character *(e.g. gitblit.git)*
- Gitblit will try to locate this repository relative to the current repository *(e.g. myfolder/myrepo.git, myfolder/mysubmodule.git)* and then at the root level *(mysubmodule.git)* if that fails.
- Submodule references in a working copy will be properly identified as gitlinks, but Gitblit will not traverse into the working copy submodule repository.
''
- ''
Added a repository setting to control authorization as AUTHENTICATED or NAMED. (issue 117)

NAMED is the original behavior for authorizing against a list of permitted users or permitted teams.
AUTHENTICATED allows restricted access for any authenticated user. This is a looser authorization control.
''
- Added default authorization control setting (AUTHENTICATED or NAMED)
- Added setting to control how deep Gitblit will recurse into *git.repositoriesFolder* looking for repositories (issue 103)
- Added setting to specify regex exclusions for repositories (issue 103)
- Blob page now supports displaying images (issue 6)
- Non-image binary files can now be downloaded using the RAW link
- Support StartTLS in LdapUserService (issue 122)
- Added Korean translation

changes:
- Line breaks inserted for readability in raw Markdown content display in the event of a parsing/transformation error. An error message is now displayed prepended to the raw content.
- Improve UTF-8 reading for Markdown files
- Updated Polish translation
- Updated Japanese translation
- Updated Spanish translation
settings:
- { name: git.cacheRepositoryList, defaultValue: 'true' }
- { name: git.submoduleUrlPatterns, defaultValue: * }
- { name: git.searchExclusions, defaultValue: * }
- { name: git.searchRecursionDepth, defaultValue: -1 }
- { name: git.defaultAuthorizationControl, defaultValue: NAMED }

contributors:
- James Moger
- Steffen Gebert
}

#
# 1.0.0
#
r13: {
title: Gitblit 1.0.0 Released
id: 1.0.0
date: 2012-07-14

fixes:
- Fixed bug in Lucene search where old/stale blobs were never properly deleted during incremental updates. This resulted in duplicate blob entries in the index.
- Fixed intermittent bug in identifying line numbers in Lucene search (issue 105)
- Adjust repository identification algorithm to handle the scenario where a repository name collides with a group/folder name (e.g. foo.git and foo/bar.git) (issue 104)
- Fixed bug where a repository set as *authenticated push* did not have anonymous clone access (issue 96)
- Fixed bug in Basic authentication if passwords had a colon
- Fixed bug where the Gitblit Manager could not update a setting that was not referenced in reference.properties (issue 85)

changes:
- ''**Updated Lucene index version which will force a rebuild of ALL your Lucene indexes**
Make sure to properly set *web.blobEncodings* before starting Gitblit if you are updating! (issue 97)''
- Changed default layout for web ui from Fixed-Width layout to Responsive layout (issue 101)
- ''IUserService interface has changed to better accomodate custom authentication and/or custom authorization<
The default `users.conf` now supports persisting display names and email addresses.''
- Updated Japanese translation

additions:
- Added setting to allow specification of a robots.txt file (issue 99)
- ''Added setting to control Responsive layout or Fixed-Width layout (issue 101)
Responsive layout is now the default. This layout gracefully scales the web ui from a desktop layout to a mobile layout by hiding page components. It is easy to try, just resize your browser or point your Android/iOS device to the url of your Gitblit install.''
- Added setting to control charsets for blob string decoding. Default encodings are UTF-8, ISO-8859-1, and the server default charset. (issue 97)
- ''Exposed JGit internal configuration settings in gitblit.properties/web.xml (issue 93)
Review your `gitblit.properties` or `web.xml` for detailed explanations of these settings.''
- Added default access restriction. Applies to new repositories and repositories that have not been configured with Gitblit. (issue 88)
- Added Ivy 2.2.0 dependency which enables Groovy Grapes, a mechanism to resolve and retrieve library dependencies from a Maven 2 repository within a Groovy push hook script
- ''Added setting to control Groovy Grape root folder (location where resolved dependencies are stored)
[Grape](http://groovy.codehaus.org/Grape) allows you to add Maven dependencies to your pre-/post-receive hook script classpath.''
- Added LDAP User Service with many new *realm.ldap* keys
- ''Added support for custom repository properties for Groovy hooks
Custom repository properties complement hook scripts by providing text field prompts in the web ui and the Gitblit Manager for the defined properties. This allows your push hooks to be parameterized.''
- Added script to facilitate proxy environment setup on Linux
- Added Polish translation
- Added Spanish translation

settings:
- { name: groovy.grapeFolder, defaultValue: groovy/grape }
- { name: web.robots.txt, defaultValue: }
- { name: web.useResponsiveLayout, defaultValue: 'true' }
- { name: web.blobEncodings, defaultValue: UTF-8 ISO-8859-1 }
- { name: git.defaultAccessRestriction, defaultValue: NONE }
- { name: git.packedGitWindowSize, defaultValue: 8k }
- { name: git.packedGitLimit, defaultValue: 10m }
- { name: git.deltaBaseCacheLimit, defaultValue: 10m }
- { name: git.packedGitOpenFiles, defaultValue: 128 }
- { name: git.streamFileThreshold, defaultValue: 50m }
- { name: git.packedGitMmap, defaultValue: 'false' }

dependencyChanges:
- Bootstrap 2.0.4
- JGit 2.0.0.201206130900-r
- Groovy 1.8.6
- Gson 1.7.2
- Log4J 1.2.17
- SLF4J 1.6.6
- Apache Commons Daemon 1.0.10
- Ivy 2.2.0

contributors:
- James Moger
- Eduardo Guervos Narvaez
- Lukasz Jader
- github/mragab
- github/jcrygier
- github/zakki
- github/peterloron
}

#
# 0.9.3
#
r12: {
title: Gitblit 0.9.3 Released
id: 0.9.3
date: 2012-04-11

fixes:
- Fixed bug where you could not remove all selections from a RepositoryModel list (permitted users, permitted teams, hook scripts, federation sets, etc) (issue 81)
- Automatically set *java.awt.headless=true* for Gitblit GO

contributors:
- James Moger
}

#
# 0.9.2
#
r11: {
title: Gitblit 0.9.2 Released
id: 0.9.2
date: 2012-04-04
changes:
- Added *clientLogger* bound variable to Groovy hook mechanism to allow custom info and error messages to be returned to the client

fixes:
- Fixed absolute path/canonical path discrepancy between Gitblit and JGit regarding use of symlinks (issue 78)
- Fixed row layout on activity page (issue 79)
- Fixed Centos service script
- Fixed EditRepositoryPage for IE8; missing save button (issue 80)

contributors:
- James Moger
- github/jonnybbb
- github/mohamedmansour
- github/jcrygier
}

#
# 0.9.1
#
r10: {
title: Gitblit 0.9.1 Released
id: 0.9.1
date: 2012-03-27

fixes:
- Lucene folder was stored in working copy instead of in .git folder

contributors:
- James Moger
}

#
# 0.9.0
#
r9: {
title: Gitblit 0.9.0 Released
id: 0.9.0
date: 2012-03-27

security:
- Fixed session fixation vulnerability where the session identifier was not reset during the login process (issue 62)

changes:
- Reject pushes to a repository with a working copy (i.e. non-bare repository) (issue-49)
- Changed default web.datetimestampLongFormat from *EEEE, MMMM d, yyyy h:mm a z* to *EEEE, MMMM d, yyyy HH:mm Z* (issue 50)
- Expanded commit age coloring from 2 days to 30 days (issue 57)

additions:
- ''Added optional Lucene branch indexing (issue 16)
Repository branches may be optionally indexed by Lucene for improved searching. To use this feature you must specify which branches to index within the *Edit Repository* page; _no repositories are automatically indexed_. Gitblit will build or incrementally update enrolled repositories on a 2 minute cycle. (i.e you will have to wait 2-3 minutes after respecifying indexed branches or pushing new commits before Gitblit will build/update the repository Lucene index.)
If a repository has Lucene-indexed branches the *search* form on the repository pages will redirect to the root-level Lucene search page and only the content of those branches can be searched.<br/>
If the repository does not specify any indexed branches then repository commit-traversal search is used.

**Note:** Initial indexing of an existing repository can be memory-exhaustive. Be sure to provide your Gitblit server adequate heap space to index your repositories (e.g. -Xmx1024M).<br/>
See the [setup](setup.html) page for additional details.''
- Allow specifying timezone to use for Gitblit which is independent of both the JVM and the system timezone (issue 54)
- Added a built-in AJP connector for integrating Gitblit GO into an Apache mod_proxy setup (issue 59)
- ''On the Repositories page show a bang *!* character in the color swatch of a repository with a working copy (issue 49)
Push requests to these repositories will be rejected.''
- On all non-bare Repository pages show *WORKING COPY* in the upper right corner (issue 49)
- New setting to prevent display/serving non-bare repositories
- Added *protect-refs.groovy*
- Allow setting default branch (relinking HEAD) to a branch or a tag
- Added Ubuntu service init script (issue 72)
- Added partial Japanese translation

fixes:
- Ensure that Welcome message is parsed using UTF-8 encoding (issue 74)
- Activity page chart layout broken by Google (issue 73)
- Uppercase repositories not selectable in edit palettes (issue 71)
- Not all git notes were properly displayed on the commit page (issue 70)
- Activity page now displays all local branches (issue 65)
- Fixed (harmless) nullpointer on pushing to an empty repository (issue 69)
- Fixed possible nullpointer from the servlet container on startup (issue 67)
- Fixed UTF-8 encoding bug on diff page (issue 66)
- Fixed timezone bugs on the activity page (issue 54)
- Prevent add/edit team with no selected repositories (issue 56)
- Disallow browser autocomplete on add/edit user/team/repository pages
- Fixed username case-sensitivity issues (issue 43)
- Disregard searching a subfolder if Gitblit does not have filesystem permissions (issue 51)

settings:
- { name: web.allowLuceneIndexing, defaultValue: 'true' }
- { name: web.luceneIgnoreExtensions, defaultValue: 7z arc arj bin bmp dll doc docx exe gif gz jar jpg lib lzh odg odf odt pdf ppt png so swf xcf xls xlsx zip }
- { name: web.timezone, defaultValue: }
- { name: server.ajpPort, defaultValue: 0 }
- { name: server.ajpBindInterface, defaultValue: localhost }
- { name: git.onlyAccessBareRepositories, defaultValue: 'false' }

dependencyChanges:
- Bootstrap 2.0.2
- MarkdownPapers 1.2.7
- JGit 1.3.0.201202151440-r
- Wicket 1.4.20

contributors:
- James Moger
- github/lemval
- github/zakki
- github/plm
}

#
# 0.8.2
#
r8: {
title: Gitblit 0.8.2 Released
id: 0.8.2
date: 2012-01-13

fixes:
- Fixed bug when upgrading from users.properties to users.conf (issue 41)

contributors:
- James Moger
}

#
# 0.8.1
#
r7: {
title: Gitblit 0.8.1 Released
id: 0.8.1
date: 2012-01-11

fixes:
- Include missing icon resource for the manager (issue 40)
- Fixed sendmail.groovy message content with incorrect tag/branch labels

contributors:
- James Moger
}

#
# 0.8.0
#
r6: {
title: Gitblit 0.8.0 Released
id: 0.8.0
date: 2012-01-11

additions:
- ''Platform-independent, Groovy push hook script mechanism.
Hook scripts can be set per-repository, per-team, or globally for all repositories.''
- ''*sendmail.groovy* for optional email notifications on push.
You must properly configure your SMTP server settings in `gitblit.properties` or `web.xml` to use *sendmail.groovy*.''
- New global key for mailing lists. This is used in conjunction with the *sendmail.groovy* hook script. All repositories that use the *sendmail.groovy* script will include these addresses in the notification process. Please see the Setup page for more details about configuring sendmail.
- *com.gitblit.GitblitUserService*. This is a wrapper object for the built-in user service implementations. For those wanting to only implement custom authentication it is recommended to subclass GitblitUserService and override the appropriate methods. Going forward, this will help insulate custom authentication from new IUserService API and/or changes in model classes.
- ''New default user service implementation: *com.gitblit.ConfigUserService* (`users.conf`)
This user service implementation allows for serialization and deserialization of more sophisticated Gitblit User objects without requiring the encoding trickery now present in FileUserService (users.properties). This will open the door for more advanced Gitblit features.
For those upgrading from an earlier Gitblit version, a `users.conf` file will automatically be created for you from your existing `users.properties` file on your first launch of Gitblit <u>however</u> you will have to manually set *realm.userService=users.conf* to switch to the new user service.
The original `users.properties` file and the corresponding implementation are **deprecated**.''
- Teams for specifying user-repository access in bulk. Teams may also specify mailing lists addresses and pre- & post- receive hook scripts.
- Gravatar integration
- Activity page for aggregated repository activity. This is a timeline of commit activity over the last N days for one or more repositories.
- *Filters* menu for the Repositories page and Activity page. You can filter by federation set, team, and simple custom regular expressions. Custom expressions can be stored in `gitblit.properties` or `web.xml` or directly defined in your url (issue 27)
- Flash-based 1-step *copy to clipboard* of the primary repository url based on Clippy
- JavaScript-based 3-step (click, ctrl+c, enter) *copy to clipboard* of the primary repository url in the event that you do not want to use Flash on your installation
- Empty repositories now link to an *empty repository* page which gives some direction to the user for the next step in using Gitblit. This page displays the primary push/clone url of the repository and gives sample syntax for the git command-line client. (issue 31)
- Repositories with a *gh-pages* branch will now have a *pages* link which will serve the content of this branch. All resource requests are against the repository, Gitblit does not checkout/export this branch to a temporary filesystem. Jekyll templating is not supported.
- Gitblit Express bundle to get started running Gitblit on RedHat OpenShift cloud <span class="label label-warning">BETA</span>

changes:
- Dropped display of trailing .git from repository names
- ''Gitblit GO is now monolithic like the WAR build. (issue 30)
This change helps adoption of GO in environments without an internet connection or with a restricted connection.''
- Unit testing framework has been migrated to JUnit4 syntax and the test suite has been redesigned to run all unit tests, including rpc, federation, and git push/clone tests

fixes:
- Several a bugs in FileUserService related to cleaning up old repository permissions on a rename or delete
- Renaming a repository into a new subfolder failed (issue 33)

settings:
- { name: groovy.scriptsFolder, defaultValue: groovy }
- { name: groovy.preReceiveScripts, defaultValue: }
- { name: groovy.postReceiveScripts, defaultValue: }
- { name: mail.mailingLists, defaultValue: }
- { name: realm.userService, defaultValue: users.conf }
- { name: web.allowGravatar, defaultValue: 'true' }
- { name: web.activityDuration, defaultValue: 14 }
- { name: web.timeFormat, defaultValue: HH:mm }
- { name: web.datestampLongFormat, defaultValue: "EEEE, MMMM d, yyyy" }
- { name: web.customFilters, defaultValue: }
- { name: web.allowFlashCopyToClipboard, defaultValue: 'true' }

dependencyChanges:
- JGit 1.2.0
- Groovy 1.8.5
- Clippy

contributors:
- James Moger
}

#
# 0.7.0
#
r5: {
title: Gitblit 0.7.0 Released
id: 0.7.0
date: 2011-11-11

security:
- fixed security hole when cloning clone-restricted repository with TortoiseGit (issue 28)

fixes:
- ''federation protocol timestamps. dates are now serialized to the [iso8601](http://en.wikipedia.org/wiki/ISO_8601) standard.
**This breaks 0.6.0 federation clients/servers.**''
- collision on rename for repositories and users
- Gitblit can now browse the Linux kernel repository (issue 25)
- Gitblit now runs on Servlet 3.0 webservers (e.g. Tomcat 7, Jetty 8) (issue 23)
- Set the RSS content type of syndication feeds for Firefox 4 (issue 22)
- RSS feeds are now properly encoded to UTF-8
- RSS feeds now properly generate parameterized links if *web.mountParameters=false*
- Null pointer exception if did not set federation strategy (issue 20)
- Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later
changes:
- updated ui with Twitter Bootstrap CSS toolkit
- repositories list performance by caching repository sizes (issue 27)
- summary page performance by caching metric calculations (issue 25)
additions:
- authenticated JSON RPC mechanism
- Gitblit API RSS/JSON RPC library
- Gitblit Manager (Java/Swing Application) for remote administration of a Gitblit server.
- per-repository setting to skip size calculation (faster repositories page loading)
- per-repository setting to skip summary metrics calculation (faster summary page loading)
- IUserService.setup(IStoredSettings) for custom user service implementations
- setting to control Gitblit GO context path for proxy setups
- *combined-md5* password storage option which stores the hash of username+password as the password
- repository owners are automatically granted access for git, feeds, and zip downloads without explicitly selecting them
- RSS feeds now include regex substitutions on commit messages for bug trackers, etc
settings:
- { name: web.loginMessage, defaultValue: gitblit }
- { name: web.enableRpcServlet, defaultValue: 'true' }
- { name: web.enableRpcManagement, defaultValue: 'false' }
- { name: web.enableRpcAdministration, defaultValue: 'false' }
- { name: server.contextPath, defaultValue: / }
dependencyChanges:
- MarkdownPapers 1.2.5
- Wicket 1.4.19

contributors:
- James Moger
- github/dadalar
- github/alyandon
- github/trygvis
}

#
# 0.6.0
#
r4: {
title: Gitblit 0.6.0 Released
id: 0.6.0
date: 2011-09-27

fixes:
- syndication urls for WAR deployments
- authentication for zip downloads

additions:
- federation feature to allow gitblit instances (or gitblit federation clients) to pull repositories and, optionally, settings and accounts from other gitblit instances. This is something like [svn-sync](http://svnbook.red-bean.com/en/1.5/svn.ref.svnsync.html) for gitblit.
- user role *#notfederated* to prevent a user account from being pulled by a federated Gitblit instance

settings:
- { name: federation.name, defaultValue: }
- { name: federation.passphrase, defaultValue: }
- { name: federation.allowProposals, defaultValue: 'false' }
- { name: federation.proposalsFolder, defaultValue: proposals }
- { name: federation.defaultFrequency, defaultValue: 60 mins }
- { name: federation.sets, defaultValue: }
- { name: "mail.*", defaultValue: }
dependencyChanges:
- MarkdownPapers 1.1.1
- Wicket 1.4.18
- JGit 1.1.0
- google-gson
- javamail

contributors:
- James Moger
}

#
# 0.5.2
#
r3: {
title: Gitblit 0.5.2 Released
id: 0.5.2
date: 2011-07-27

fixes:
- active repositories with a HEAD that pointed to an empty branch caused internal errors (issue 14)
- bare-cloned repositories were listed as (empty) and were not clickable (issue 13)
- default port for Gitblit GO is now 8443 to be more linux/os x friendly (issue 12)
- repositories can now be reliably deleted and renamed (issue 10)
- users can now change their passwords (issue 1)
- always show root repository group first, i.e. do not sort root group with other groups
- tone-down repository group header color
additions:
- optionally display repository on-disk size on repositories page
- forward-slashes ('/', %2F) can be encoded using a custom character to workaround some servlet container default security measures for proxy servers
settings:
- { name: web.showRepositorySizes, defaultValue: 'true' }
- { name: web.forwardSlashCharacter, defaultValue: / }
dependencyChanges:
- MarkdownPapers 1.1.0
- Jetty 7.4.3

contributors:
- James Moger
}

#
# 0.5.1
#
r2: {
title: Gitblit 0.5.1 Released
id: 0.5.1
date: 2011-06-28

changes:
- clarified SSL certificate generation and configuration for both server-side and client-side
- added some more troubleshooting information to documentation
- replaced JavaService with Apache Commons Daemon

contributors:
- James Moger
}

#
# 0.5.0
#
r1: {
title: Gitblit 0.5.0 Released
id: 0.5.0
date: 2011-06-26
text: initial release

contributors:
- James Moger
}

snapshot: &r18
release: &r17
releases: &r[1..17]

Двоични данни
resources/arrow_page.png Целия файл


Двоични данни
resources/gitblt-favicon.png Целия файл


+ 0
- 54
src/com/gitblit/FederationClientLauncher.java Целия файл

@@ -1,54 +0,0 @@
/*
* Copyright 2011 gitblit.com.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gitblit;
import java.io.File;
import java.io.IOException;
import java.util.Collections;
import java.util.List;
import com.gitblit.build.Build;
/**
* Downloads dependencies and launches command-line Federation client.
*
* @author James Moger
*
*/
public class FederationClientLauncher {
public static void main(String[] args) {
// download federation client runtime dependencies
Build.federationClient();
File libFolder = new File("ext");
List<File> jars = Launcher.findJars(libFolder.getAbsoluteFile());
// sort the jars by name and then reverse the order so the newer version
// of the library gets loaded in the event that this is an upgrade
Collections.sort(jars);
Collections.reverse(jars);
for (File jar : jars) {
try {
Launcher.addJarFile(jar);
} catch (IOException e) {
}
}
FederationClient.main(args);
}
}

+ 0
- 405
src/com/gitblit/GitServlet.java Целия файл

@@ -1,405 +0,0 @@
/*
* Copyright 2011 gitblit.com.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gitblit;
import groovy.lang.Binding;
import groovy.util.GroovyScriptEngine;
import java.io.File;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.Collection;
import java.util.Enumeration;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import org.eclipse.jgit.http.server.resolver.DefaultReceivePackFactory;
import org.eclipse.jgit.http.server.resolver.DefaultUploadPackFactory;
import org.eclipse.jgit.lib.PersonIdent;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.transport.PostReceiveHook;
import org.eclipse.jgit.transport.PreReceiveHook;
import org.eclipse.jgit.transport.ReceiveCommand;
import org.eclipse.jgit.transport.ReceiveCommand.Result;
import org.eclipse.jgit.transport.ReceivePack;
import org.eclipse.jgit.transport.RefFilter;
import org.eclipse.jgit.transport.UploadPack;
import org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException;
import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.gitblit.Constants.AccessRestrictionType;
import com.gitblit.models.RepositoryModel;
import com.gitblit.models.UserModel;
import com.gitblit.utils.ClientLogger;
import com.gitblit.utils.HttpUtils;
import com.gitblit.utils.IssueUtils;
import com.gitblit.utils.JGitUtils;
import com.gitblit.utils.PushLogUtils;
import com.gitblit.utils.StringUtils;
/**
* The GitServlet exists to force configuration of the JGit GitServlet based on
* the Gitblit settings from either gitblit.properties or from context
* parameters in the web.xml file.
*
* It also implements and registers the Groovy hook mechanism.
*
* Access to this servlet is protected by the GitFilter.
*
* @author James Moger
*
*/
public class GitServlet extends org.eclipse.jgit.http.server.GitServlet {
private static final long serialVersionUID = 1L;
private GroovyScriptEngine gse;
private File groovyDir;
@Override
public void init(ServletConfig config) throws ServletException {
groovyDir = GitBlit.getGroovyScriptsFolder();
try {
// set Grape root
File grapeRoot = GitBlit.getFileOrFolder(Keys.groovy.grapeFolder, "${baseFolder}/groovy/grape").getAbsoluteFile();
grapeRoot.mkdirs();
System.setProperty("grape.root", grapeRoot.getAbsolutePath());
gse = new GroovyScriptEngine(groovyDir.getAbsolutePath());
} catch (IOException e) {
throw new ServletException("Failed to instantiate Groovy Script Engine!", e);
}
// set the Gitblit receive hook
setReceivePackFactory(new DefaultReceivePackFactory() {
@Override
public ReceivePack create(HttpServletRequest req, Repository db)
throws ServiceNotEnabledException, ServiceNotAuthorizedException {
// determine repository name from request
String repositoryName = req.getPathInfo().substring(1);
repositoryName = GitFilter.getRepositoryName(repositoryName);
GitblitReceiveHook hook = new GitblitReceiveHook();
hook.repositoryName = repositoryName;
hook.gitblitUrl = HttpUtils.getGitblitURL(req);
ReceivePack rp = super.create(req, db);
rp.setPreReceiveHook(hook);
rp.setPostReceiveHook(hook);
// determine pushing user
PersonIdent person = rp.getRefLogIdent();
UserModel user = GitBlit.self().getUserModel(person.getName());
if (user == null) {
// anonymous push, create a temporary usermodel
user = new UserModel(person.getName());
}
// enforce advanced ref permissions
RepositoryModel repository = GitBlit.self().getRepositoryModel(repositoryName);
rp.setAllowCreates(user.canCreateRef(repository));
rp.setAllowDeletes(user.canDeleteRef(repository));
rp.setAllowNonFastForwards(user.canRewindRef(repository));
if (repository.isFrozen) {
throw new ServiceNotEnabledException();
}
return rp;
}
});
// override the default upload pack to exclude gitblit refs
setUploadPackFactory(new DefaultUploadPackFactory() {
@Override
public UploadPack create(final HttpServletRequest req, final Repository db)
throws ServiceNotEnabledException, ServiceNotAuthorizedException {
UploadPack up = super.create(req, db);
RefFilter refFilter = new RefFilter() {
@Override
public Map<String, Ref> filter(Map<String, Ref> refs) {
// admin accounts can access all refs
UserModel user = GitBlit.self().authenticate(req);
if (user == null) {
user = UserModel.ANONYMOUS;
}
if (user.canAdmin()) {
return refs;
}
// normal users can not clone gitblit refs
refs.remove(IssueUtils.GB_ISSUES);
refs.remove(PushLogUtils.GB_PUSHES);
return refs;
}
};
up.setRefFilter(refFilter);
return up;
}
});
super.init(new GitblitServletConfig(config));
}
/**
* Transitional wrapper class to configure the JGit 1.2 GitFilter. This
* GitServlet will probably be replaced by a GitFilter so that Gitblit can
* serve Git repositories on the root URL and not a /git sub-url.
*
* @author James Moger
*
*/
private class GitblitServletConfig implements ServletConfig {
final ServletConfig config;
GitblitServletConfig(ServletConfig config) {
this.config = config;
}
@Override
public String getServletName() {
return config.getServletName();
}
@Override
public ServletContext getServletContext() {
return config.getServletContext();
}
@Override
public String getInitParameter(String name) {
if (name.equals("base-path")) {
return GitBlit.getRepositoriesFolder().getAbsolutePath();
} else if (name.equals("export-all")) {
return "1";
}
return config.getInitParameter(name);
}
@Override
public Enumeration<String> getInitParameterNames() {
return config.getInitParameterNames();
}
}
/**
* The Gitblit receive hook allows for special processing on push events.
* That might include rejecting writes to specific branches or executing a
* script.
*
* @author James Moger
*
*/
private class GitblitReceiveHook implements PreReceiveHook, PostReceiveHook {
protected final Logger logger = LoggerFactory.getLogger(GitblitReceiveHook.class);
protected String repositoryName;
protected String gitblitUrl;
/**
* Instrumentation point where the incoming push event has been parsed,
* validated, objects created BUT refs have not been updated. You might
* use this to enforce a branch-write permissions model.
*/
@Override
public void onPreReceive(ReceivePack rp, Collection<ReceiveCommand> commands) {
RepositoryModel repository = GitBlit.self().getRepositoryModel(repositoryName);
UserModel user = getUserModel(rp);
if (repository.accessRestriction.atLeast(AccessRestrictionType.PUSH) && repository.verifyCommitter) {
if (StringUtils.isEmpty(user.emailAddress)) {
// emit warning if user does not have an email address
logger.warn(MessageFormat.format("Consider setting an email address for {0} ({1}) to improve committer verification.", user.getDisplayName(), user.username));
}
// Optionally enforce that the committer of the left parent chain
// match the account being used to push the commits.
//
// This requires all merge commits are executed with the "--no-ff"
// option to force a merge commit even if fast-forward is possible.
// This ensures that the chain of left parents has the commit
// identity of the merging user.
for (ReceiveCommand cmd : commands) {
try {
List<RevCommit> commits = JGitUtils.getRevLog(rp.getRepository(), cmd.getOldId().name(), cmd.getNewId().name());
for (RevCommit commit : commits) {
PersonIdent committer = commit.getCommitterIdent();
if (!user.is(committer.getName(), committer.getEmailAddress())) {
String reason;
if (StringUtils.isEmpty(user.emailAddress)) {
// account does not have en email address
reason = MessageFormat.format("{0} by {1} <{2}> was not committed by {3} ({4})", commit.getId().name(), committer.getName(), StringUtils.isEmpty(committer.getEmailAddress()) ? "?":committer.getEmailAddress(), user.getDisplayName(), user.username);
} else {
// account has an email address
reason = MessageFormat.format("{0} by {1} <{2}> was not committed by {3} ({4}) <{5}>", commit.getId().name(), committer.getName(), StringUtils.isEmpty(committer.getEmailAddress()) ? "?":committer.getEmailAddress(), user.getDisplayName(), user.username, user.emailAddress);
}
cmd.setResult(Result.REJECTED_OTHER_REASON, reason);
break;
}
}
} catch (Exception e) {
logger.error("Failed to verify commits were made by pushing user", e);
}
}
}
Set<String> scripts = new LinkedHashSet<String>();
scripts.addAll(GitBlit.self().getPreReceiveScriptsInherited(repository));
scripts.addAll(repository.preReceiveScripts);
runGroovy(repository, user, commands, rp, scripts);
for (ReceiveCommand cmd : commands) {
if (!Result.NOT_ATTEMPTED.equals(cmd.getResult())) {
logger.warn(MessageFormat.format("{0} {1} because \"{2}\"", cmd.getNewId()
.getName(), cmd.getResult(), cmd.getMessage()));
}
}
}
/**
* Instrumentation point where the incoming push has been applied to the
* repository. This is the point where we would trigger a Jenkins build
* or send an email.
*/
@Override
public void onPostReceive(ReceivePack rp, Collection<ReceiveCommand> commands) {
if (commands.size() == 0) {
logger.info("skipping post-receive hooks, no refs created, updated, or removed");
return;
}
UserModel user = getUserModel(rp);
RepositoryModel repository = GitBlit.self().getRepositoryModel(repositoryName);
// log ref changes
for (ReceiveCommand cmd : commands) {
if (Result.OK.equals(cmd.getResult())) {
// add some logging for important ref changes
switch (cmd.getType()) {
case DELETE:
logger.info(MessageFormat.format("{0} DELETED {1} in {2} ({3})", user.username, cmd.getRefName(), repository.name, cmd.getOldId().name()));
break;
case CREATE:
logger.info(MessageFormat.format("{0} CREATED {1} in {2}", user.username, cmd.getRefName(), repository.name));
break;
case UPDATE_NONFASTFORWARD:
logger.info(MessageFormat.format("{0} UPDATED NON-FAST-FORWARD {1} in {2} (from {3} to {4})", user.username, cmd.getRefName(), repository.name, cmd.getOldId().name(), cmd.getNewId().name()));
break;
default:
break;
}
}
}
// update push log
try {
PushLogUtils.updatePushLog(user, rp.getRepository(), commands);
logger.info(MessageFormat.format("{0} push log updated", repository.name));
} catch (Exception e) {
logger.error(MessageFormat.format("Failed to update {0} pushlog", repository.name), e);
}
// run Groovy hook scripts
Set<String> scripts = new LinkedHashSet<String>();
scripts.addAll(GitBlit.self().getPostReceiveScriptsInherited(repository));
scripts.addAll(repository.postReceiveScripts);
runGroovy(repository, user, commands, rp, scripts);
}
/**
* Returns the UserModel for the user pushing the changes.
*
* @param rp
* @return a UserModel
*/
protected UserModel getUserModel(ReceivePack rp) {
PersonIdent person = rp.getRefLogIdent();
UserModel user = GitBlit.self().getUserModel(person.getName());
if (user == null) {
// anonymous push, create a temporary usermodel
user = new UserModel(person.getName());
user.isAuthenticated = false;
}
return user;
}
/**
* Runs the specified Groovy hook scripts.
*
* @param repository
* @param user
* @param commands
* @param scripts
*/
protected void runGroovy(RepositoryModel repository, UserModel user,
Collection<ReceiveCommand> commands, ReceivePack rp, Set<String> scripts) {
if (scripts == null || scripts.size() == 0) {
// no Groovy scripts to execute
return;
}
Binding binding = new Binding();
binding.setVariable("gitblit", GitBlit.self());
binding.setVariable("repository", repository);
binding.setVariable("receivePack", rp);
binding.setVariable("user", user);
binding.setVariable("commands", commands);
binding.setVariable("url", gitblitUrl);
binding.setVariable("logger", logger);
binding.setVariable("clientLogger", new ClientLogger(rp));
for (String script : scripts) {
if (StringUtils.isEmpty(script)) {
continue;
}
// allow script to be specified without .groovy extension
// this is easier to read in the settings
File file = new File(groovyDir, script);
if (!file.exists() && !script.toLowerCase().endsWith(".groovy")) {
file = new File(groovyDir, script + ".groovy");
if (file.exists()) {
script = file.getName();
}
}
try {
Object result = gse.run(script, binding);
if (result instanceof Boolean) {
if (!((Boolean) result)) {
logger.error(MessageFormat.format(
"Groovy script {0} has failed! Hook scripts aborted.", script));
break;
}
}
} catch (Exception e) {
logger.error(
MessageFormat.format("Failed to execute Groovy script {0}", script), e);
}
}
}
}
}

+ 0
- 400
src/com/gitblit/ServletRequestWrapper.java Целия файл

@@ -1,400 +0,0 @@
/*
* Copyright 2011 gitblit.com.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gitblit;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.Principal;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Locale;
import java.util.Map;
import javax.servlet.AsyncContext;
import javax.servlet.DispatcherType;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletInputStream;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.http.Part;
/**
* ServletRequestWrapper is a pass-through/delegate wrapper class for a servlet
* request. This class is used in conjunction with ServletFilters, such as the
* AccessRestrictionFilter.
*
* The original request is wrapped by instances of this class and this class is
* set as the servlet request in the filter. This allows for specialized
* implementations of request methods, like getUserPrincipal() with delegation
* to the original request for any method not overridden.
*
* This class, by itself, is not altogether interesting. Subclasses of this
* class, however, are of interest.
*
* @author James Moger
*
*/
public abstract class ServletRequestWrapper implements HttpServletRequest {
protected final HttpServletRequest req;
public ServletRequestWrapper(HttpServletRequest req) {
this.req = req;
}
@Override
public Object getAttribute(String name) {
return req.getAttribute(name);
}
@Override
public Enumeration getAttributeNames() {
return req.getAttributeNames();
}
@Override
public String getCharacterEncoding() {
return req.getCharacterEncoding();
}
@Override
public void setCharacterEncoding(String env) throws UnsupportedEncodingException {
req.setCharacterEncoding(env);
}
@Override
public int getContentLength() {
return req.getContentLength();
}
@Override
public String getContentType() {
return req.getContentType();
}
@Override
public ServletInputStream getInputStream() throws IOException {
return req.getInputStream();
}
@Override
public String getParameter(String name) {
return req.getParameter(name);
}
@Override
public Enumeration getParameterNames() {
return req.getParameterNames();
}
@Override
public String[] getParameterValues(String name) {
return req.getParameterValues(name);
}
@Override
public Map getParameterMap() {
return req.getParameterMap();
}
@Override
public String getProtocol() {
return req.getProtocol();
}
@Override
public String getScheme() {
return req.getScheme();
}
@Override
public String getServerName() {
return req.getServerName();
}
@Override
public int getServerPort() {
return req.getServerPort();
}
@Override
public BufferedReader getReader() throws IOException {
return req.getReader();
}
@Override
public String getRemoteAddr() {
return req.getRemoteAddr();
}
@Override
public String getRemoteHost() {
return req.getRemoteHost();
}
@Override
public void setAttribute(String name, Object o) {
req.setAttribute(name, o);
}
@Override
public void removeAttribute(String name) {
req.removeAttribute(name);
}
@Override
public Locale getLocale() {
return req.getLocale();
}
@Override
public Enumeration getLocales() {
return req.getLocales();
}
@Override
public boolean isSecure() {
return req.isSecure();
}
@Override
public RequestDispatcher getRequestDispatcher(String path) {
return req.getRequestDispatcher(path);
}
@Override
@Deprecated
public String getRealPath(String path) {
return req.getRealPath(path);
}
@Override
public int getRemotePort() {
return req.getRemotePort();
}
@Override
public String getLocalName() {
return req.getLocalName();
}
@Override
public String getLocalAddr() {
return req.getLocalAddr();
}
@Override
public int getLocalPort() {
return req.getLocalPort();
}
@Override
public String getAuthType() {
return req.getAuthType();
}
@Override
public Cookie[] getCookies() {
return req.getCookies();
}
@Override
public long getDateHeader(String name) {
return req.getDateHeader(name);
}
@Override
public String getHeader(String name) {
return req.getHeader(name);
}
@Override
public Enumeration getHeaders(String name) {
return req.getHeaders(name);
}
@Override
public Enumeration getHeaderNames() {
return req.getHeaderNames();
}
@Override
public int getIntHeader(String name) {
return req.getIntHeader(name);
}
@Override
public String getMethod() {
return req.getMethod();
}
@Override
public String getPathInfo() {
return req.getPathInfo();
}
@Override
public String getPathTranslated() {
return req.getPathTranslated();
}
@Override
public String getContextPath() {
return req.getContextPath();
}
@Override
public String getQueryString() {
return req.getQueryString();
}
@Override
public String getRemoteUser() {
return req.getRemoteUser();
}
@Override
public boolean isUserInRole(String role) {
return req.isUserInRole(role);
}
@Override
public Principal getUserPrincipal() {
return req.getUserPrincipal();
}
@Override
public String getRequestedSessionId() {
return req.getRequestedSessionId();
}
@Override
public String getRequestURI() {
return req.getRequestURI();
}
@Override
public StringBuffer getRequestURL() {
return req.getRequestURL();
}
@Override
public String getServletPath() {
return req.getServletPath();
}
@Override
public HttpSession getSession(boolean create) {
return req.getSession(create);
}
@Override
public HttpSession getSession() {
return req.getSession();
}
@Override
public boolean isRequestedSessionIdValid() {
return req.isRequestedSessionIdValid();
}
@Override
public boolean isRequestedSessionIdFromCookie() {
return req.isRequestedSessionIdFromCookie();
}
@Override
public boolean isRequestedSessionIdFromURL() {
return req.isRequestedSessionIdFromURL();
}
@Override
@Deprecated
public boolean isRequestedSessionIdFromUrl() {
return req.isRequestedSessionIdFromUrl();
}
/*
* Servlet 3.0 Methods
*/
@Override
public boolean authenticate(HttpServletResponse response) throws IOException, ServletException {
return false;
}
@Override
public void login(String username, String password) throws ServletException {
}
@Override
public void logout() throws ServletException {
}
@Override
public Part getPart(String arg0) throws IOException, ServletException {
return req.getPart(arg0);
}
@Override
public Collection<Part> getParts() throws IOException, ServletException {
return req.getParts();
}
@Override
public AsyncContext getAsyncContext() {
return req.getAsyncContext();
}
@Override
public DispatcherType getDispatcherType() {
return req.getDispatcherType();
}
@Override
public ServletContext getServletContext() {
return req.getServletContext();
}
@Override
public boolean isAsyncStarted() {
return req.isAsyncStarted();
}
@Override
public boolean isAsyncSupported() {
return req.isAsyncStarted();
}
@Override
public AsyncContext startAsync() throws IllegalStateException {
return req.startAsync();
}
@Override
public AsyncContext startAsync(ServletRequest arg0, ServletResponse arg1)
throws IllegalStateException {
return req.startAsync(arg0, arg1);
}
}

+ 0
- 967
src/com/gitblit/build/Build.java Целия файл

@@ -1,967 +0,0 @@
/*
* Copyright 2011 gitblit.com.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gitblit.build;
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStream;
import java.io.RandomAccessFile;
import java.net.URL;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Properties;
import com.gitblit.Constants;
import com.gitblit.utils.StringUtils;
/**
* The Build class downloads runtime and compile-time jar files from the Apache
* or Eclipse Maven repositories.
*
* It also generates the Keys class from the gitblit.properties file.
*
* Its important that this class have minimal compile dependencies since its
* called very early in the build script.
*
* @author James Moger
*
*/
public class Build {
private static final String osName = System.getProperty("os.name");
public interface DownloadListener {
public void downloading(String name);
}
/**
* BuildType enumeration representing compile-time or runtime. This is used
* to download dependencies either for Gitblit GO runtime or for setting up
* a development environment.
*/
public static enum BuildType {
RUNTIME, COMPILETIME;
}
private static DownloadListener downloadListener;
public static void main(String... args) {
runtime();
compiletime();
buildSettingKeys();
delete(
"bcmail-jdk16-1.46.jar",
"bcprov-jdk16-1.46.jar",
"src/bcmail-jdk16-1.46-sources.jar",
"src/bcprov-jdk16-1.46-sources.jar");
}
public static void runtime() {
downloadFromApache(MavenObject.JCOMMANDER, BuildType.RUNTIME);
downloadFromApache(MavenObject.JETTY, BuildType.RUNTIME);
downloadFromApache(MavenObject.JETTY_AJP, BuildType.RUNTIME);
downloadFromApache(MavenObject.SERVLET, BuildType.RUNTIME);
downloadFromApache(MavenObject.SLF4JAPI, BuildType.RUNTIME);
downloadFromApache(MavenObject.SLF4LOG4J, BuildType.RUNTIME);
downloadFromApache(MavenObject.LOG4J, BuildType.RUNTIME);
downloadFromApache(MavenObject.WICKET, BuildType.RUNTIME);
downloadFromApache(MavenObject.WICKET_EXT, BuildType.RUNTIME);
downloadFromApache(MavenObject.WICKET_AUTH_ROLES, BuildType.RUNTIME);
downloadFromApache(MavenObject.WICKET_GOOGLE_CHARTS, BuildType.RUNTIME);
downloadFromApache(MavenObject.MARKDOWNPAPERS, BuildType.RUNTIME);
downloadFromApache(MavenObject.BOUNCYCASTLE, BuildType.RUNTIME);
downloadFromApache(MavenObject.BOUNCYCASTLE_MAIL, BuildType.RUNTIME);
downloadFromApache(MavenObject.BOUNCYCASTLE_PKIX, BuildType.RUNTIME);
downloadFromApache(MavenObject.JSCH, BuildType.RUNTIME);
downloadFromApache(MavenObject.ROME, BuildType.RUNTIME);
downloadFromApache(MavenObject.JDOM, BuildType.RUNTIME);
downloadFromApache(MavenObject.GSON, BuildType.RUNTIME);
downloadFromApache(MavenObject.MAIL, BuildType.RUNTIME);
downloadFromApache(MavenObject.GROOVY, BuildType.RUNTIME);
downloadFromApache(MavenObject.LUCENE, BuildType.RUNTIME);
downloadFromApache(MavenObject.LUCENE_HIGHLIGHTER, BuildType.RUNTIME);
downloadFromApache(MavenObject.LUCENE_MEMORY, BuildType.RUNTIME);
downloadFromApache(MavenObject.LUCENE_QUERIES, BuildType.RUNTIME);
downloadFromApache(MavenObject.JAKARTA_REGEXP, BuildType.RUNTIME);
downloadFromApache(MavenObject.UNBOUND_ID, BuildType.RUNTIME);
downloadFromApache(MavenObject.IVY, BuildType.RUNTIME);
downloadFromApache(MavenObject.JCALENDAR, BuildType.RUNTIME);
downloadFromApache(MavenObject.COMMONS_COMPRESS, BuildType.RUNTIME);
downloadFromApache(MavenObject.XZ, BuildType.RUNTIME);
//needed for selenium ui tests
downloadFromApacheToExtSelenium(MavenObject.SEL_API, BuildType.RUNTIME);
downloadFromApacheToExtSelenium(MavenObject.SEL_FF, BuildType.RUNTIME);
downloadFromApacheToExtSelenium(MavenObject.SEL_JAVA, BuildType.RUNTIME);
downloadFromApacheToExtSelenium(MavenObject.SEL_REMOTE, BuildType.RUNTIME);
downloadFromApacheToExtSelenium(MavenObject.SEL_SUPPORT, BuildType.RUNTIME);
downloadFromApacheToExtSelenium(MavenObject.GUAVA, BuildType.RUNTIME);
downloadFromApacheToExtSelenium(MavenObject.JSON, BuildType.RUNTIME);
downloadFromApacheToExtSelenium(MavenObject.COMMONS_EXEC, BuildType.RUNTIME);
downloadFromApacheToExtSelenium(MavenObject.HTTPCLIENT, BuildType.RUNTIME);
downloadFromApacheToExtSelenium(MavenObject.HTTPCORE, BuildType.RUNTIME);
downloadFromApacheToExtSelenium(MavenObject.HTTPMIME, BuildType.RUNTIME);
downloadFromApacheToExtSelenium(MavenObject.COMMONS_LOGGING, BuildType.RUNTIME);
downloadFromEclipse(MavenObject.JGIT, BuildType.RUNTIME);
downloadFromEclipse(MavenObject.JGIT_HTTP, BuildType.RUNTIME);
}
public static void compiletime() {
downloadFromApache(MavenObject.JUNIT, BuildType.RUNTIME);
downloadFromApache(MavenObject.HAMCREST, BuildType.RUNTIME);
downloadFromApache(MavenObject.JCOMMANDER, BuildType.COMPILETIME);
downloadFromApache(MavenObject.JETTY, BuildType.COMPILETIME);
downloadFromApache(MavenObject.JETTY_AJP, BuildType.COMPILETIME);
downloadFromApache(MavenObject.SERVLET, BuildType.COMPILETIME);
downloadFromApache(MavenObject.SLF4JAPI, BuildType.COMPILETIME);
downloadFromApache(MavenObject.SLF4LOG4J, BuildType.COMPILETIME);
downloadFromApache(MavenObject.LOG4J, BuildType.COMPILETIME);
downloadFromApache(MavenObject.WICKET, BuildType.COMPILETIME);
downloadFromApache(MavenObject.WICKET_EXT, BuildType.COMPILETIME);
downloadFromApache(MavenObject.WICKET_AUTH_ROLES, BuildType.COMPILETIME);
downloadFromApache(MavenObject.WICKET_GOOGLE_CHARTS, BuildType.COMPILETIME);
downloadFromApache(MavenObject.MARKDOWNPAPERS, BuildType.COMPILETIME);
downloadFromApache(MavenObject.BOUNCYCASTLE, BuildType.COMPILETIME);
downloadFromApache(MavenObject.BOUNCYCASTLE_MAIL, BuildType.COMPILETIME);
downloadFromApache(MavenObject.BOUNCYCASTLE_PKIX, BuildType.COMPILETIME);
downloadFromApache(MavenObject.JSCH, BuildType.COMPILETIME);
downloadFromApache(MavenObject.ROME, BuildType.COMPILETIME);
downloadFromApache(MavenObject.JDOM, BuildType.COMPILETIME);
downloadFromApache(MavenObject.GSON, BuildType.COMPILETIME);
downloadFromApache(MavenObject.MAIL, BuildType.COMPILETIME);
downloadFromApache(MavenObject.GROOVY, BuildType.COMPILETIME);
downloadFromApache(MavenObject.LUCENE, BuildType.COMPILETIME);
downloadFromApache(MavenObject.LUCENE_HIGHLIGHTER, BuildType.COMPILETIME);
downloadFromApache(MavenObject.LUCENE_MEMORY, BuildType.COMPILETIME);
downloadFromApache(MavenObject.LUCENE_QUERIES, BuildType.COMPILETIME);
downloadFromApache(MavenObject.JAKARTA_REGEXP, BuildType.COMPILETIME);
downloadFromApache(MavenObject.UNBOUND_ID, BuildType.COMPILETIME);
downloadFromApache(MavenObject.IVY, BuildType.COMPILETIME);
downloadFromApache(MavenObject.JCALENDAR, BuildType.COMPILETIME);
downloadFromApache(MavenObject.COMMONS_COMPRESS, BuildType.COMPILETIME);
downloadFromApache(MavenObject.XZ, BuildType.COMPILETIME);
//needed for selenium ui tests
downloadFromApacheToExtSelenium(MavenObject.SEL_API, BuildType.COMPILETIME);
downloadFromApacheToExtSelenium(MavenObject.SEL_FF, BuildType.COMPILETIME);
downloadFromApacheToExtSelenium(MavenObject.SEL_JAVA, BuildType.COMPILETIME);
downloadFromApacheToExtSelenium(MavenObject.SEL_REMOTE, BuildType.COMPILETIME);
downloadFromApacheToExtSelenium(MavenObject.SEL_SUPPORT, BuildType.COMPILETIME);
downloadFromApacheToExtSelenium(MavenObject.GUAVA, BuildType.COMPILETIME);
downloadFromApacheToExtSelenium(MavenObject.JSON, BuildType.COMPILETIME);
downloadFromApacheToExtSelenium(MavenObject.COMMONS_EXEC, BuildType.COMPILETIME);
downloadFromApacheToExtSelenium(MavenObject.HTTPCLIENT, BuildType.COMPILETIME);
downloadFromApacheToExtSelenium(MavenObject.HTTPCORE, BuildType.COMPILETIME);
downloadFromApacheToExtSelenium(MavenObject.HTTPMIME, BuildType.COMPILETIME);
downloadFromApacheToExtSelenium(MavenObject.COMMONS_LOGGING, BuildType.COMPILETIME);
downloadFromEclipse(MavenObject.JGIT, BuildType.COMPILETIME);
downloadFromEclipse(MavenObject.JGIT_HTTP, BuildType.COMPILETIME);
// needed for site publishing
downloadFromApache(MavenObject.COMMONSNET, BuildType.RUNTIME);
}
private static void delete(String... files) {
for (String name : files) {
File file = new File("ext", name);
if (file.exists()) {
file.delete();
}
}
}
public static void federationClient() {
downloadFromApache(MavenObject.JCOMMANDER, BuildType.RUNTIME);
downloadFromApache(MavenObject.SERVLET, BuildType.RUNTIME);
downloadFromApache(MavenObject.MAIL, BuildType.RUNTIME);
downloadFromApache(MavenObject.SLF4JAPI, BuildType.RUNTIME);
downloadFromApache(MavenObject.SLF4LOG4J, BuildType.RUNTIME);
downloadFromApache(MavenObject.LOG4J, BuildType.RUNTIME);
downloadFromApache(MavenObject.GSON, BuildType.RUNTIME);
downloadFromApache(MavenObject.JSCH, BuildType.RUNTIME);
downloadFromApache(MavenObject.LUCENE, BuildType.RUNTIME);
downloadFromApache(MavenObject.LUCENE_HIGHLIGHTER, BuildType.RUNTIME);
downloadFromApache(MavenObject.LUCENE_MEMORY, BuildType.RUNTIME);
downloadFromApache(MavenObject.LUCENE_QUERIES, BuildType.RUNTIME);
downloadFromApache(MavenObject.JAKARTA_REGEXP, BuildType.RUNTIME);
downloadFromEclipse(MavenObject.JGIT, BuildType.RUNTIME);
}
public static void manager(DownloadListener listener) {
downloadListener = listener;
downloadFromApache(MavenObject.GSON, BuildType.RUNTIME);
downloadFromApache(MavenObject.ROME, BuildType.RUNTIME);
downloadFromApache(MavenObject.JDOM, BuildType.RUNTIME);
downloadFromApache(MavenObject.JSCH, BuildType.RUNTIME);
downloadFromEclipse(MavenObject.JGIT, BuildType.RUNTIME);
}
public static void authority(DownloadListener listener) {
downloadListener = listener;
downloadFromApache(MavenObject.JCOMMANDER, BuildType.RUNTIME);
downloadFromApache(MavenObject.JSCH, BuildType.RUNTIME);
downloadFromApache(MavenObject.SLF4JAPI, BuildType.RUNTIME);
downloadFromApache(MavenObject.SLF4LOG4J, BuildType.RUNTIME);
downloadFromApache(MavenObject.LOG4J, BuildType.RUNTIME);
downloadFromApache(MavenObject.BOUNCYCASTLE, BuildType.RUNTIME);
downloadFromApache(MavenObject.BOUNCYCASTLE_MAIL, BuildType.RUNTIME);
downloadFromApache(MavenObject.BOUNCYCASTLE_PKIX, BuildType.RUNTIME);
downloadFromApache(MavenObject.JCALENDAR, BuildType.RUNTIME);
downloadFromApache(MavenObject.MAIL, BuildType.RUNTIME);
downloadFromEclipse(MavenObject.JGIT, BuildType.RUNTIME);
}
/**
* Builds the Keys class based on the gitblit.properties file and inserts
* the class source into the project source folder.
*/
public static void buildSettingKeys() {
// Load all keys
Properties properties = new Properties();
FileInputStream is = null;
try {
is = new FileInputStream(new File("distrib", Constants.PROPERTIES_FILE));
properties.load(is);
} catch (Throwable t) {
t.printStackTrace();
} finally {
if (is != null) {
try {
is.close();
} catch (Throwable t) {
// IGNORE
}
}
}
List<String> keys = new ArrayList<String>(properties.stringPropertyNames());
Collections.sort(keys);
KeyGroup root = new KeyGroup();
for (String key : keys) {
root.addKey(key);
}
// Save Keys class definition
try {
File file = new File("src/com/gitblit/Keys.java");
FileWriter fw = new FileWriter(file, false);
fw.write(root.generateClass("com.gitblit", "Keys"));
fw.close();
} catch (Throwable t) {
t.printStackTrace();
}
}
private static class KeyGroup {
final KeyGroup parent;
final String namespace;
String name;
List<KeyGroup> children;
List<String> fields;
KeyGroup() {
this.parent = null;
this.namespace = "";
this.name = "";
}
KeyGroup(String namespace, KeyGroup parent) {
this.parent = parent;
this.namespace = namespace;
if (parent.children == null) {
parent.children = new ArrayList<KeyGroup>();
}
parent.children.add(this);
}
void addKey(String key) {
String keyspace = "";
String field = key;
if (key.indexOf('.') > -1) {
keyspace = key.substring(0, key.lastIndexOf('.'));
field = key.substring(key.lastIndexOf('.') + 1);
KeyGroup group = addKeyGroup(keyspace);
group.addKey(field);
} else {
if (fields == null) {
fields = new ArrayList<String>();
}
fields.add(key);
}
}
KeyGroup addKeyGroup(String keyspace) {
KeyGroup parent = this;
KeyGroup node = null;
String [] space = keyspace.split("\\.");
for (int i = 0; i < space.length; i++) {
StringBuilder namespace = new StringBuilder();
for (int j = 0; j <= i; j++) {
namespace.append(space[j]);
if (j < i) {
namespace.append('.');
}
}
if (parent.children != null) {
for (KeyGroup child : parent.children) {
if (child.name.equals(space[i])) {
node = child;
}
}
}
if (node == null) {
node = new KeyGroup(namespace.toString(), parent);
node.name = space[i];
}
parent = node;
node = null;
}
return parent;
}
String fullKey(String field) {
if (namespace.equals("")) {
return field;
}
return namespace + "." + field;
}
String generateClass(String packageName, String className) {
StringBuilder sb = new StringBuilder();
sb.append("package ").append(packageName).append(";\n");
sb.append('\n');
sb.append("/*\n");
sb.append(" * This class is auto-generated from the properties file.\n");
sb.append(" * Do not version control!\n");
sb.append(" */\n");
sb.append(MessageFormat.format("public final class {0} '{'\n\n", className));
sb.append(generateClass(this, 0));
sb.append("}\n");
return sb.toString();
}
String generateClass(KeyGroup group, int level) {
String classIndent = StringUtils.leftPad("", level, '\t');
String fieldIndent = StringUtils.leftPad("", level + 1, '\t');
// begin class
StringBuilder sb = new StringBuilder();
if (!group.namespace.equals("")) {
sb.append(classIndent).append(MessageFormat.format("public static final class {0} '{'\n\n", group.name));
sb.append(fieldIndent).append(MessageFormat.format("public static final String _ROOT = \"{0}\";\n\n", group.namespace));
}
if (group.fields != null) {
// fields
for (String field : group.fields) {
sb.append(fieldIndent).append(MessageFormat.format("public static final String {0} = \"{1}\";\n\n", field, group.fullKey(field)));
}
}
if (group.children != null) {
// inner classes
for (KeyGroup child : group.children) {
sb.append(generateClass(child, level + 1));
}
}
// end class
if (!group.namespace.equals("")) {
sb.append(classIndent).append("}\n\n");
}
return sb.toString();
}
}
/**
* Download a file from the official Apache Maven repository.
*
* @param mo
* the maven object to download.
* @return
*/
private static List<File> downloadFromApache(MavenObject mo, BuildType type) {
return downloadFromMaven("http://repo1.maven.org/maven2/", mo, type);
}
/**
* Download a file from the official Eclipse Maven repository.
*
* @param mo
* the maven object to download.
* @return
*/
private static List<File> downloadFromEclipse(MavenObject mo, BuildType type) {
return downloadFromMaven("http://download.eclipse.org/jgit/maven/", mo, type);
}
/**
* Download a file from a Maven repository.
*
* @param mo
* the maven object to download.
* @return
*/
private static List<File> downloadFromMaven(String mavenRoot, MavenObject mo, BuildType type, String targetFolder) {
List<File> downloads = new ArrayList<File>();
String[] jars = { "" };
if (BuildType.RUNTIME.equals(type)) {
jars = new String[] { "" };
} else if (BuildType.COMPILETIME.equals(type)) {
jars = new String[] { "-sources" };
}
for (String jar : jars) {
File targetFile = mo.getLocalFile(targetFolder, jar);
if ("-sources".equals(jar)) {
File relocated = new File(targetFolder+"/src", targetFile.getName());
if (targetFile.exists()) {
// move -sources jar to ext/src folder
targetFile.renameTo(relocated);
}
// -sources jars are located in ext/src
targetFile = relocated;
}
if (targetFile.exists()) {
downloads.add(targetFile);
removeObsoleteArtifacts(mo, type, targetFile.getParentFile());
continue;
}
String expectedSHA1 = mo.getSHA1(jar);
if (expectedSHA1 == null) {
// skip this jar
continue;
}
float approximateLength = mo.getApproximateLength(jar);
String mavenURL = mavenRoot + mo.getRepositoryPath(jar);
if (!targetFile.getAbsoluteFile().getParentFile().exists()) {
boolean success = targetFile.getAbsoluteFile().getParentFile().mkdirs();
if (!success) {
throw new RuntimeException("Failed to create destination folder structure!");
}
}
if (downloadListener != null) {
downloadListener.downloading(mo.name + "...");
}
ByteArrayOutputStream buff = new ByteArrayOutputStream();
try {
URL url = new URL(mavenURL);
InputStream in = new BufferedInputStream(url.openStream());
byte[] buffer = new byte[4096];
int downloadedLen = 0;
float lastProgress = 0f;
updateDownload(0, targetFile);
while (true) {
int len = in.read(buffer);
if (len < 0) {
break;
}
downloadedLen += len;
buff.write(buffer, 0, len);
float progress = downloadedLen / approximateLength;
if (progress - lastProgress >= 0.1f) {
lastProgress = progress;
updateDownload(progress, targetFile);
if (downloadListener != null) {
int percent = Math.min(100, Math.round(100 * progress));
downloadListener.downloading(mo.name + " (" + percent + "%)");
}
}
}
in.close();
updateDownload(1f, targetFile);
if (downloadListener != null) {
downloadListener.downloading(mo.name + " (100%)");
}
} catch (IOException e) {
throw new RuntimeException("Error downloading " + mavenURL + " to " + targetFile, e);
}
byte[] data = buff.toByteArray();
String calculatedSHA1 = StringUtils.getSHA1(data);
System.out.println();
if (expectedSHA1.length() == 0) {
updateProgress(0, "sha: " + calculatedSHA1);
System.out.println();
} else {
if (!calculatedSHA1.equals(expectedSHA1)) {
throw new RuntimeException("SHA1 checksum mismatch; got: " + calculatedSHA1);
}
}
try {
RandomAccessFile ra = new RandomAccessFile(targetFile, "rw");
ra.write(data);
ra.setLength(data.length);
ra.close();
} catch (IOException e) {
throw new RuntimeException("Error writing to file " + targetFile, e);
}
downloads.add(targetFile);
removeObsoleteArtifacts(mo, type, targetFile.getParentFile());
}
return downloads;
}
/**
* Download a file from the official Apache Maven repository.
*
* @param mo
* the maven object to download.
* @return
*/
private static List<File> downloadFromApacheToExtSelenium(MavenObject mo,
BuildType type) {
return downloadFromMaven("http://repo1.maven.org/maven2/", mo, type,
"ext/seleniumhq");
}
/**
* Download a file from the official Apache Maven repository.
*
* @param mo
* the maven object to download.
* @return
*/
private static List<File> downloadFromMaven(String mavenRoot,
MavenObject mo, BuildType type) {
return downloadFromMaven(mavenRoot, mo, type, "ext");
}
private static void removeObsoleteArtifacts(final MavenObject mo, final BuildType type, File folder) {
File [] removals = folder.listFiles(new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
String n = name.toLowerCase();
String dep = mo.artifact.toLowerCase();
if (n.startsWith(dep)) {
String suffix = "-" + mo.version;
if (type.equals(BuildType.COMPILETIME)) {
suffix += "-sources.jar";
} else {
suffix += ".jar";
}
if (!n.endsWith(suffix)) {
return true;
}
}
return false;
}
});
// delete any matches
if (removals != null) {
for (File file : removals) {
System.out.println("deleting " + file);
file.delete();
}
}
}
private static void updateDownload(float progress, File file) {
updateProgress(progress, "d/l: " + file.getName());
}
private static void updateProgress(float progress, String url) {
boolean isWindows = osName.contains("Windows");
String anim = "==========";
int width = Math.round(anim.length() * progress);
if (isWindows) System.out.print("\r");
System.out.print("[");
System.out.print(anim.substring(0, Math.min(width, anim.length())));
for (int i = 0; i < anim.length() - width; i++) {
System.out.print(' ');
}
System.out.print("] " + url);
if (!isWindows) System.out.println();
}
/**
* MavenObject represents a complete maven artifact (binary, sources, and
* javadoc). MavenObjects can be downloaded and checksummed to confirm
* authenticity.
*/
private static class MavenObject {
public static final MavenObject JCOMMANDER = new MavenObject(
"jCommander", "com/beust", "jcommander", "1.17",
34000, 32000, 141000,
"219a3540f3b27d7cc3b1d91d6ea046cd8723290e",
"0bb50eec177acf0e94d58e0cf07262fe5164331d",
"c7adc475ca40c288c93054e0f4fe58f3a98c0cb5");
public static final MavenObject JETTY = new MavenObject(
"Jetty", "org/eclipse/jetty/aggregate", "jetty-webapp", "7.6.8.v20121106",
1000000, 680000, 2720000,
"6333969b4d509c4b681e05302ca7ebccb9c3efb5",
"354f2752ed6544296bc0fc92e533d68a5b03045b",
"");
public static final MavenObject JETTY_AJP = new MavenObject(
"Jetty-AJP", "org/eclipse/jetty", "jetty-ajp", "7.6.8.v20121106",
32000, 22000, 97000,
"95bd1c89bb2afd4eeaabc6f4b0183a9f26a522d7",
"e1fc2539202ebb240a87a080bc44a24c93d7318b",
"");
public static final MavenObject SERVLET = new MavenObject(
"Servlet 3.0", "javax/servlet", "javax.servlet-api", "3.0.1",
84000, 211000, 0,
"6bf0ebb7efd993e222fc1112377b5e92a13b38dd",
"01952f91d84016a39e31346c9d18bd8c9c4a128a",
null);
public static final MavenObject SLF4JAPI = new MavenObject(
"SLF4J API", "org/slf4j", "slf4j-api", "1.6.6",
25500, 45000, 182000,
"ce53b0a0e2cfbb27e8a59d38f79a18a5c6a8d2b0",
"bcd0e21b1572960cefd449f8a16efab5b6b8e644",
"4253b52aabf1c5a5f20c191a261e6ada0fcf621d");
public static final MavenObject SLF4LOG4J = new MavenObject(
"SLF4J LOG4J", "org/slf4j", "slf4j-log4j12", "1.6.6",
9800, 9500, 52400,
"5cd9b4fbc3ff6a97beaade3206137d76f65df805",
"497bfac9a678118e7ff75d1f3b8c3bcc06dc9c8c",
"69855e2a85d9249bb577df3c5076bc2cb34975d7");
public static final MavenObject LOG4J = new MavenObject(
"Apache LOG4J", "log4j", "log4j", "1.2.17",
481000, 471000, 1455000,
"5af35056b4d257e4b64b9e8069c0746e8b08629f",
"677abe279b68c5e7490d6d50c6951376238d7d3e",
"c10c20168206896442f3192d5417815df7fcbf9a");
public static final MavenObject WICKET = new MavenObject(
"Apache Wicket", "org/apache/wicket", "wicket", "1.4.21",
1960000, 1906000, 6818000,
"cce9dfd3088e18a3cdcf9be33b5b76caa48dc4c6",
"e8c2bfe2c96a2da7a0eca947a2f60dc3242e7229",
"");
public static final MavenObject WICKET_EXT = new MavenObject(
"Apache Wicket Extensions", "org/apache/wicket", "wicket-extensions", "1.4.21",
1180000, 1118000, 1458000,
"fac510c7ee4399a29b927405ec3de40b67d105d8",
"ee3409ce9ed64ad8cc8d69abbd7d63f07e10851a",
"");
public static final MavenObject WICKET_AUTH_ROLES = new MavenObject(
"Apache Wicket Auth Roles", "org/apache/wicket", "wicket-auth-roles", "1.4.21",
44000, 45000, 166000,
"e78df70ca942e2e15287c393f236b32fbe6f9a30",
"47c301212cce43a70caa72f41a9a1aefcf26a533",
"");
public static final MavenObject WICKET_GOOGLE_CHARTS = new MavenObject(
"Apache Wicket Google Charts Add-On", "org/wicketstuff", "googlecharts", "1.4.21",
34000, 18750, 161000,
"73d7540267afc3a0e91ca6148d3073e050dba180",
"627b125cc6029d4d5c59c3a910c1bef347384d97",
"");
public static final MavenObject JUNIT = new MavenObject(
"JUnit", "junit", "junit", "4.10",
253000, 141000, 0, "e4f1766ce7404a08f45d859fb9c226fc9e41a861",
"6c98d6766e72d5575f96c9479d1c1d3b865c6e25", "");
public static final MavenObject HAMCREST = new MavenObject(
"Hamcrest Core", "org/hamcrest", "hamcrest-core", "1.1",
77000, 0, 0,
"860340562250678d1a344907ac75754e259cdb14",
null,
"");
public static final MavenObject MARKDOWNPAPERS = new MavenObject(
"MarkdownPapers", "org/tautua/markdownpapers", "markdownpapers-core", "1.3.2",
92000, 60000, 268000,
"da22db6660e90b9a677bbdfc2c511c619ea5c249",
"6a7228280a229144afe6c01351a8f44675d8524d",
"");
public static final MavenObject BOUNCYCASTLE = new MavenObject(
"BouncyCastle", "org/bouncycastle", "bcprov-jdk15on", "1.47",
1900000, 1400000, 4670000,
"b6f5d9926b0afbde9f4dbe3db88c5247be7794bb",
"85e6e1ad449d5a3f09624bf4038fc8d2b02de81c",
"");
public static final MavenObject BOUNCYCASTLE_MAIL = new MavenObject(
"BouncyCastle Mail", "org/bouncycastle", "bcmail-jdk15on", "1.47",
502000, 420000, 482000,
"a35ccec640177d0de5815568529021af5546d6a7",
"f742330cfe1e7365dbdf773c24b92382172164a7",
"");
public static final MavenObject BOUNCYCASTLE_PKIX = new MavenObject(
"BouncyCastle PKIX", "org/bouncycastle", "bcpkix-jdk15on", "1.47",
502000, 420000, 482000,
"cd204e6f26d2bbf65ff3a30de8831d3a1344e851",
"80e774a73d0e6a6b40ddf35fff613f9f30fe2a98",
"");
public static final MavenObject JGIT = new MavenObject(
"JGit", "org/eclipse/jgit", "org.eclipse.jgit", "2.2.0.201212191850-r",
1600000, 1565000, 3460000,
"97d0761b9dd618d1f9f6c16c35c3ddf045ba536c",
"08dcf9546f4d61e1b8a50df5da5513006023b64b",
"");
public static final MavenObject JGIT_HTTP = new MavenObject(
"JGit", "org/eclipse/jgit", "org.eclipse.jgit.http.server", "2.2.0.201212191850-r",
68000, 62000, 110000,
"8ad4fc4fb9529d645249bb46ad7e54d98436cb65",
"3385cf294957d1d34c1270b468853aea347b36ca",
"");
public static final MavenObject JSCH = new MavenObject(
"JSch", "com/jcraft", "jsch", "0.1.44-1",
214000, 211000, 413000,
"2e9ae08de5a71bd0e0d3ba2558598181bfa71d4e",
"e528f593b19b04d500992606f58b87fcfded8883",
"d0ffadd0a4ab909d94a577b5aad43c13b617ddcb");
public static final MavenObject COMMONSNET = new MavenObject(
"commons-net", "commons-net", "commons-net", "1.4.0",
181000, 0, 0,
"eb47e8cad2dd7f92fd7e77df1d1529cae87361f7",
"",
"");
public static final MavenObject ROME = new MavenObject(
"rome", "rome", "rome", "0.9",
208000, 196000, 407000,
"dee2705dd01e79a5a96a17225f5a1ae30470bb18",
"226f851dc44fd94fe70b9c471881b71f88949cbf",
"8d7d867b97eeb3a9196c3926da550ad042941c1b");
public static final MavenObject JDOM = new MavenObject(
"jdom", "jdom", "jdom", "1.0",
153000, 235000, 445000,
"a2ac1cd690ab4c80defe7f9bce14d35934c35cec",
"662abe0196cf554d4d7374f5d6382034171b652c",
"");
public static final MavenObject GSON = new MavenObject(
"gson", "com/google/code/gson", "gson", "1.7.2",
174000, 142000, 247000,
"112366d8158749e25532ebce162232c6e0fb20a5",
"a6fe3006df46174a9c1c56b3c51357b9bfde5874",
"537f729ac63b6132a795a3c1f2e13b327e872333");
public static final MavenObject MAIL = new MavenObject(
"javax.mail", "javax/mail", "mail", "1.4.3",
462000, 642000, 0,
"8154bf8d666e6db154c548dc31a8d512c273f5ee",
"5875e2729de83a4e46391f8f979ec8bd03810c10", null);
public static final MavenObject GROOVY = new MavenObject(
"groovy", "org/codehaus/groovy", "groovy-all", "1.8.8",
6143000, 2290000, 4608000,
"98a489343d3c30da817d36cbea5de11ed07bef31",
"5f847ed18009f8a034bad3906e39f771c01728c1", "");
public static final MavenObject LUCENE = new MavenObject(
"lucene", "org/apache/lucene", "lucene-core", "3.6.1",
1540000, 1431000, 3608000,
"6ae2c83c77a1ffa5840b9151a271ab3f451f6e0c",
"6925deb6b78e63bbcac382004f00b98133327057", "");
public static final MavenObject LUCENE_HIGHLIGHTER = new MavenObject(
"lucene highlighter", "org/apache/lucene", "lucene-highlighter", "3.6.1",
89200, 85000, 0,
"2bd49695e9891697c5f290aa94c3412dfb95b096",
"20ae81816ce9c27186ef0f2e92a57812c9ee3b6c", "");
public static final MavenObject LUCENE_MEMORY = new MavenObject(
"lucene memory", "org/apache/lucene", "lucene-memory", "3.6.1",
30000, 23000, 0,
"8c7ca5572edea50973dc0d26cf75c27047eebe7e",
"2e291e96d25132e002b1c8240e361d1272d113e1", "");
public static final MavenObject LUCENE_QUERIES = new MavenObject(
"lucene queries", "org/apache/lucene", "lucene-queries", "3.6.1",
47400, 48600, 0,
"4ed6022dd4aa80b932a1546e7e39e3b8bbe7acb7",
"dc425c75d988e4975d314772035a46b6a17dcc8d", "");
public static final MavenObject JAKARTA_REGEXP = new MavenObject(
"jakarta regexp", "jakarta-regexp", "jakarta-regexp", "1.4",
28500, 0, 0,
"0ea514a179ac1dd7e81c7e6594468b9b9910d298",
null, "");
public static final MavenObject UNBOUND_ID = new MavenObject(
"unbound id", "com/unboundid", "unboundid-ldapsdk", "2.3.0",
1383417, 1439721, 0,
"6fde8d9fb4ee3e7e3d7e764e3ea57195971e2eb2",
"5276d3d29630693dba99ab9f7ea54f4c471d3af1",
"");
public static final MavenObject IVY = new MavenObject(
"ivy", "org/apache/ivy", "ivy", "2.2.0",
948000, 744000, 0,
"f9d1e83e82fc085093510f7d2e77d81d52bc2081",
"0312527950ad0e8fbab37228fbed3bf41a6fe0a1", "");
public static final MavenObject JCALENDAR = new MavenObject(
"jcalendar", "com/toedter", "jcalendar", "1.3.2",
127000, 0, 0,
"323a672aeacb5f5f4461be3b7f7d9d3e4bda80d4",
null, "");
public static final MavenObject COMMONS_COMPRESS = new MavenObject(
"commons-compress", "org/apache/commons", "commons-compress", "1.4.1",
242000, 265000, 0,
"b02e84a993d88568417536240e970c4b809126fd",
"277d39267403965a7a192474794a29bac6760a25", "");
public static final MavenObject XZ = new MavenObject(
"xz", "org/tukaani", "xz", "1.0",
95000, 120000, 0,
"ecff5cb8b1189514c9d1d8d68eb77ac372e000c9",
"f95e32a5d2dd8da643c4419814415b9704312993", "");
public static final MavenObject SEL_JAVA = new MavenObject(
"selenium-java", "org/seleniumhq/selenium", "selenium-java",
"2.28.0", 984098, 0, 0,
"7606286989ac9cb942cc206d975ffe187c18d605", "4ede08d293dc153989a337cd0d31d26421433af5", "");
public static final MavenObject SEL_API = new MavenObject(
"selenium-api", "org/seleniumhq/selenium", "selenium-api",
"2.28.0", 984098, 0, 0,
"c4044c40fff65cd25135a5f443638a2b1ccaeac5", "35fc6ec0804ae32b16a56627e69bdcb69995c515", "");
public static final MavenObject SEL_REMOTE = new MavenObject(
"selenium-remote-driver", "org/seleniumhq/selenium",
"selenium-remote-driver", "2.28.0", 984098, 0, 0,
"c67f97cd94e02afec92b0ac881844febb4fc90be", "51a9c30de3c8c203cb7a474a10842443005a5fb4", "");
public static final MavenObject SEL_SUPPORT = new MavenObject(
"selenium-support", "org/seleniumhq/selenium",
"selenium-support", "2.28.0", 984098, 0, 0,
"caf68d6310425f583bc592c08e43066b35eb94f6", "ce3831a601f5f50fda2f4604decde409b6c735a7", "");
public static final MavenObject SEL_FF = new MavenObject(
"selenium-firefox-driver", "org/seleniumhq/selenium",
"selenium-firefox-driver", "2.28.0", 984098, 0, 0,
"a7c34e45dba39e65467b900aa67611aaa039692d", "aa8cd5fb49ca75a53d5b143406ea3d81ab3eddfd", "");
public static final MavenObject GUAVA = new MavenObject("guava",
"com/google/guava", "guava", "12.0", 984098, 0, 0,
"5bc66dd95b79db1e437eb08adba124a3e4088dc0", "f8b98e61865bed3c39b978ee3bf5c7fb990c4032", "");
public static final MavenObject JSON = new MavenObject("json",
"org/json", "json", "20080701", 984098, 0, 0,
"d652f102185530c93b66158b1859f35d45687258", "71bd54221e701df9d112bf9ba2918e13b0671f3a", "");
public static final MavenObject COMMONS_EXEC = new MavenObject(
"commons-exec", "org/apache/commons", "commons-exec", "1.1",
984098, 0, 0, "07dfdf16fade726000564386825ed6d911a44ba1", "f60bea898e18b308099862e8634d589b06a8b0be",
"");
public static final MavenObject HTTPCORE = new MavenObject("httpcore",
"org/apache/httpcomponents", "httpcore", "4.2.1", 984098, 0, 0,
"2d503272bf0a8b5f92d64db78b4ba9abbaccc6fd", "3f6caf5334fa83607b82e2f32dd128a9d8a0ea5e", "");
public static final MavenObject HTTPMIME = new MavenObject("httpmime",
"org/apache/httpcomponents", "httpmime", "4.2.1", 984098, 0, 0,
"7c772bace9aa31a728c39a88c6ff66a7cd177e89", "", "4e453843ae47f1c2d70e2eb2c13c037de4b614c4");
public static final MavenObject HTTPCLIENT = new MavenObject(
"httpclient", "org/apache/httpcomponents", "httpclient",
"4.2.1", 984098, 0, 0,
"b69bd03af60bf487b3ae1209a644ecac587bf6fc", "6b27312b9c28b59aaeb6c21f3490045690c703d3", "");
public static final MavenObject COMMONS_LOGGING = new MavenObject(
"commons-logging", "commons-logging", "commons-logging",
"1.1.1", 984098, 0, 0,
"5043bfebc3db072ed80fbd362e7caf00e885d8ae", "f3f156cbff0e0fb0d64bfce31a352cce4a33bc19", "");
public final String name;
public final String group;
public final String artifact;
public final String version;
public final int approxLibraryLen;
public final int approxSourcesLen;
public final int approxJavadocLen;
public final String librarySHA1;
public final String sourcesSHA1;
public final String javadocSHA1;
private MavenObject(String name, String group, String artifact, String version,
int approxLibraryLen, int approxSourcesLen, int approxJavadocLen,
String librarySHA1, String sourcesSHA1, String javadocSHA1) {
this.name = name;
this.group = group;
this.artifact = artifact;
this.version = version;
this.approxLibraryLen = approxLibraryLen;
this.approxSourcesLen = approxSourcesLen;
this.approxJavadocLen = approxJavadocLen;
this.librarySHA1 = librarySHA1;
this.sourcesSHA1 = sourcesSHA1;
this.javadocSHA1 = javadocSHA1;
}
private String getRepositoryPath(String jar) {
return group + "/" + artifact + "/" + version + "/" + artifact + "-" + version + jar
+ ".jar";
}
private File getLocalFile(String basePath, String jar) {
return new File(basePath, artifact + "-" + version + jar + ".jar");
}
private String getSHA1(String jar) {
if (jar.equals("")) {
return librarySHA1;
} else if (jar.equals("-sources")) {
return sourcesSHA1;
} else if (jar.equals("-javadoc")) {
return javadocSHA1;
}
return librarySHA1;
}
private int getApproximateLength(String jar) {
if (jar.equals("")) {
return approxLibraryLen;
} else if (jar.equals("-sources")) {
return approxSourcesLen;
} else if (jar.equals("-javadoc")) {
return approxJavadocLen;
}
return approxLibraryLen;
}
@Override
public String toString() {
return name;
}
}
}

+ 0
- 259
src/com/gitblit/build/BuildGhPages.java Целия файл

@@ -1,259 +0,0 @@
/*
* Copyright 2012 gitblit.com.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gitblit.build;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import org.eclipse.jgit.api.errors.ConcurrentRefUpdateException;
import org.eclipse.jgit.api.errors.JGitInternalException;
import org.eclipse.jgit.dircache.DirCache;
import org.eclipse.jgit.dircache.DirCacheBuilder;
import org.eclipse.jgit.dircache.DirCacheEntry;
import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.lib.CommitBuilder;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.FileMode;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.ObjectInserter;
import org.eclipse.jgit.lib.PersonIdent;
import org.eclipse.jgit.lib.RefUpdate;
import org.eclipse.jgit.lib.RefUpdate.Result;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.RepositoryCache.FileKey;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevWalk;
import org.eclipse.jgit.storage.file.FileRepository;
import org.eclipse.jgit.treewalk.CanonicalTreeParser;
import org.eclipse.jgit.treewalk.TreeWalk;
import org.eclipse.jgit.util.FS;
import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.ParameterException;
import com.beust.jcommander.Parameters;
import com.gitblit.models.RefModel;
import com.gitblit.utils.JGitUtils;
import com.gitblit.utils.StringUtils;
/**
* Creates or updates a gh-pages branch with the specified content.
*
* @author James Moger
*
*/
public class BuildGhPages {
public static void main(String[] args) {
Params params = new Params();
JCommander jc = new JCommander(params);
try {
jc.parse(args);
} catch (ParameterException t) {
System.err.println(t.getMessage());
jc.usage();
}
File source = new File(params.sourceFolder);
String ghpages = "refs/heads/gh-pages";
try {
File gitDir = FileKey.resolve(new File(params.repositoryFolder), FS.DETECTED);
Repository repository = new FileRepository(gitDir);
RefModel issuesBranch = JGitUtils.getPagesBranch(repository);
if (issuesBranch == null) {
JGitUtils.createOrphanBranch(repository, "gh-pages", null);
}
System.out.println("Updating gh-pages branch...");
ObjectId headId = repository.resolve(ghpages + "^{commit}");
ObjectInserter odi = repository.newObjectInserter();
try {
// Create the in-memory index of the new/updated issue.
DirCache index = createIndex(repository, headId, source, params.obliterate);
ObjectId indexTreeId = index.writeTree(odi);
// Create a commit object
PersonIdent author = new PersonIdent("Gitblit", "gitblit@localhost");
CommitBuilder commit = new CommitBuilder();
commit.setAuthor(author);
commit.setCommitter(author);
commit.setEncoding(Constants.CHARACTER_ENCODING);
commit.setMessage("updated pages");
commit.setParentId(headId);
commit.setTreeId(indexTreeId);
// Insert the commit into the repository
ObjectId commitId = odi.insert(commit);
odi.flush();
RevWalk revWalk = new RevWalk(repository);
try {
RevCommit revCommit = revWalk.parseCommit(commitId);
RefUpdate ru = repository.updateRef(ghpages);
ru.setNewObjectId(commitId);
ru.setExpectedOldObjectId(headId);
ru.setRefLogMessage("commit: " + revCommit.getShortMessage(), false);
Result rc = ru.forceUpdate();
switch (rc) {
case NEW:
case FORCED:
case FAST_FORWARD:
break;
case REJECTED:
case LOCK_FAILURE:
throw new ConcurrentRefUpdateException(JGitText.get().couldNotLockHEAD,
ru.getRef(), rc);
default:
throw new JGitInternalException(MessageFormat.format(
JGitText.get().updatingRefFailed, ghpages, commitId.toString(), rc));
}
} finally {
revWalk.release();
}
} finally {
odi.release();
}
System.out.println("gh-pages updated.");
} catch (Throwable t) {
t.printStackTrace();
}
}
/**
* Creates an in-memory index of the issue change.
*
* @param repo
* @param headId
* @param sourceFolder
* @param obliterate
* if true the source folder tree is used as the new tree for
* gh-pages and non-existent files are considered deleted
* @return an in-memory index
* @throws IOException
*/
private static DirCache createIndex(Repository repo, ObjectId headId, File sourceFolder,
boolean obliterate) throws IOException {
DirCache inCoreIndex = DirCache.newInCore();
DirCacheBuilder dcBuilder = inCoreIndex.builder();
ObjectInserter inserter = repo.newObjectInserter();
try {
// Add all files to the temporary index
Set<String> ignorePaths = new TreeSet<String>();
List<File> files = listFiles(sourceFolder);
for (File file : files) {
// create an index entry for the file
final DirCacheEntry dcEntry = new DirCacheEntry(StringUtils.getRelativePath(
sourceFolder.getPath(), file.getPath()));
dcEntry.setLength(file.length());
dcEntry.setLastModified(file.lastModified());
dcEntry.setFileMode(FileMode.REGULAR_FILE);
// add this entry to the ignore paths set
ignorePaths.add(dcEntry.getPathString());
// insert object
InputStream inputStream = new FileInputStream(file);
try {
dcEntry.setObjectId(inserter.insert(Constants.OBJ_BLOB, file.length(),
inputStream));
} finally {
inputStream.close();
}
// add to temporary in-core index
dcBuilder.add(dcEntry);
}
if (!obliterate) {
// Traverse HEAD to add all other paths
TreeWalk treeWalk = new TreeWalk(repo);
int hIdx = -1;
if (headId != null)
hIdx = treeWalk.addTree(new RevWalk(repo).parseTree(headId));
treeWalk.setRecursive(true);
while (treeWalk.next()) {
String path = treeWalk.getPathString();
CanonicalTreeParser hTree = null;
if (hIdx != -1)
hTree = treeWalk.getTree(hIdx, CanonicalTreeParser.class);
if (!ignorePaths.contains(path)) {
// add entries from HEAD for all other paths
if (hTree != null) {
// create a new DirCacheEntry with data retrieved
// from
// HEAD
final DirCacheEntry dcEntry = new DirCacheEntry(path);
dcEntry.setObjectId(hTree.getEntryObjectId());
dcEntry.setFileMode(hTree.getEntryFileMode());
// add to temporary in-core index
dcBuilder.add(dcEntry);
}
}
}
// release the treewalk
treeWalk.release();
}
// finish temporary in-core index used for this commit
dcBuilder.finish();
} finally {
inserter.release();
}
return inCoreIndex;
}
private static List<File> listFiles(File folder) {
List<File> files = new ArrayList<File>();
for (File file : folder.listFiles()) {
if (file.isDirectory()) {
files.addAll(listFiles(file));
} else {
files.add(file);
}
}
return files;
}
/**
* JCommander Parameters class for BuildGhPages.
*/
@Parameters(separators = " ")
private static class Params {
@Parameter(names = { "--sourceFolder" }, description = "Source folder for pages", required = true)
public String sourceFolder;
@Parameter(names = { "--repository" }, description = "Repository folder", required = true)
public String repositoryFolder;
@Parameter(names = { "--obliterate" }, description = "Replace gh-pages tree with only the content in your sourcefolder")
public boolean obliterate;
}
}

+ 0
- 385
src/com/gitblit/build/BuildSite.java Целия файл

@@ -1,385 +0,0 @@
/*
* Copyright 2011 gitblit.com.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gitblit.build;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FilenameFilter;
import java.io.OutputStreamWriter;
import java.nio.charset.Charset;
import java.text.MessageFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Vector;
import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.ParameterException;
import com.beust.jcommander.Parameters;
import com.gitblit.Constants;
import com.gitblit.utils.FileUtils;
import com.gitblit.utils.MarkdownUtils;
import com.gitblit.utils.StringUtils;
/**
* Builds the web site or deployment documentation from Markdown source files.
*
* All Markdown source files must have the .mkd extension.
*
* Natural string sort order of the Markdown source filenames is the order of
* page links. "##_" prefixes are used to control the sort order.
*
* @author James Moger
*
*/
public class BuildSite {
private static final String SPACE_DELIMITED = "SPACE-DELIMITED";
private static final String CASE_SENSITIVE = "CASE-SENSITIVE";
private static final String RESTART_REQUIRED = "RESTART REQUIRED";
private static final String SINCE = "SINCE";
public static void main(String... args) {
Params params = new Params();
JCommander jc = new JCommander(params);
try {
jc.parse(args);
} catch (ParameterException t) {
usage(jc, t);
}
File sourceFolder = new File(params.sourceFolder);
File destinationFolder = new File(params.outputFolder);
File[] markdownFiles = sourceFolder.listFiles(new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
return name.toLowerCase().endsWith(".mkd");
}
});
Arrays.sort(markdownFiles);
Map<String, String> aliasMap = new HashMap<String, String>();
for (String alias : params.aliases) {
String[] values = alias.split("=");
aliasMap.put(values[0], values[1]);
}
System.out.println(MessageFormat.format("Generating site from {0} Markdown Docs in {1} ",
markdownFiles.length, sourceFolder.getAbsolutePath()));
String htmlHeader = FileUtils.readContent(new File(params.pageHeader), "\n");
String htmlAdSnippet = null;
if (!StringUtils.isEmpty(params.adSnippet)) {
File snippet = new File(params.adSnippet);
if (snippet.exists()) {
htmlAdSnippet = FileUtils.readContent(snippet, "\n");
}
}
String htmlFooter = FileUtils.readContent(new File(params.pageFooter), "\n");
final String date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
final String footer = MessageFormat.format(htmlFooter, "generated " + date);
for (File file : markdownFiles) {
String documentName = getDocumentName(file);
if (params.skips.contains(documentName)) {
continue;
}
try {
String links = createLinks(file, markdownFiles, aliasMap, params.skips);
String header = MessageFormat.format(htmlHeader, Constants.FULL_NAME, links);
if (!StringUtils.isEmpty(params.analyticsSnippet)) {
File snippet = new File(params.analyticsSnippet);
if (snippet.exists()) {
String htmlSnippet = FileUtils.readContent(snippet, "\n");
header = header.replace("<!-- ANALYTICS -->", htmlSnippet);
}
}
String fileName = documentName + ".html";
System.out.println(MessageFormat.format(" {0} => {1}", file.getName(), fileName));
String rawContent = FileUtils.readContent(file, "\n");
String markdownContent = rawContent;
Map<String, List<String>> nomarkdownMap = new HashMap<String, List<String>>();
// extract sections marked as no-markdown
int nmd = 0;
for (String token : params.nomarkdown) {
StringBuilder strippedContent = new StringBuilder();
String nomarkdownKey = "%NOMARKDOWN" + nmd + "%";
String[] kv = token.split(":", 2);
String beginToken = kv[0];
String endToken = kv[1];
// strip nomarkdown chunks from markdown and cache them
List<String> chunks = new Vector<String>();
int beginCode = 0;
int endCode = 0;
while ((beginCode = markdownContent.indexOf(beginToken, endCode)) > -1) {
if (endCode == 0) {
strippedContent.append(markdownContent.substring(0, beginCode));
} else {
strippedContent.append(markdownContent.substring(endCode, beginCode));
}
strippedContent.append(nomarkdownKey);
endCode = markdownContent.indexOf(endToken, beginCode);
chunks.add(markdownContent.substring(beginCode, endCode));
nomarkdownMap.put(nomarkdownKey, chunks);
}
// get remainder of text
if (endCode < markdownContent.length()) {
strippedContent.append(markdownContent.substring(endCode,
markdownContent.length()));
}
markdownContent = strippedContent.toString();
nmd++;
}
// transform markdown to html
String content = transformMarkdown(markdownContent.toString());
// reinsert nomarkdown chunks
for (Map.Entry<String, List<String>> nomarkdown : nomarkdownMap.entrySet()) {
for (String chunk : nomarkdown.getValue()) {
content = content.replaceFirst(nomarkdown.getKey(), chunk);
}
}
for (String token : params.substitutions) {
String[] kv = token.split("=", 2);
content = content.replace(kv[0], kv[1]);
}
for (String token : params.regex) {
String[] kv = token.split("!!!", 2);
content = content.replaceAll(kv[0], kv[1]);
}
for (String alias : params.properties) {
String[] kv = alias.split("=", 2);
String loadedContent = generatePropertiesContent(new File(kv[1]));
content = content.replace(kv[0], loadedContent);
}
for (String alias : params.loads) {
String[] kv = alias.split("=", 2);
String loadedContent = FileUtils.readContent(new File(kv[1]), "\n");
loadedContent = StringUtils.escapeForHtml(loadedContent, false);
loadedContent = StringUtils.breakLinesForHtml(loadedContent);
content = content.replace(kv[0], loadedContent);
}
OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(new File(
destinationFolder, fileName)), Charset.forName("UTF-8"));
writer.write(header);
if (!StringUtils.isEmpty(htmlAdSnippet)) {
writer.write(htmlAdSnippet);
}
writer.write(content);
writer.write(footer);
writer.close();
} catch (Throwable t) {
System.err.println("Failed to transform " + file.getName());
t.printStackTrace();
}
}
}
private static String getDocumentName(File file) {
String displayName = file.getName().substring(0, file.getName().lastIndexOf('.'))
.toLowerCase();
int underscore = displayName.indexOf('_') + 1;
if (underscore > -1) {
// trim leading ##_ which is to control display order
return displayName.substring(underscore);
}
return displayName;
}
private static String createLinks(File currentFile, File[] markdownFiles,
Map<String, String> aliasMap, List<String> skips) {
String linkPattern = "<li><a href=''{0}''>{1}</a></li>";
String currentLinkPattern = "<li class=''active''><a href=''{0}''>{1}</a></li>";
StringBuilder sb = new StringBuilder();
for (File file : markdownFiles) {
String documentName = getDocumentName(file);
if (!skips.contains(documentName)) {
String displayName = documentName;
if (aliasMap.containsKey(documentName)) {
displayName = aliasMap.get(documentName);
} else {
displayName = displayName.replace('_', ' ');
}
String fileName = documentName + ".html";
if (currentFile.getName().equals(file.getName())) {
sb.append(MessageFormat.format(currentLinkPattern, fileName, displayName));
} else {
sb.append(MessageFormat.format(linkPattern, fileName, displayName));
}
}
}
sb.setLength(sb.length() - 3);
sb.trimToSize();
return sb.toString();
}
private static String generatePropertiesContent(File propertiesFile) throws Exception {
// Read the current Gitblit properties
BufferedReader propertiesReader = new BufferedReader(new FileReader(propertiesFile));
Vector<Setting> settings = new Vector<Setting>();
List<String> comments = new ArrayList<String>();
String line = null;
while ((line = propertiesReader.readLine()) != null) {
if (line.length() == 0) {
Setting s = new Setting("", "", comments);
settings.add(s);
comments.clear();
} else {
if (line.charAt(0) == '#') {
comments.add(line.substring(1).trim());
} else {
String[] kvp = line.split("=", 2);
String key = kvp[0].trim();
Setting s = new Setting(key, kvp[1].trim(), comments);
settings.add(s);
comments.clear();
}
}
}
propertiesReader.close();
StringBuilder sb = new StringBuilder();
for (Setting setting : settings) {
for (String comment : setting.comments) {
if (comment.contains(SINCE) || comment.contains(RESTART_REQUIRED)
|| comment.contains(CASE_SENSITIVE) || comment.contains(SPACE_DELIMITED)) {
sb.append(MessageFormat.format(
"<span style=\"color:#004000;\"># <i>{0}</i></span>",
transformMarkdown(comment)));
} else {
sb.append(MessageFormat.format("<span style=\"color:#004000;\"># {0}</span>",
transformMarkdown(comment)));
}
sb.append("<br/>\n");
}
if (!StringUtils.isEmpty(setting.name)) {
sb.append(MessageFormat
.format("<span style=\"color:#000080;\">{0}</span> = <span style=\"color:#800000;\">{1}</span>",
setting.name, StringUtils.escapeForHtml(setting.value, false)));
}
sb.append("<br/>\n");
}
return sb.toString();
}
private static String transformMarkdown(String comment) throws ParseException {
String md = MarkdownUtils.transformMarkdown(comment);
if (md.startsWith("<p>")) {
md = md.substring(3);
}
if (md.endsWith("</p>")) {
md = md.substring(0, md.length() - 4);
}
return md;
}
private static void usage(JCommander jc, ParameterException t) {
System.out.println(Constants.getGitBlitVersion());
System.out.println();
if (t != null) {
System.out.println(t.getMessage());
System.out.println();
}
if (jc != null) {
jc.usage();
}
System.exit(0);
}
/**
* Setting represents a setting with its comments from the properties file.
*/
private static class Setting {
final String name;
final String value;
final List<String> comments;
Setting(String name, String value, List<String> comments) {
this.name = name;
this.value = value;
this.comments = new ArrayList<String>(comments);
}
}
/**
* JCommander Parameters class for BuildSite.
*/
@Parameters(separators = " ")
private static class Params {
@Parameter(names = { "--sourceFolder" }, description = "Markdown Source Folder", required = true)
public String sourceFolder;
@Parameter(names = { "--outputFolder" }, description = "HTML Ouptut Folder", required = true)
public String outputFolder;
@Parameter(names = { "--pageHeader" }, description = "Page Header HTML Snippet", required = true)
public String pageHeader;
@Parameter(names = { "--pageFooter" }, description = "Page Footer HTML Snippet", required = true)
public String pageFooter;
@Parameter(names = { "--adSnippet" }, description = "Ad HTML Snippet", required = false)
public String adSnippet;
@Parameter(names = { "--analyticsSnippet" }, description = "Analytics HTML Snippet", required = false)
public String analyticsSnippet;
@Parameter(names = { "--skip" }, description = "Filename to skip", required = false)
public List<String> skips = new ArrayList<String>();
@Parameter(names = { "--alias" }, description = "Filename=Linkname aliases", required = false)
public List<String> aliases = new ArrayList<String>();
@Parameter(names = { "--substitute" }, description = "%TOKEN%=value", required = false)
public List<String> substitutions = new ArrayList<String>();
@Parameter(names = { "--load" }, description = "%TOKEN%=filename", required = false)
public List<String> loads = new ArrayList<String>();
@Parameter(names = { "--properties" }, description = "%TOKEN%=filename", required = false)
public List<String> properties = new ArrayList<String>();
@Parameter(names = { "--nomarkdown" }, description = "%STARTTOKEN%:%ENDTOKEN%", required = false)
public List<String> nomarkdown = new ArrayList<String>();
@Parameter(names = { "--regex" }, description = "searchPattern!!!replacePattern", required = false)
public List<String> regex = new ArrayList<String>();
}
}

+ 0
- 162
src/com/gitblit/build/BuildThumbnails.java Целия файл

@@ -1,162 +0,0 @@
/*
* Copyright 2011 gitblit.com.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gitblit.build;
import java.awt.Dimension;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FilenameFilter;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.Iterator;
import javax.imageio.ImageIO;
import javax.imageio.ImageReader;
import javax.imageio.stream.ImageInputStream;
import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.ParameterException;
import com.beust.jcommander.Parameters;
/**
* Generates PNG thumbnails of the PNG images from the specified source folder.
*
* @author James Moger
*
*/
public class BuildThumbnails {
public static void main(String[] args) {
Params params = new Params();
JCommander jc = new JCommander(params);
try {
jc.parse(args);
} catch (ParameterException t) {
System.err.println(t.getMessage());
jc.usage();
}
createImageThumbnail(params.sourceFolder, params.destinationFolder, params.maximumDimension);
}
/**
* Generates thumbnails from all PNG images in the source folder and saves
* them to the destination folder.
*
* @param sourceFolder
* @param destinationFolder
* @param maxDimension
* the maximum height or width of the image.
*/
public static void createImageThumbnail(String sourceFolder, String destinationFolder,
int maxDimension) {
if (maxDimension <= 0) {
return;
}
File source = new File(sourceFolder);
File destination = new File(destinationFolder);
destination.mkdirs();
File[] sourceFiles = source.listFiles(new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
return name.toLowerCase().endsWith(".png");
}
});
for (File sourceFile : sourceFiles) {
File destinationFile = new File(destination, sourceFile.getName());
try {
Dimension sz = getImageDimensions(sourceFile);
int w = 0;
int h = 0;
if (sz.width > maxDimension) {
// Scale to Width
w = maxDimension;
float f = maxDimension;
// normalize height
h = (int) ((f / sz.width) * sz.height);
} else if (sz.height > maxDimension) {
// Scale to Height
h = maxDimension;
float f = maxDimension;
// normalize width
w = (int) ((f / sz.height) * sz.width);
}
System.out.println(MessageFormat.format(
"Generating thumbnail for {0} as ({1,number,#}, {2,number,#})",
sourceFile.getName(), w, h));
BufferedImage image = ImageIO.read(sourceFile);
Image scaledImage = image.getScaledInstance(w, h, BufferedImage.SCALE_SMOOTH);
BufferedImage destImage = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
destImage.createGraphics().drawImage(scaledImage, 0, 0, null);
FileOutputStream fos = new FileOutputStream(destinationFile);
ImageIO.write(destImage, "png", fos);
fos.flush();
fos.getFD().sync();
fos.close();
} catch (Throwable t) {
t.printStackTrace();
}
}
}
/**
* Return the dimensions of the specified image file.
*
* @param file
* @return dimensions of the image
* @throws IOException
*/
public static Dimension getImageDimensions(File file) throws IOException {
ImageInputStream in = ImageIO.createImageInputStream(file);
try {
final Iterator<ImageReader> readers = ImageIO.getImageReaders(in);
if (readers.hasNext()) {
ImageReader reader = readers.next();
try {
reader.setInput(in);
return new Dimension(reader.getWidth(0), reader.getHeight(0));
} finally {
reader.dispose();
}
}
} finally {
if (in != null) {
in.close();
}
}
return null;
}
/**
* JCommander Parameters class for BuildThumbnails.
*/
@Parameters(separators = " ")
private static class Params {
@Parameter(names = { "--sourceFolder" }, description = "Source folder for raw images", required = true)
public String sourceFolder;
@Parameter(names = { "--destinationFolder" }, description = "Destination folder for thumbnails", required = true)
public String destinationFolder;
@Parameter(names = { "--maximumDimension" }, description = "Maximum width or height for thumbnail", required = true)
public int maximumDimension;
}
}

+ 0
- 160
src/com/gitblit/build/BuildWebXml.java Целия файл

@@ -1,160 +0,0 @@
/*
* Copyright 2011 gitblit.com.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gitblit.build;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.ParameterException;
import com.beust.jcommander.Parameters;
import com.gitblit.Keys;
import com.gitblit.utils.StringUtils;
/**
* Builds the Gitblit WAR web.xml file by merging the Gitblit GO web.xml file
* with the gitblit.properties comments, settings, and values.
*
* @author James Moger
*
*/
public class BuildWebXml {
private static final String PARAMS = "<!-- PARAMS -->";
private static final String[] STRIP_TOKENS = { "<!-- STRIP", "STRIP -->" };
private static final String COMMENT_PATTERN = "\n\t<!-- {0} -->";
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";
public static void main(String[] args) throws Exception {
Params params = new Params();
JCommander jc = new JCommander(params);
try {
jc.parse(args);
} catch (ParameterException t) {
System.err.println(t.getMessage());
jc.usage();
}
generateWebXml(params);
}
private static void generateWebXml(Params params) throws Exception {
StringBuilder parameters = new StringBuilder();
// Read the current Gitblit properties
if (params.propertiesFile != null) {
BufferedReader propertiesReader = new BufferedReader(new FileReader(new File(
params.propertiesFile)));
Vector<Setting> settings = new Vector<Setting>();
List<String> comments = new ArrayList<String>();
String line = null;
while ((line = propertiesReader.readLine()) != null) {
if (line.length() == 0) {
comments.clear();
} else {
if (line.charAt(0) == '#') {
if (line.length() > 1) {
comments.add(line.substring(1).trim());
}
} else {
String[] kvp = line.split("=", 2);
String key = kvp[0].trim();
if (!skipKey(key)) {
Setting s = new Setting(key, kvp[1].trim(), comments);
settings.add(s);
}
comments.clear();
}
}
}
propertiesReader.close();
for (Setting setting : settings) {
for (String comment : setting.comments) {
parameters.append(MessageFormat.format(COMMENT_PATTERN, comment));
}
parameters.append(MessageFormat.format(PARAM_PATTERN, setting.name,
StringUtils.escapeForHtml(setting.value, false)));
}
}
// Read the prototype web.xml file
File webxml = new File(params.sourceFile);
char[] buffer = new char[(int) webxml.length()];
FileReader webxmlReader = new FileReader(webxml);
webxmlReader.read(buffer);
webxmlReader.close();
String webXmlContent = new String(buffer);
// Insert the Gitblit properties into the prototype web.xml
for (String stripToken : STRIP_TOKENS) {
webXmlContent = webXmlContent.replace(stripToken, "");
}
int idx = webXmlContent.indexOf(PARAMS);
StringBuilder sb = new StringBuilder();
sb.append(webXmlContent.substring(0, idx));
sb.append(parameters.toString());
sb.append(webXmlContent.substring(idx + PARAMS.length()));
// Save the merged web.xml to the war build folder
FileOutputStream os = new FileOutputStream(new File(params.destinationFile), false);
os.write(sb.toString().getBytes());
os.close();
}
private static boolean skipKey(String key) {
return key.startsWith(Keys.server._ROOT);
}
/**
* Setting represents a setting and its comments from the properties file.
*/
private static class Setting {
final String name;
final String value;
final List<String> comments;
Setting(String name, String value, List<String> comments) {
this.name = name;
this.value = value;
this.comments = new ArrayList<String>(comments);
}
}
/**
* JCommander Parameters class for BuildWebXml.
*/
@Parameters(separators = " ")
private static class Params {
@Parameter(names = { "--sourceFile" }, description = "Source web.xml file", required = true)
public String sourceFile;
@Parameter(names = { "--propertiesFile" }, description = "Properties settings file")
public String propertiesFile;
@Parameter(names = { "--destinationFile" }, description = "Destination web.xml file", required = true)
public String destinationFile;
}
}

+ 0
- 344
src/com/gitblit/utils/PushLogUtils.java Целия файл

@@ -1,344 +0,0 @@
/*
* Copyright 2013 gitblit.com.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gitblit.utils;

import java.io.IOException;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;

import org.eclipse.jgit.api.errors.ConcurrentRefUpdateException;
import org.eclipse.jgit.api.errors.JGitInternalException;
import org.eclipse.jgit.dircache.DirCache;
import org.eclipse.jgit.dircache.DirCacheBuilder;
import org.eclipse.jgit.dircache.DirCacheEntry;
import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.lib.CommitBuilder;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.FileMode;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.ObjectInserter;
import org.eclipse.jgit.lib.PersonIdent;
import org.eclipse.jgit.lib.RefUpdate;
import org.eclipse.jgit.lib.RefUpdate.Result;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevWalk;
import org.eclipse.jgit.transport.ReceiveCommand;
import org.eclipse.jgit.treewalk.CanonicalTreeParser;
import org.eclipse.jgit.treewalk.TreeWalk;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.gitblit.models.PathModel.PathChangeModel;
import com.gitblit.models.PushLogEntry;
import com.gitblit.models.RefModel;
import com.gitblit.models.UserModel;

/**
* Utility class for maintaining a pushlog within a git repository on an
* orphan branch.
*
* @author James Moger
*
*/
public class PushLogUtils {
public static final String GB_PUSHES = "refs/gitblit/pushes";

static final Logger LOGGER = LoggerFactory.getLogger(PushLogUtils.class);

/**
* Log an error message and exception.
*
* @param t
* @param repository
* if repository is not null it MUST be the {0} parameter in the
* pattern.
* @param pattern
* @param objects
*/
private static void error(Throwable t, Repository repository, String pattern, Object... objects) {
List<Object> parameters = new ArrayList<Object>();
if (objects != null && objects.length > 0) {
for (Object o : objects) {
parameters.add(o);
}
}
if (repository != null) {
parameters.add(0, repository.getDirectory().getAbsolutePath());
}
LOGGER.error(MessageFormat.format(pattern, parameters.toArray()), t);
}

/**
* Returns a RefModel for the gb-pushes branch in the repository. If the
* branch can not be found, null is returned.
*
* @param repository
* @return a refmodel for the gb-pushes branch or null
*/
public static RefModel getPushLogBranch(Repository repository) {
List<RefModel> refs = JGitUtils.getRefs(repository, com.gitblit.Constants.R_GITBLIT);
for (RefModel ref : refs) {
if (ref.reference.getName().equals(GB_PUSHES)) {
return ref;
}
}
return null;
}
/**
* Updates a push log.
*
* @param user
* @param repository
* @param commands
* @return true, if the update was successful
*/
public static boolean updatePushLog(UserModel user, Repository repository,
Collection<ReceiveCommand> commands) {
RefModel pushlogBranch = getPushLogBranch(repository);
if (pushlogBranch == null) {
JGitUtils.createOrphanBranch(repository, GB_PUSHES, null);
}
boolean success = false;
String message = "push";
try {
ObjectId headId = repository.resolve(GB_PUSHES + "^{commit}");
ObjectInserter odi = repository.newObjectInserter();
try {
// Create the in-memory index of the push log entry
DirCache index = createIndex(repository, headId, commands);
ObjectId indexTreeId = index.writeTree(odi);

PersonIdent ident = new PersonIdent(user.getDisplayName(),
user.emailAddress == null ? user.username:user.emailAddress);

// Create a commit object
CommitBuilder commit = new CommitBuilder();
commit.setAuthor(ident);
commit.setCommitter(ident);
commit.setEncoding(Constants.CHARACTER_ENCODING);
commit.setMessage(message);
commit.setParentId(headId);
commit.setTreeId(indexTreeId);

// Insert the commit into the repository
ObjectId commitId = odi.insert(commit);
odi.flush();

RevWalk revWalk = new RevWalk(repository);
try {
RevCommit revCommit = revWalk.parseCommit(commitId);
RefUpdate ru = repository.updateRef(GB_PUSHES);
ru.setNewObjectId(commitId);
ru.setExpectedOldObjectId(headId);
ru.setRefLogMessage("commit: " + revCommit.getShortMessage(), false);
Result rc = ru.forceUpdate();
switch (rc) {
case NEW:
case FORCED:
case FAST_FORWARD:
success = true;
break;
case REJECTED:
case LOCK_FAILURE:
throw new ConcurrentRefUpdateException(JGitText.get().couldNotLockHEAD,
ru.getRef(), rc);
default:
throw new JGitInternalException(MessageFormat.format(
JGitText.get().updatingRefFailed, GB_PUSHES, commitId.toString(),
rc));
}
} finally {
revWalk.release();
}
} finally {
odi.release();
}
} catch (Throwable t) {
error(t, repository, "Failed to commit pushlog entry to {0}");
}
return success;
}
/**
* Creates an in-memory index of the push log entry.
*
* @param repo
* @param headId
* @param commands
* @return an in-memory index
* @throws IOException
*/
private static DirCache createIndex(Repository repo, ObjectId headId,
Collection<ReceiveCommand> commands) throws IOException {

DirCache inCoreIndex = DirCache.newInCore();
DirCacheBuilder dcBuilder = inCoreIndex.builder();
ObjectInserter inserter = repo.newObjectInserter();

long now = System.currentTimeMillis();
Set<String> ignorePaths = new TreeSet<String>();
try {
// add receive commands to the temporary index
for (ReceiveCommand command : commands) {
// use the ref names as the path names
String path = command.getRefName();
ignorePaths.add(path);

StringBuilder change = new StringBuilder();
change.append(command.getType().name()).append(' ');
switch (command.getType()) {
case CREATE:
change.append(ObjectId.zeroId().getName());
change.append(' ');
change.append(command.getNewId().getName());
break;
case UPDATE:
case UPDATE_NONFASTFORWARD:
change.append(command.getOldId().getName());
change.append(' ');
change.append(command.getNewId().getName());
break;
case DELETE:
change = null;
break;
}
if (change == null) {
// ref deleted
continue;
}
String content = change.toString();
// create an index entry for this attachment
final DirCacheEntry dcEntry = new DirCacheEntry(path);
dcEntry.setLength(content.length());
dcEntry.setLastModified(now);
dcEntry.setFileMode(FileMode.REGULAR_FILE);

// insert object
dcEntry.setObjectId(inserter.insert(Constants.OBJ_BLOB, content.getBytes("UTF-8")));

// add to temporary in-core index
dcBuilder.add(dcEntry);
}

// Traverse HEAD to add all other paths
TreeWalk treeWalk = new TreeWalk(repo);
int hIdx = -1;
if (headId != null)
hIdx = treeWalk.addTree(new RevWalk(repo).parseTree(headId));
treeWalk.setRecursive(true);

while (treeWalk.next()) {
String path = treeWalk.getPathString();
CanonicalTreeParser hTree = null;
if (hIdx != -1)
hTree = treeWalk.getTree(hIdx, CanonicalTreeParser.class);
if (!ignorePaths.contains(path)) {
// add entries from HEAD for all other paths
if (hTree != null) {
// create a new DirCacheEntry with data retrieved from
// HEAD
final DirCacheEntry dcEntry = new DirCacheEntry(path);
dcEntry.setObjectId(hTree.getEntryObjectId());
dcEntry.setFileMode(hTree.getEntryFileMode());

// add to temporary in-core index
dcBuilder.add(dcEntry);
}
}
}

// release the treewalk
treeWalk.release();

// finish temporary in-core index used for this commit
dcBuilder.finish();
} finally {
inserter.release();
}
return inCoreIndex;
}

public static List<PushLogEntry> getPushLog(String repositoryName, Repository repository) {
return getPushLog(repositoryName, repository, null, -1);
}

public static List<PushLogEntry> getPushLog(String repositoryName, Repository repository, int maxCount) {
return getPushLog(repositoryName, repository, null, maxCount);
}

public static List<PushLogEntry> getPushLog(String repositoryName, Repository repository, Date minimumDate) {
return getPushLog(repositoryName, repository, minimumDate, -1);
}
public static List<PushLogEntry> getPushLog(String repositoryName, Repository repository, Date minimumDate, int maxCount) {
List<PushLogEntry> list = new ArrayList<PushLogEntry>();
RefModel ref = getPushLogBranch(repository);
if (ref == null) {
return list;
}
List<RevCommit> pushes;
if (minimumDate == null) {
pushes = JGitUtils.getRevLog(repository, GB_PUSHES, 0, maxCount);
} else {
pushes = JGitUtils.getRevLog(repository, GB_PUSHES, minimumDate);
}
for (RevCommit push : pushes) {
if (push.getAuthorIdent().getName().equalsIgnoreCase("gitblit")) {
// skip gitblit/internal commits
continue;
}
Date date = push.getAuthorIdent().getWhen();
UserModel user = new UserModel(push.getAuthorIdent().getEmailAddress());
user.displayName = push.getAuthorIdent().getName();
PushLogEntry log = new PushLogEntry(repositoryName, date, user);
list.add(log);
List<PathChangeModel> changedRefs = JGitUtils.getFilesInCommit(repository, push);
for (PathChangeModel change : changedRefs) {
switch (change.changeType) {
case DELETE:
log.updateRef(change.path, ReceiveCommand.Type.DELETE);
break;
case ADD:
log.updateRef(change.path, ReceiveCommand.Type.CREATE);
default:
String content = JGitUtils.getStringContent(repository, push.getTree(), change.path);
String [] fields = content.split(" ");
log.updateRef(change.path, ReceiveCommand.Type.valueOf(fields[0]));
String oldId = fields[1];
String newId = fields[2];
List<RevCommit> pushedCommits = JGitUtils.getRevLog(repository, oldId, newId);
for (RevCommit pushedCommit : pushedCommits) {
log.addCommit(change.path, pushedCommit);
}
}
}
}
Collections.sort(list);
return list;
}
}

+ 0
- 23
src/com/gitblit/wicket/pages/ActivityPage.html Целия файл

@@ -1,23 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd"
xml:lang="en"
lang="en">
<body>
<wicket:extend>
<div class="pageTitle">
<h2><wicket:message key="gb.recentActivity"></wicket:message><small> <span class="hidden-phone">/ <span wicket:id="subheader">[days back]</span></span></small></h2>
</div>
<div class="hidden-phone" style="height: 155px;text-align: center;">
<table>
<tr>
<td><span class="hidden-tablet" id="chartDaily"></span></td>
<td><span id="chartRepositories"></span></td>
<td><span id="chartAuthors"></span></td>
</tr>
</table>
</div>
<div wicket:id="activityPanel" style="padding-top:5px;" >[activity panel]</div>
</wicket:extend>
</body>
</html>

+ 0
- 38
src/com/gitblit/wicket/pages/BlobPage.html Целия файл

@@ -1,38 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd"
xml:lang="en"
lang="en">
<!-- contribute google-code-prettify resources to the page header -->
<wicket:head>
<wicket:link>
<link href="prettify/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="prettify/prettify.js"></script>
</wicket:link>
</wicket:head>
<wicket:extend>
<!-- need to specify body.onload -->
<body onload="prettyPrint()">
<!-- blob nav links -->
<div class="page_nav2">
<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>
</div>
<!-- commit header -->
<div wicket:id="commitHeader">[commit header]</div>
<!-- breadcrumbs -->
<div wicket:id="breadcrumbs">[breadcrumbs]</div>
<!-- blob content -->
<pre style="border:0px;" wicket:id="blobText">[blob content]</pre>
<!-- blob image -->
<img wicket:id="blobImage" style="padding-top:5px;"></img>
</body>
</wicket:extend>
</html>

+ 0
- 70
src/com/gitblit/wicket/pages/ProjectPage.html Целия файл

@@ -1,70 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd"
xml:lang="en"
lang="en">
<body>
<wicket:extend>
<div class="row">
<div class="span12">
<h2><span wicket:id="projectTitle"></span> <small><span wicket:id="projectDescription"></span></small>
<a class="hidden-phone hidden-tablet brand" style="text-decoration: none;" wicket:id="syndication" wicket:message="title:gb.feed">
<img style="border:0px;vertical-align:middle;" src="feed_16x16.png"></img>
</a>
</h2>
<div class="markdown" wicket:id="projectMessage">[project message]</div>
</div>
</div>
<div class="tabbable">
<!-- tab titles -->
<ul class="nav nav-tabs">
<li class="active"><a href="#repositories" data-toggle="tab"><wicket:message key="gb.repositories"></wicket:message></a></li>
<li ><a href="#activity" data-toggle="tab"><wicket:message key="gb.activity"></wicket:message></a></li>
</ul>
<!-- tab content -->
<div class="tab-content">
<!-- repositories tab -->
<div class="tab-pane active" id="repositories">
<!-- markdown -->
<div class="row">
<div class="span12">
<div class="markdown" wicket:id="repositoriesMessage">[repositories message]</div>
</div>
</div>
<div class="row">
<div class="span6" style="border-bottom:1px solid #eee;" wicket:id="repositoryList">
<span wicket:id="repository"></span>
</div>
</div>
</div>
<!-- activity tab -->
<div class="tab-pane" id="activity">
<div class="pageTitle">
<h2><wicket:message key="gb.recentActivity"></wicket:message><small> <span class="hidden-phone">/ <span wicket:id="subheader">[days back]</span></span></small></h2>
</div>
<div class="hidden-phone" style="height: 155px;text-align: center;">
<table>
<tr>
<td><span class="hidden-tablet" id="chartDaily"></span></td>
<td><span id="chartRepositories"></span></td>
<td><span id="chartAuthors"></span></td>
</tr>
</table>
</div>
<div wicket:id="activityPanel">[activity panel]</div>
</div>
</div>
</div>
</wicket:extend>
</body>
</html>

+ 0
- 82
src/com/gitblit/wicket/pages/RepositoryPage.html Целия файл

@@ -1,82 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd"
xml:lang="en"
lang="en">
<body>
<wicket:extend>
<!-- page nav links -->
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" wicket:id="rootLink">
<img src="gitblt_25_white.png" width="79" height="25" alt="gitblit" class="logo"/>
</a>
<div class="nav-collapse" wicket:id="navPanel"></div>
<a class="hidden-phone hidden-tablet brand" style="text-decoration: none;" wicket:id="syndication" wicket:message="title:gb.feed">
<img style="border:0px;vertical-align:middle;" src="feed_16x16.png"></img>
</a>
<form class="hidden-phone hidden-tablet pull-right" style="margin-top:10px;" wicket:id="searchForm">
<span class="search">
<select class="small" wicket:id="searchType"/>
<input type="text" id="searchBox" wicket:id="searchBox" value=""/>
</span>
</form>
</div>
</div>
</div>
<!-- page content -->
<div class="container">
<div style="text-align:center;" wicket:id="feedback">[Feedback Panel]</div>
<!-- page header -->
<div class="pageTitle">
<div class="row">
<div class="controls">
<span wicket:id="workingCopyIndicator"></span>
<span class="hidden-phone hidden-tablet" wicket:id="forksProhibitedIndicator"></span>
<div class="hidden-phone btn-group pull-right">
<!-- future spot for other repo buttons -->
<a class="btn btn-info" wicket:id="myForkLink"><img style="border:0px;vertical-align:middle;" src="fork_16x16.png"></img> <wicket:message key="gb.myFork"></wicket:message></a>
<a class="btn btn-info" wicket:id="forkLink"><img style="border:0px;vertical-align:middle;" src="fork_16x16.png"></img> <wicket:message key="gb.fork"></wicket:message></a>
</div>
</div>
<div class="span7">
<div><span class="project" wicket:id="projectTitle">[project title]</span>/<img wicket:id="repositoryIcon" style="padding-left: 10px;"></img><span class="repository" wicket:id="repositoryName">[repository name]</span> <span class="hidden-phone"><span wicket:id="pageName">[page name]</span></span></div>
<span wicket:id="originRepository">[origin repository]</span>
</div>
</div>
</div>
<wicket:child />
</div>
<wicket:fragment wicket:id="originFragment">
<p class="originRepository"><wicket:message key="gb.forkedFrom">[forked from]</wicket:message> <span wicket:id="originRepository">[origin repository]</span></p>
</wicket:fragment>
<wicket:fragment wicket:id="workingCopyFragment">
<div class="pull-right" style="padding-top:0px;margin-bottom:0px;padding-left:5px">
<span class="alert alert-info" style="padding: 6px 14px 6px 14px;vertical-align: middle;"><i class="icon-exclamation-sign"></i>&nbsp;<span class="hidden-phone" wicket:id="workingCopy" style="font-weight:bold;">[working copy]</span></span>
</div>
</wicket:fragment>
<wicket:fragment wicket:id="forksProhibitedFragment">
<div class="pull-right" style="padding-top:0px;margin-bottom:0px;padding-left:5px">
<span class="alert alert-error" style="padding: 6px 14px 6px 14px;vertical-align: middle;"><i class="icon-ban-circle"></i>&nbsp;<span class="hidden-phone" wicket:id="forksProhibited" style="font-weight:bold;">[forks prohibited]</span></span>
</div>
</wicket:fragment>
</wicket:extend>
</body>
</html>

+ 0
- 18
src/com/gitblit/wicket/pages/RootSubPage.html Целия файл

@@ -1,18 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd"
xml:lang="en"
lang="en">
<body>
<wicket:extend>
<!-- page header -->
<div class="pageTitle">
<h2><span wicket:id="pageName">[page name]</span> <small><span wicket:id="pageSubName">[sub name]</span></small></h2>
</div>
<!-- Subclass Content -->
<wicket:child/>
</wicket:extend>
</body>
</html>

+ 0
- 2
src/com/gitblit/wicket/pages/prettify/lang-apollo.js Целия файл

@@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\r\n]*/,null,"#"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,
null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[SE]?BANK\=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[!-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["apollo","agc","aea"])

+ 0
- 2
src/com/gitblit/wicket/pages/prettify/lang-css.js Целия файл

@@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[ \t\r\n\f]+/,null," \t\r\n\u000c"]],[["str",/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],["str",/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],["kwd",/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],
["com",/^(?:<!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#(?:[0-9a-f]{3}){1,2}/i],["pln",/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],["pun",/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^\)\"\']+/]]),["css-str"])

+ 0
- 2
src/com/gitblit/wicket/pages/prettify/lang-hs.js Целия файл

@@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\x0B\x0C\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])\'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:(?:--+(?:[^\r\n\x0C]*)?)|(?:\{-(?:[^-]|-+[^-\}])*-\}))/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^a-zA-Z0-9\']|$)/,
null],["pln",/^(?:[A-Z][\w\']*\.)*[a-zA-Z][\w\']*/],["pun",/^[^\t\n\x0B\x0C\r a-zA-Z0-9\'\"]+/]]),["hs"])

+ 0
- 2
src/com/gitblit/wicket/pages/prettify/lang-lisp.js Целия файл

@@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(/,null,"("],["clo",/^\)/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,
null],["lit",/^[+\-]?(?:0x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["cl","el","lisp","scm"])

+ 0
- 2
src/com/gitblit/wicket/pages/prettify/lang-lua.js Целия файл

@@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\s\S]*?(?:\]\1\]|$)|[^\r\n]*)/],["str",/^\[(=*)\[[\s\S]*?(?:\]\1\]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],
["pln",/^[a-z_]\w*/i],["pun",/^[^\w\t\n\r \xA0][^\w\t\n\r \xA0\"\'\-\+=]*/]]),["lua"])

+ 0
- 2
src/com/gitblit/wicket/pages/prettify/lang-ml.js Целия файл

@@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^#(?:if[\t\n\r \xA0]+(?:[a-z_$][\w\']*|``[^\r\n\t`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\r\n]*|\(\*[\s\S]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/],
["lit",/^[+\-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^(?:[a-z_]\w*[!?#]?|``[^\r\n\t`]*(?:``|$))/i],["pun",/^[^\t\n\r \xA0\"\'\w]+/]]),["fs","ml"])

+ 0
- 1
src/com/gitblit/wicket/pages/prettify/lang-proto.js Целия файл

@@ -1 +0,0 @@
PR.registerLangHandler(PR.sourceDecorator({keywords:"bool bytes default double enum extend extensions false fixed32 fixed64 float group import int32 int64 max message option optional package repeated required returns rpc service sfixed32 sfixed64 sint32 sint64 string syntax to true uint32 uint64",cStyleComments:true}),["proto"])

+ 0
- 2
src/com/gitblit/wicket/pages/prettify/lang-scala.js Целия файл

@@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:(?:""(?:""?(?!")|[^\\"]|\\.)*"{0,3})|(?:[^"\r\n\\]|\\.)*"?))/,null,'"'],["lit",/^`(?:[^\r\n\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&()*+,\-:;<=>?@\[\\\]^{|}~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\r\n\\']|\\(?:'|[^\r\n']+))'/],["lit",/^'[a-zA-Z_$][\w$]*(?!['$\w])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/],
["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:(?:0(?:[0-7]+|X[0-9A-F]+))L?|(?:(?:0|[1-9][0-9]*)(?:(?:\.[0-9]+)?(?:E[+\-]?[0-9]+)?F?|L?))|\\.[0-9]+(?:E[+\-]?[0-9]+)?F?)/i],["typ",/^[$_]*[A-Z][_$A-Z0-9]*[a-z][\w$]*/],["pln",/^[$a-zA-Z_][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"])

+ 0
- 2
src/com/gitblit/wicket/pages/prettify/lang-sql.js Целия файл

@@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^\"\\]|\\.)*"|'(?:[^\'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\r\n]*|\/\*[\s\S]*?(?:\*\/|$))/],["kwd",/^(?:ADD|ALL|ALTER|AND|ANY|AS|ASC|AUTHORIZATION|BACKUP|BEGIN|BETWEEN|BREAK|BROWSE|BULK|BY|CASCADE|CASE|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COMMIT|COMPUTE|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATABASE|DBCC|DEALLOCATE|DECLARE|DEFAULT|DELETE|DENY|DESC|DISK|DISTINCT|DISTRIBUTED|DOUBLE|DROP|DUMMY|DUMP|ELSE|END|ERRLVL|ESCAPE|EXCEPT|EXEC|EXECUTE|EXISTS|EXIT|FETCH|FILE|FILLFACTOR|FOR|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GOTO|GRANT|GROUP|HAVING|HOLDLOCK|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IN|INDEX|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KILL|LEFT|LIKE|LINENO|LOAD|NATIONAL|NOCHECK|NONCLUSTERED|NOT|NULL|NULLIF|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTION|OR|ORDER|OUTER|OVER|PERCENT|PLAN|PRECISION|PRIMARY|PRINT|PROC|PROCEDURE|PUBLIC|RAISERROR|READ|READTEXT|RECONFIGURE|REFERENCES|REPLICATION|RESTORE|RESTRICT|RETURN|REVOKE|RIGHT|ROLLBACK|ROWCOUNT|ROWGUIDCOL|RULE|SAVE|SCHEMA|SELECT|SESSION_USER|SET|SETUSER|SHUTDOWN|SOME|STATISTICS|SYSTEM_USER|TABLE|TEXTSIZE|THEN|TO|TOP|TRAN|TRANSACTION|TRIGGER|TRUNCATE|TSEQUAL|UNION|UNIQUE|UPDATE|UPDATETEXT|USE|USER|VALUES|VARYING|VIEW|WAITFOR|WHEN|WHERE|WHILE|WITH|WRITETEXT)(?=[^\w-]|$)/i,
null],["lit",/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^[a-z_][\w-]*/i],["pun",/^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0+\-\"\']*/]]),["sql"])

+ 0
- 2
src/com/gitblit/wicket/pages/prettify/lang-vb.js Целия файл

@@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0\u2028\u2029]+/,null,"\t\n\r \u00a0\u2028\u2029"],["str",/^(?:[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})(?:[\"\u201C\u201D]c|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/i,null,'"\u201c\u201d'],["com",/^[\'\u2018\u2019][^\r\n\u2028\u2029]*/,null,"'\u2018\u2019"]],[["kwd",/^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i,
null],["com",/^REM[^\r\n\u2028\u2029]*/i],["lit",/^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*|\[(?:[a-z]|_\w)\w*\])/i],["pun",/^[^\w\t\n\r \"\'\[\]\xA0\u2018\u2019\u201C\u201D\u2028\u2029]+/],["pun",/^(?:\[|\])/]]),["vb","vbs"])

+ 0
- 3
src/com/gitblit/wicket/pages/prettify/lang-vhdl.js Целия файл

@@ -1,3 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"]],[["str",/^(?:[BOX]?"(?:[^\"]|"")*"|'.')/i],["com",/^--[^\r\n]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i,
null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^\'(?:ACTIVE|ASCENDING|BASE|DELAYED|DRIVING|DRIVING_VALUE|EVENT|HIGH|IMAGE|INSTANCE_NAME|LAST_ACTIVE|LAST_EVENT|LAST_VALUE|LEFT|LEFTOF|LENGTH|LOW|PATH_NAME|POS|PRED|QUIET|RANGE|REVERSE_RANGE|RIGHT|RIGHTOF|SIMPLE_NAME|STABLE|SUCC|TRANSACTION|VAL|VALUE)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w\\.]+#(?:[+\-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:E[+\-]?\d+(?:_\d+)*)?)/i],
["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0\-\"\']*/]]),["vhdl","vhd"])

+ 0
- 2
src/com/gitblit/wicket/pages/prettify/lang-wiki.js Целия файл

@@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t \xA0a-gi-z0-9]+/,null,"\t \u00a0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[=*~\^\[\]]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^(?:[A-Z][a-z][a-z0-9]+[A-Z][a-z][a-zA-Z0-9]+)\b/],["lang-",/^\{\{\{([\s\S]+?)\}\}\}/],["lang-",/^`([^\r\n`]+)`/],["str",/^https?:\/\/[^\/?#\s]*(?:\/[^?#\s]*)?(?:\?[^#\s]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\s\S])[^#=*~^A-Zh\{`\[\r\n]*/]]),["wiki"]);
PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"])

+ 0
- 2
src/com/gitblit/wicket/pages/prettify/lang-yaml.js Целия файл

@@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:|>?]+/,null,":|>?"],["dec",/^%(?:YAML|TAG)[^#\r\n]+/,null,"%"],["typ",/^[&]\S+/,null,"&"],["typ",/^!\S*/,null,"!"],["str",/^"(?:[^\\"]|\\.)*(?:"|$)/,null,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,null,"'"],["com",/^#[^\r\n]*/,null,"#"],["pln",/^\s+/,null," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\r\n]|$)/],["pun",/^-/],["kwd",/^\w+:[ \r\n]/],["pln",/^\w+/]]),
["yaml","yml"])

+ 0
- 1
src/com/gitblit/wicket/pages/prettify/prettify.css Целия файл

@@ -1 +0,0 @@
.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun{color:#660}.pln{color:#000}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec{color:#606}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}@media print{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun{color:#440}.pln{color:#000}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}

+ 0
- 33
src/com/gitblit/wicket/pages/prettify/prettify.js Целия файл

@@ -1,33 +0,0 @@
window.PR_SHOULD_USE_CONTINUATION=true;window.PR_TAB_WIDTH=8;window.PR_normalizedHtml=window.PR=window.prettyPrintOne=window.prettyPrint=void 0;window._pr_isIE6=function(){var y=navigator&&navigator.userAgent&&navigator.userAgent.match(/\bMSIE ([678])\./);y=y?+y[1]:false;window._pr_isIE6=function(){return y};return y};
(function(){function y(b){return b.replace(L,"&amp;").replace(M,"&lt;").replace(N,"&gt;")}function H(b,f,i){switch(b.nodeType){case 1:var o=b.tagName.toLowerCase();f.push("<",o);var l=b.attributes,n=l.length;if(n){if(i){for(var r=[],j=n;--j>=0;)r[j]=l[j];r.sort(function(q,m){return q.name<m.name?-1:q.name===m.name?0:1});l=r}for(j=0;j<n;++j){r=l[j];r.specified&&f.push(" ",r.name.toLowerCase(),'="',r.value.replace(L,"&amp;").replace(M,"&lt;").replace(N,"&gt;").replace(X,"&quot;"),'"')}}f.push(">");
for(l=b.firstChild;l;l=l.nextSibling)H(l,f,i);if(b.firstChild||!/^(?:br|link|img)$/.test(o))f.push("</",o,">");break;case 3:case 4:f.push(y(b.nodeValue));break}}function O(b){function f(c){if(c.charAt(0)!=="\\")return c.charCodeAt(0);switch(c.charAt(1)){case "b":return 8;case "t":return 9;case "n":return 10;case "v":return 11;case "f":return 12;case "r":return 13;case "u":case "x":return parseInt(c.substring(2),16)||c.charCodeAt(1);case "0":case "1":case "2":case "3":case "4":case "5":case "6":case "7":return parseInt(c.substring(1),
8);default:return c.charCodeAt(1)}}function i(c){if(c<32)return(c<16?"\\x0":"\\x")+c.toString(16);c=String.fromCharCode(c);if(c==="\\"||c==="-"||c==="["||c==="]")c="\\"+c;return c}function o(c){var d=c.substring(1,c.length-1).match(RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g"));c=[];for(var a=[],k=d[0]==="^",e=k?1:0,h=d.length;e<h;++e){var g=d[e];switch(g){case "\\B":case "\\b":case "\\D":case "\\d":case "\\S":case "\\s":case "\\W":case "\\w":c.push(g);
continue}g=f(g);var s;if(e+2<h&&"-"===d[e+1]){s=f(d[e+2]);e+=2}else s=g;a.push([g,s]);if(!(s<65||g>122)){s<65||g>90||a.push([Math.max(65,g)|32,Math.min(s,90)|32]);s<97||g>122||a.push([Math.max(97,g)&-33,Math.min(s,122)&-33])}}a.sort(function(v,w){return v[0]-w[0]||w[1]-v[1]});d=[];g=[NaN,NaN];for(e=0;e<a.length;++e){h=a[e];if(h[0]<=g[1]+1)g[1]=Math.max(g[1],h[1]);else d.push(g=h)}a=["["];k&&a.push("^");a.push.apply(a,c);for(e=0;e<d.length;++e){h=d[e];a.push(i(h[0]));if(h[1]>h[0]){h[1]+1>h[0]&&a.push("-");
a.push(i(h[1]))}}a.push("]");return a.join("")}function l(c){for(var d=c.source.match(RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),a=d.length,k=[],e=0,h=0;e<a;++e){var g=d[e];if(g==="(")++h;else if("\\"===g.charAt(0))if((g=+g.substring(1))&&g<=h)k[g]=-1}for(e=1;e<k.length;++e)if(-1===k[e])k[e]=++n;for(h=e=0;e<a;++e){g=d[e];if(g==="("){++h;if(k[h]===undefined)d[e]="(?:"}else if("\\"===
g.charAt(0))if((g=+g.substring(1))&&g<=h)d[e]="\\"+k[h]}for(h=e=0;e<a;++e)if("^"===d[e]&&"^"!==d[e+1])d[e]="";if(c.ignoreCase&&r)for(e=0;e<a;++e){g=d[e];c=g.charAt(0);if(g.length>=2&&c==="[")d[e]=o(g);else if(c!=="\\")d[e]=g.replace(/[a-zA-Z]/g,function(s){s=s.charCodeAt(0);return"["+String.fromCharCode(s&-33,s|32)+"]"})}return d.join("")}for(var n=0,r=false,j=false,q=0,m=b.length;q<m;++q){var t=b[q];if(t.ignoreCase)j=true;else if(/[a-z]/i.test(t.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,
""))){r=true;j=false;break}}var p=[];q=0;for(m=b.length;q<m;++q){t=b[q];if(t.global||t.multiline)throw Error(""+t);p.push("(?:"+l(t)+")")}return RegExp(p.join("|"),j?"gi":"g")}function Y(b){var f=0;return function(i){for(var o=null,l=0,n=0,r=i.length;n<r;++n)switch(i.charAt(n)){case "\t":o||(o=[]);o.push(i.substring(l,n));l=b-f%b;for(f+=l;l>=0;l-=16)o.push(" ".substring(0,l));l=n+1;break;case "\n":f=0;break;default:++f}if(!o)return i;o.push(i.substring(l));return o.join("")}}function I(b,
f,i,o){if(f){b={source:f,c:b};i(b);o.push.apply(o,b.d)}}function B(b,f){var i={},o;(function(){for(var r=b.concat(f),j=[],q={},m=0,t=r.length;m<t;++m){var p=r[m],c=p[3];if(c)for(var d=c.length;--d>=0;)i[c.charAt(d)]=p;p=p[1];c=""+p;if(!q.hasOwnProperty(c)){j.push(p);q[c]=null}}j.push(/[\0-\uffff]/);o=O(j)})();var l=f.length;function n(r){for(var j=r.c,q=[j,z],m=0,t=r.source.match(o)||[],p={},c=0,d=t.length;c<d;++c){var a=t[c],k=p[a],e=void 0,h;if(typeof k==="string")h=false;else{var g=i[a.charAt(0)];
if(g){e=a.match(g[1]);k=g[0]}else{for(h=0;h<l;++h){g=f[h];if(e=a.match(g[1])){k=g[0];break}}e||(k=z)}if((h=k.length>=5&&"lang-"===k.substring(0,5))&&!(e&&typeof e[1]==="string")){h=false;k=P}h||(p[a]=k)}g=m;m+=a.length;if(h){h=e[1];var s=a.indexOf(h),v=s+h.length;if(e[2]){v=a.length-e[2].length;s=v-h.length}k=k.substring(5);I(j+g,a.substring(0,s),n,q);I(j+g+s,h,Q(k,h),q);I(j+g+v,a.substring(v),n,q)}else q.push(j+g,k)}r.d=q}return n}function x(b){var f=[],i=[];if(b.tripleQuotedStrings)f.push([A,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
null,"'\""]);else b.multiLineStrings?f.push([A,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):f.push([A,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]);b.verbatimStrings&&i.push([A,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);if(b.hashComments)if(b.cStyleComments){f.push([C,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]);i.push([A,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
null])}else f.push([C,/^#[^\r\n]*/,null,"#"]);if(b.cStyleComments){i.push([C,/^\/\/[^\r\n]*/,null]);i.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}b.regexLiterals&&i.push(["lang-regex",RegExp("^"+Z+"(/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/)")]);b=b.keywords.replace(/^\s+|\s+$/g,"");b.length&&i.push([R,RegExp("^(?:"+b.replace(/\s+/g,"|")+")\\b"),null]);f.push([z,/^\s+/,null," \r\n\t\u00a0"]);i.push([J,/^@[a-z_$][a-z_$@0-9]*/i,null],[S,/^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/,
null],[z,/^[a-z_$][a-z_$@0-9]*/i,null],[J,/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,null,"0123456789"],[E,/^.[^\s\w\.$@\'\"\`\/\#]*/,null]);return B(f,i)}function $(b){function f(D){if(D>r){if(j&&j!==q){n.push("</span>");j=null}if(!j&&q){j=q;n.push('<span class="',j,'">')}var T=y(p(i.substring(r,D))).replace(e?d:c,"$1&#160;");e=k.test(T);n.push(T.replace(a,s));r=D}}var i=b.source,o=b.g,l=b.d,n=[],r=0,j=null,q=null,m=0,t=0,p=Y(window.PR_TAB_WIDTH),c=/([\r\n ]) /g,
d=/(^| ) /gm,a=/\r\n?|\n/g,k=/[ \r\n]$/,e=true,h=window._pr_isIE6();h=h?b.b.tagName==="PRE"?h===6?"&#160;\r\n":h===7?"&#160;<br>\r":"&#160;\r":"&#160;<br />":"<br />";var g=b.b.className.match(/\blinenums\b(?::(\d+))?/),s;if(g){for(var v=[],w=0;w<10;++w)v[w]=h+'</li><li class="L'+w+'">';var F=g[1]&&g[1].length?g[1]-1:0;n.push('<ol class="linenums"><li class="L',F%10,'"');F&&n.push(' value="',F+1,'"');n.push(">");s=function(){var D=v[++F%10];return j?"</span>"+D+'<span class="'+j+'">':D}}else s=h;
for(;;)if(m<o.length?t<l.length?o[m]<=l[t]:true:false){f(o[m]);if(j){n.push("</span>");j=null}n.push(o[m+1]);m+=2}else if(t<l.length){f(l[t]);q=l[t+1];t+=2}else break;f(i.length);j&&n.push("</span>");g&&n.push("</li></ol>");b.a=n.join("")}function u(b,f){for(var i=f.length;--i>=0;){var o=f[i];if(G.hasOwnProperty(o))"console"in window&&console.warn("cannot override language handler %s",o);else G[o]=b}}function Q(b,f){b&&G.hasOwnProperty(b)||(b=/^\s*</.test(f)?"default-markup":"default-code");return G[b]}
function U(b){var f=b.f,i=b.e;b.a=f;try{var o,l=f.match(aa);f=[];var n=0,r=[];if(l)for(var j=0,q=l.length;j<q;++j){var m=l[j];if(m.length>1&&m.charAt(0)==="<"){if(!ba.test(m))if(ca.test(m)){f.push(m.substring(9,m.length-3));n+=m.length-12}else if(da.test(m)){f.push("\n");++n}else if(m.indexOf(V)>=0&&m.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,' $1="$2$3$4"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)){var t=m.match(W)[2],p=1,c;c=j+1;a:for(;c<q;++c){var d=l[c].match(W);if(d&&
d[2]===t)if(d[1]==="/"){if(--p===0)break a}else++p}if(c<q){r.push(n,l.slice(j,c+1).join(""));j=c}else r.push(n,m)}else r.push(n,m)}else{var a;p=m;var k=p.indexOf("&");if(k<0)a=p;else{for(--k;(k=p.indexOf("&#",k+1))>=0;){var e=p.indexOf(";",k);if(e>=0){var h=p.substring(k+3,e),g=10;if(h&&h.charAt(0)==="x"){h=h.substring(1);g=16}var s=parseInt(h,g);isNaN(s)||(p=p.substring(0,k)+String.fromCharCode(s)+p.substring(e+1))}}a=p.replace(ea,"<").replace(fa,">").replace(ga,"'").replace(ha,'"').replace(ia," ").replace(ja,
"&")}f.push(a);n+=a.length}}o={source:f.join(""),h:r};var v=o.source;b.source=v;b.c=0;b.g=o.h;Q(i,v)(b);$(b)}catch(w){if("console"in window)console.log(w&&w.stack?w.stack:w)}}var A="str",R="kwd",C="com",S="typ",J="lit",E="pun",z="pln",P="src",V="nocode",Z=function(){for(var b=["!","!=","!==","#","%","%=","&","&&","&&=","&=","(","*","*=","+=",",","-=","->","/","/=",":","::",";","<","<<","<<=","<=","=","==","===",">",">=",">>",">>=",">>>",">>>=","?","@","[","^","^=","^^","^^=","{","|","|=","||","||=",
"~","break","case","continue","delete","do","else","finally","instanceof","return","throw","try","typeof"],f="(?:^^|[+-]",i=0;i<b.length;++i)f+="|"+b[i].replace(/([^=<>:&a-z])/g,"\\$1");f+=")\\s*";return f}(),L=/&/g,M=/</g,N=/>/g,X=/\"/g,ea=/&lt;/g,fa=/&gt;/g,ga=/&apos;/g,ha=/&quot;/g,ja=/&amp;/g,ia=/&nbsp;/g,ka=/[\r\n]/g,K=null,aa=RegExp("[^<]+|<!--[\\s\\S]*?--\>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>|</?[a-zA-Z](?:[^>\"']|'[^']*'|\"[^\"]*\")*>|<","g"),ba=/^<\!--/,ca=/^<!\[CDATA\[/,da=/^<br\b/i,W=/^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/,
la=x({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof debugger eval export function get null set undefined var with Infinity NaN caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END break continue do else for if return while case done elif esac eval fi function in local set then until ",
hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true}),G={};u(la,["default-code"]);u(B([],[[z,/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],[C,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[E,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup",
"htm","html","mxml","xhtml","xml","xsl"]);u(B([[z,/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[E,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],
["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);u(B([],[["atv",/^[\s\S]+/]]),["uq.val"]);u(x({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where ",
hashComments:true,cStyleComments:true}),["c","cc","cpp","cxx","cyc","m"]);u(x({keywords:"null true false"}),["json"]);u(x({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ",
hashComments:true,cStyleComments:true,verbatimStrings:true}),["cs"]);u(x({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",
cStyleComments:true}),["java"]);u(x({keywords:"break continue do else for if return while case done elif esac eval fi function in local set then until ",hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);u(x({keywords:"break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ",hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);
u(x({keywords:"caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ",hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);u(x({keywords:"break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ",hashComments:true,
multiLineStrings:true,regexLiterals:true}),["rb"]);u(x({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof debugger eval export function get null set undefined var with Infinity NaN ",cStyleComments:true,regexLiterals:true}),["js"]);u(B([],[[A,/^[\s\S]+/]]),
["regex"]);window.PR_normalizedHtml=H;window.prettyPrintOne=function(b,f){var i={f:b,e:f};U(i);return i.a};window.prettyPrint=function(b){function f(){for(var t=window.PR_SHOULD_USE_CONTINUATION?j.now()+250:Infinity;q<o.length&&j.now()<t;q++){var p=o[q];if(p.className&&p.className.indexOf("prettyprint")>=0){var c=p.className.match(/\blang-(\w+)\b/);if(c)c=c[1];for(var d=false,a=p.parentNode;a;a=a.parentNode)if((a.tagName==="pre"||a.tagName==="code"||a.tagName==="xmp")&&a.className&&a.className.indexOf("prettyprint")>=
0){d=true;break}if(!d){a=p;if(null===K){d=document.createElement("PRE");d.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));K=!/</.test(d.innerHTML)}if(K){d=a.innerHTML;if("XMP"===a.tagName)d=y(d);else{a=a;if("PRE"===a.tagName)a=true;else if(ka.test(d)){var k="";if(a.currentStyle)k=a.currentStyle.whiteSpace;else if(window.getComputedStyle)k=window.getComputedStyle(a,null).whiteSpace;a=!k||k==="pre"}else a=true;a||(d=d.replace(/(<br\s*\/?>)[\r\n]+/g,"$1").replace(/(?:[\r\n]+[ \t]*)+/g,
" "))}d=d}else{d=[];for(a=a.firstChild;a;a=a.nextSibling)H(a,d);d=d.join("")}d=d.replace(/(?:\r\n?|\n)$/,"");m={f:d,e:c,b:p};U(m);if(p=m.a){c=m.b;if("XMP"===c.tagName){d=document.createElement("PRE");for(a=0;a<c.attributes.length;++a){k=c.attributes[a];if(k.specified)if(k.name.toLowerCase()==="class")d.className=k.value;else d.setAttribute(k.name,k.value)}d.innerHTML=p;c.parentNode.replaceChild(d,c)}else c.innerHTML=p}}}}if(q<o.length)setTimeout(f,250);else b&&b()}for(var i=[document.getElementsByTagName("pre"),
document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],o=[],l=0;l<i.length;++l)for(var n=0,r=i[l].length;n<r;++n)o.push(i[l][n]);i=null;var j=Date;j.now||(j={now:function(){return(new Date).getTime()}});var q=0,m;f()};window.PR={combinePrefixPatterns:O,createSimpleLexer:B,registerLangHandler:u,sourceDecorator:x,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:C,PR_DECLARATION:"dec",PR_KEYWORD:R,PR_LITERAL:J,PR_NOCODE:V,PR_PLAIN:z,PR_PUNCTUATION:E,PR_SOURCE:P,PR_STRING:A,
PR_TAG:"tag",PR_TYPE:S}})()

+ 0
- 30
src/com/gitblit/wicket/panels/RepositoryUrlPanel.html Целия файл

@@ -1,30 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd"
xml:lang="en"
lang="en">
<wicket:panel>
<span wicket:id="repositoryUrl" style="color: blue;">[repository url]</span><span class="hidden-phone hidden-tablet" wicket:id="copyFunction"></span>
<!-- Plain JavaScript manual copy & paste -->
<wicket:fragment wicket:id="jsPanel">
<span style="vertical-align:baseline;">
<img wicket:id="copyIcon" wicket:message="title:gb.copyToClipboard"></img>
</span>
</wicket:fragment>
<!-- flash-based button-press copy & paste -->
<wicket:fragment wicket:id="clippyPanel">
<object wicket:message="title:gb.copyToClipboard" style="vertical-align:middle;"
wicket:id="clippy"
width="14"
height="14"
bgcolor="#ffffff"
quality="high"
wmode="transparent"
scale="noscale"
allowScriptAccess="always"></object>
</wicket:fragment>
</wicket:panel>
</html>

+ 0
- 51
src/com/gitblit/wicket/panels/RepositoryUrlPanel.java Целия файл

@@ -1,51 +0,0 @@
/*
* Copyright 2011 gitblit.com.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gitblit.wicket.panels;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.image.ContextImage;
import org.apache.wicket.markup.html.panel.Fragment;
import com.gitblit.GitBlit;
import com.gitblit.Keys;
import com.gitblit.utils.StringUtils;
import com.gitblit.wicket.WicketUtils;
public class RepositoryUrlPanel extends BasePanel {
private static final long serialVersionUID = 1L;
public RepositoryUrlPanel(String wicketId, String url) {
super(wicketId);
add(new Label("repositoryUrl", url));
if (GitBlit.getBoolean(Keys.web.allowFlashCopyToClipboard, true)) {
// clippy: flash-based copy & paste
Fragment fragment = new Fragment("copyFunction", "clippyPanel", this);
String baseUrl = WicketUtils.getGitblitURL(getRequest());
ShockWaveComponent clippy = new ShockWaveComponent("clippy", baseUrl + "/clippy.swf");
clippy.setValue("flashVars", "text=" + StringUtils.encodeURL(url));
fragment.add(clippy);
add(fragment);
} else {
// javascript: manual copy & paste with modal browser prompt dialog
Fragment fragment = new Fragment("copyFunction", "jsPanel", this);
ContextImage img = WicketUtils.newImage("copyIcon", "clippy.png");
img.add(new JavascriptTextPrompt("onclick", "Copy to Clipboard (Ctrl+C, Enter)", url));
fragment.add(img);
add(fragment);
}
}
}

checkstyle.xml → src/main/config/checkstyle.xml Целия файл


distrib/authority.conf → src/main/distrib/data/certs/authority.conf Целия файл


distrib/instructions.tmpl → src/main/distrib/data/certs/instructions.tmpl Целия файл


distrib/mail.tmpl → src/main/distrib/data/certs/mail.tmpl Целия файл


+ 81
- 0
src/main/distrib/data/clientapps.json Целия файл

@@ -0,0 +1,81 @@
[
{
"name": "Git",
"title": "Git",
"description": "a fast, open-source, distributed VCS",
"legal": "released under the GPLv2 open source license",
"command": "git clone ${repoUrl}",
"productUrl": "http://git-scm.com",
"icon": "git-black_32x32.png",
"isActive": true
},
{
"name": "SmartGit/Hg",
"title": "syntevo SmartGit/Hg\u2122",
"description": "a Git client for Windows, Mac, & Linux",
"legal": "\u00a9 2013 syntevo GmbH. All rights reserved.",
"cloneUrl": "smartgit://cloneRepo/${repoUrl}",
"productUrl": "http://www.syntevo.com/smartgithg",
"platforms": [ "windows", "macintosh", "linux" ],
"icon": "smartgithg_32x32.png",
"isActive": true
},
{
"name": "SourceTree",
"title": "Atlassian SourceTree\u2122",
"description": "a free Git client for Windows or Mac",
"legal": "\u00a9 2013 Atlassian. All rights reserved.",
"cloneUrl": "sourcetree://cloneRepo/${repoUrl}",
"productUrl": "http://sourcetreeapp.com",
"platforms": [ "windows", "macintosh" ],
"icon": "sourcetree_32x32.png",
"isActive": true
},
{
"name": "Tower",
"title": "fournova Tower\u2122",
"description": "a Git client for Mac",
"legal": "\u00a9 2013 fournova Software GmbH. All rights reserved.",
"cloneUrl": "gittower://openRepo/${repoUrl}",
"productUrl": "http://www.git-tower.com",
"platforms": [ "macintosh" ],
"icon": "tower_32x32.png",
"isActive": true
},
{
"name": "GitHub",
"title": "GitHub\u2122 for Mac",
"description": "a free Git client for Mac OS X",
"legal": "\u00a9 2013 GitHub. All rights reserved.",
"cloneUrl": "github-mac://openRepo/${repoUrl}",
"productUrl": "http://mac.github.com",
"transports": [ "http", "https" ],
"platforms": [ "macintosh" ],
"icon": "github_32x32.png",
"isActive": true
},
{
"name": "GitHub",
"title": "GitHub\u2122 for Windows",
"description": "a free Git client for Windows",
"legal": "\u00a9 2013 GitHub. All rights reserved.",
"cloneUrl": "github-windows://openRepo/${repoUrl}",
"productUrl": "http://windows.github.com",
"transports": [ "http", "https" ],
"platforms": [ "windows" ],
"icon": "github_32x32.png",
"isActive": true
},
{
"name": "SparkleShare",
"title": "SparkleShare\u2122",
"description": "an open source collaboration and sharing tool",
"legal": "released under the GPLv3 open source license",
"cloneUrl": "sparkleshare://addProject/${baseUrl}/sparkleshare/${repoUrl}.xml",
"productUrl": "http://sparkleshare.org",
"platforms": [ "windows", "macintosh", "linux" ],
"icon": "sparkleshare_32x32.png",
"minimumPermission" : "RW+",
"isActive": false
}
]

+ 12
- 0
src/main/distrib/data/git/project.mkd Целия файл

@@ -0,0 +1,12 @@
This project contains all repositories created directly in the root of *git.repositoriesFolder*.
This message is stored in *git.repositoriesFolder*/**project.mkd**
#### Other Projects
Each project, or repository group, may specify it's own message by defining a **project.mkd** file in the project folder.
<pre>
<i>git.repositoriesFolder</i>/projecta/<b>project.mkd</b>
<i>git.repositoriesFolder</i>/projectb/<b>project.mkd</b>
</pre>

distrib/gitblit.properties → src/main/distrib/data/gitblit.properties Целия файл

@@ -76,6 +76,23 @@ git.searchExclusions =
# SINCE 1.1.0
git.submoduleUrlPatterns = .*?://github.com/(.*)
# Specify the interface for Git Daemon to bind it's service.
# You may specify an ip or an empty value to bind to all interfaces.
# Specifying localhost will result in Gitblit ONLY listening to requests to
# localhost.
#
# SINCE 1.3.0
# RESTART REQUIRED
git.daemonBindInterface = localhost
# port for serving the Git Daemon service. <= 0 disables this service.
# On Unix/Linux systems, ports < 1024 require root permissions.
# Recommended value: 9418
#
# SINCE 1.3.0
# RESTART REQUIRED
git.daemonPort = 9418
# Allow push/pull over http/https with JGit servlet.
# If you do NOT want to allow Git clients to clone/push to Gitblit set this
# to false. You might want to do this if you are only using ssh:// or git://.
@@ -146,6 +163,17 @@ git.defaultAccessRestriction = NONE
# SINCE 1.1.0
git.defaultAuthorizationControl = NAMED
# The default incremental push tag prefix. Tag prefix applied to a repository
# that has automatic push tags enabled and does not specify a custom tag prefix.
#
# If incremental push tags are enabled, the tips of each branch in the push will
# be tagged with an increasing revision integer.
#
# e.g. refs/tags/r2345 or refs/tags/rev_2345
#
# SINCE 1.3.0
git.defaultIncrementalPushTagPrefix = r
# Enable JGit-based garbage collection. (!!EXPERIMENTAL!!)
#
# USE AT YOUR OWN RISK!
@@ -440,6 +468,12 @@ fanout.connectionLimit = 0
# RESTART REQUIRED
web.authenticateViewPages = false
# If web.authenticateViewPages=true you may optionally require a client-side
# basic authentication prompt instead of the standard form-based login.
#
# SINCE 1.3.0
web.enforceHttpBasicAuthentication = false
# Require admin authentication for the admin functions and pages
#
# SINCE 0.5.0
@@ -465,6 +499,8 @@ web.projectsFile = ${baseFolder}/projects.conf
# Alternative user services:
# com.gitblit.LdapUserService
# com.gitblit.RedmineUserService
# com.gitblit.SalesforceUserService
# com.gitblit.WindowsUserService
#
# Any custom user service implementation must have a public default constructor.
#
@@ -495,6 +531,53 @@ realm.minPasswordLength = 5
# SINCE 0.5.0
web.siteName =
# You may specify a different logo image for the header but it must be 120x45px.
# If the specified file does not exist, the default Gitblit logo will be used.
#
# SINCE 1.3.0
# BASEFOLDER
web.headerLogo = ${baseFolder}/logo.png
# You may specify a custom header background CSS color. If unspecified, the
# default color will be used.
#
# e.g. web.headerBackgroundColor = #002060
#
# SINCE 1.3.0
web.headerBackgroundColor =
# You may specify a custom header foreground CSS color. If unspecified, the
# default color will be used.
#
# e.g. web.headerForegroundColor = white
#
# SINCE 1.3.0
web.headerForegroundColor =
# You may specify a custom header foreground hover CSS color. If unspecified, the
# default color will be used.
#
# e.g. web.headerHoverColor = white
#
# SINCE 1.3.0
web.headerHoverColor =
# You may specify a custom header border CSS color. If unspecified, the default
# color will be used.
#
# e.g. web.headerBorderColor = #002060
#
# SINCE 1.3.0
web.headerBorderColor =
# You may specify a custom header border CSS color. If unspecified, the default
# color will be used.
#
# e.g. web.headerBorderFocusColor = #ff9900
#
# SINCE 1.3.0
web.headerBorderFocusColor =
# If *web.authenticateAdminPages*=true, users with "admin" role can create
# repositories, create users, and edit repository metadata.
#
@@ -533,6 +616,13 @@ web.enableRpcAdministration = false
# BASEFOLDER
web.robots.txt = ${baseFolder}/robots.txt
# The number of minutes to cache a page in the browser since the last request.
# The default value is 0 minutes. A value <= 0 disables all page caching which
# is the default behavior for Gitblit <= 1.3.0.
#
# SINCE 1.3.1
web.pageCacheExpires = 0
# If true, the web ui layout will respond and adapt to the browser's dimensions.
# if false, the web ui will use a 940px fixed-width layout.
# http://twitter.github.com/bootstrap/scaffolding.html#responsive
@@ -717,14 +807,26 @@ web.mountParameters = true
web.forwardSlashCharacter = /
# Show other URLs on the summary page for accessing your git repositories
# Use spaces to separate urls. {0} is the token for the repository name.
# Use spaces to separate urls.
#
# {0} is the token for the repository name
# {1} is the token for the username
#
# The username is only practical if you have setup your other git serving
# solutions accounts to have the same username as the Gitblit account.
#
# e.g.
# web.otherUrls = ssh://localhost/git/{0} git://localhost/git/{0}
# web.otherUrls = ssh://localhost/git/{0} git://localhost/git/{0} https://{1}@localhost/r/{0}
#
# SPACE-DELIMITED
# SINCE 0.5.0
web.otherUrls =
# Should app-specific clone links be displayed for SourceTree, SparkleShare, etc?
#
# SINCE 1.3.0
web.allowAppCloneLinks = true
# Choose how to present the repositories list.
# grouped = group nested/subfolder repositories together (no sorting)
# flat = flat list of repositories (sorting allowed)
@@ -767,11 +869,38 @@ web.showSearchTypeSelection = false
# SINCE 0.5.0
web.generateActivityGraph = true
# The number of days to show on the activity page.
# Value must exceed 0 else default of 14 is used
# The default number of days to show on the activity page.
# Value must exceed 0 else default of 7 is used
#
# SINCE 0.8.0
web.activityDuration = 14
web.activityDuration = 7
# Choices for days of activity to display.
#
# SPACE-DELIMITED
# SINCE 1.3.0
web.activityDurationChoices = 1 3 7 14 21 28
# The number of days of commits to cache in memory for the dashboard, activity,
# and project pages. A value of 0 will disable all caching and will parse commits
# in each repository per-request. If the value > 0 these pages will try to fulfill
# requests using the commit cache. If the request specifies a period which falls
# outside the commit cache window, then the cache will be ignored and the request
# will be fulfilled by brute-force parsing all relevant commits per-repository.
#
# Consider the values specified for *web.activityDurationChoices* when setting
# the cache size AND consider adjusting the JVM -Xmx heap parameter appropriately.
#
# SINCE 1.3.0
# RESTART REQUIRED
web.activityCacheDays = 14
# Case-insensitive list of authors to exclude from metrics. Useful for
# eliminating bots.
#
# SPACE-DELIMITED
# SINCE 1.3.0
web.metricAuthorExclusions =
# The number of commits to display on the summary page
# Value must exceed 0 else default of 20 is used
@@ -788,11 +917,23 @@ web.summaryCommitCount = 16
web.summaryRefsCount = 5
# The number of items to show on a page before showing the first, prev, next
# pagination links. A default if 50 is used for any invalid value.
# pagination links. A default of 50 is used for any invalid value.
#
# SINCE 0.5.0
web.itemsPerPage = 50
# The number of reflog changes to display on the overview page
# Value must exceed 0 else default of 5 is used
#
# SINCE 1.3.0
web.overviewReflogCount = 5
# The number of reflog changes to show on a reflog page before show the first,
# prev, next pagination links. A default of 10 is used for any invalid value.
#
# SINCE 1.3.0
web.reflogChangesPerPage = 10
# Registered file extensions to ignore during Lucene indexing
#
# SPACE-DELIMITED
@@ -803,7 +944,7 @@ web.luceneIgnoreExtensions = 7z arc arj bin bmp dll doc docx exe gif gz jar jpg
#
# SPACE-DELIMITED
# SINCE 0.5.0
web.prettyPrintExtensions = c cpp cs css frm groovy htm html java js php pl prefs properties py rb scala sh sql xml vb
web.prettyPrintExtensions = aea agc basic c cbm cl clj cpp cs css dart el erl erlang frm fs go groovy hs htm html java js latex lisp ll llvm lsp lua ml moxie mumps n nemerle pascal php pl prefs properties proto py r R rb rd Rd rkt s S scala scm sh Splus sql ss tcl tex vb vbs vhd vhdl wiki xml xq xquery yaml yml ymlapollo
# Registered extensions for markdown transformation
#
@@ -836,6 +977,16 @@ web.aggressiveHeapManagement = false
# RESTART REQUIRED
web.debugMode = false
# Force a default locale for all users, ignoring the browser's settings.
# An empty value allows Gitblit to use the translation preferred by the browser.
#
# Changing this value while the server is running will only affect new sessions.
#
# e.g. web.forceDefaultLocale = en
#
# SINCE 1.3.0
web.forceDefaultLocale =
# Enable/disable global regex substitutions (i.e. shared across repositories)
#
# SINCE 0.5.0
@@ -875,6 +1026,9 @@ mail.port = 25
# SINCE 0.6.0
mail.debug = false
# use SMTPs flag
mail.smtps = false
# if your smtp server requires authentication, supply the credentials here
#
# SINCE 0.6.0
@@ -1025,6 +1179,54 @@ federation.sets =
# Advanced Realm Settings
#
# Auto-creates user accounts based on the servlet container principal. This
# assumes that your Gitblit install is a protected resource and your container's
# authentication process intercepts all Gitblit requests.
#
# SINCE 1.3.0
realm.container.autoCreateAccounts = false
# The WindowsUserService must be backed by another user service for standard user
# and team management.
# default: users.conf
#
# RESTART REQUIRED
# BASEFOLDER
# SINCE 1.3.0
realm.windows.backingUserService = ${baseFolder}/users.conf
# Allow or prohibit Windows guest account logins
#
# SINCE 1.3.0
realm.windows.allowGuests = false
# The default domain for authentication.
#
# If specified, this domain will be used for authentication UNLESS the supplied
# login name manually specifies a domain (.e.g. mydomain\james or james@mydomain)
#
# If unspecified, the username must be specified in UPN format (name@domain).
#
# if "." (dot) is specified, ONLY the local account database will be used.
#
# SINCE 1.3.0
realm.windows.defaultDomain =
# The SalesforceUserService must be backed by another user service for standard user
# and team management.
# default: users.conf
#
# RESTART REQUIRED
# BASEFOLDER
# SINCE 1.3.0
realm.salesforce.backingUserService = ${baseFolder}/users.conf
# Restrict the Salesforce user to members of this org.
# default: 0 (i.e. do not check the Org ID)
#
# SINCE 1.3.0
realm.salesforce.orgId = 0
# URL of the LDAP server.
# To use encrypted transport, use either ldaps:// URL for SSL or ldap+tls:// to
# send StartTLS command.
@@ -1143,6 +1345,34 @@ realm.ldap.displayName = displayName
# SINCE 1.0.0
realm.ldap.email = email
# Defines the cache period to be used when caching LDAP queries. This is currently
# only used for LDAP user synchronization.
#
# Must be of the form '<long> <TimeUnit>' where <TimeUnit> is one of 'MILLISECONDS', 'SECONDS', 'MINUTES', 'HOURS', 'DAYS'
# default: 2 MINUTES
#
# RESTART REQUIRED
realm.ldap.ldapCachePeriod = 2 MINUTES
# Defines whether to synchronize all LDAP users into the backing user service
#
# Valid values: true, false
# If left blank, false is assumed
realm.ldap.synchronizeUsers.enable = false
# Defines whether to delete non-existent LDAP users from the backing user service
# during synchronization. depends on realm.ldap.synchronizeUsers.enable = true
#
# Valid values: true, false
# If left blank, true is assumed
realm.ldap.synchronizeUsers.removeDeleted = true
# Attribute on the USER record that indicate their username to be used in gitblit
# when synchronizing users from LDAP
# if blank, Gitblit will use uid
# For MS Active Directory this may be sAMAccountName
realm.ldap.uid = uid
# The RedmineUserService must be backed by another user service for standard user
# and team management.
# default: users.conf
@@ -1171,6 +1401,12 @@ server.tempFolder = ${baseFolder}/temp
# RESTART REQUIRED
server.useNio = true
# Specify the maximum number of concurrent http/https worker threads to allow.
#
# SINCE 1.3.0
# RESTART REQUIRED
server.threadPoolSize = 50
# Context path for the GO application. You might want to change the context
# path if running Gitblit behind a proxy layer such as mod_proxy.
#

distrib/groovy/.gitignore → src/main/distrib/data/groovy/.gitignore Целия файл


distrib/groovy/blockpush.groovy → src/main/distrib/data/groovy/blockpush.groovy Целия файл


distrib/groovy/fogbugz.groovy → src/main/distrib/data/groovy/fogbugz.groovy Целия файл


distrib/groovy/jenkins.groovy → src/main/distrib/data/groovy/jenkins.groovy Целия файл


distrib/groovy/localclone.groovy → src/main/distrib/data/groovy/localclone.groovy Целия файл


distrib/groovy/protect-refs.groovy → src/main/distrib/data/groovy/protect-refs.groovy Целия файл


distrib/groovy/sendmail-html.groovy → src/main/distrib/data/groovy/sendmail-html.groovy Целия файл

@@ -115,7 +115,7 @@ if (mailinglist != null) {
}
// add all mailing lists defined in gitblit.properties or web.xml
toAddresses.addAll(GitBlit.getStrings(Keys.mail.mailingLists))
toAddresses.addAll(gitblit.getStrings(Keys.mail.mailingLists))
// add all team mailing lists
def teams = gitblit.getRepositoryTeams(repository)

distrib/groovy/sendmail.groovy → src/main/distrib/data/groovy/sendmail.groovy Целия файл


distrib/groovy/thebuggenie.groovy → src/main/distrib/data/groovy/thebuggenie.groovy Целия файл


distrib/projects.conf → src/main/distrib/data/projects.conf Целия файл


distrib/users.conf → src/main/distrib/data/users.conf Целия файл


distrib/federation.properties → src/main/distrib/federation.properties Целия файл

@@ -8,7 +8,7 @@
#
# SINCE 0.5.0
# RESTART REQUIRED
git.repositoriesFolder = git
git.repositoriesFolder = ${baseFolder}/git
# Search the repositories folder subfolders for other repositories.
# Repositories MAY NOT be nested (i.e. one repository within another)

+ 21
- 0
src/main/distrib/linux/add-indexed-branch.sh Целия файл

@@ -0,0 +1,21 @@
#!/bin/bash
# --------------------------------------------------------------------------
# This is for Lucene search integration.
#
# Allows you to add an indexed branch specification to the repository config
# for all matching repositories in the specified folder.
#
# All repositories are included unless excluded using a --skip parameter.
# --skip supports simple wildcard fuzzy matching however only 1 asterisk is
# allowed per parameter.
#
# Always use forward-slashes for the path separator in your parameters!!
#
# Set FOLDER to the server's git.repositoriesFolder
# Set BRANCH ("default" or fully qualified ref - i.e. refs/heads/master)
# Set EXCLUSIONS for any repositories that you do not want to change
# --------------------------------------------------------------------------
SET FOLDER=git
SET EXCLUSIONS=--skip test.git --skip group/test*
SET BRANCH=default
java -cp gitblit.jar;"%CD%\ext\*" com.gitblit.AddIndexedBranch --repositoriesFolder %FOLDER% --branch %BRANCH% %EXCLUSIONS%

+ 2
- 0
src/main/distrib/linux/authority.sh Целия файл

@@ -0,0 +1,2 @@
#!/bin/bash
java -cp gitblit.jar com.gitblit.authority.Launcher --baseFolder data

+ 2
- 0
src/main/distrib/linux/gitblit-stop.sh Целия файл

@@ -0,0 +1,2 @@
#!/bin/bash
java -jar gitblit.jar --baseFolder data --stop

+ 2
- 0
src/main/distrib/linux/gitblit.sh Целия файл

@@ -0,0 +1,2 @@
#!/bin/bash
java -jar gitblit.jar --baseFolder data

+ 3
- 0
src/main/distrib/linux/install-service-centos.sh Целия файл

@@ -0,0 +1,3 @@
#!/bin/bash
sudo cp service-centos.sh /etc/init.d/gitblit
sudo chkconfig --add gitblit

+ 3
- 0
src/main/distrib/linux/install-service-ubuntu.sh Целия файл

@@ -0,0 +1,3 @@
#!/bin/bash
sudo cp service-ubuntu.sh /etc/init.d/gitblit
sudo update-rc.d gitblit defaults

distrib/java-proxy-config.sh → src/main/distrib/linux/java-proxy-config.sh Целия файл


distrib/gitblit-centos → src/main/distrib/linux/service-centos.sh Целия файл


distrib/gitblit-ubuntu → src/main/distrib/linux/service-ubuntu.sh Целия файл


distrib/add-indexed-branch.cmd → src/main/distrib/win/add-indexed-branch.cmd Целия файл

@@ -17,4 +17,4 @@
@SET FOLDER=c:/gitblit/git
@SET EXCLUSIONS=--skip test.git --skip group/test*
@SET BRANCH=default
@java -cp gitblit.jar;"%CD%\ext\*" com.gitblit.AddIndexedBranch --repositoriesFolder %FOLDER% --branch %BRANCH% %EXCLUSIONS%
@java -cp gitblit.jar;"%CD%\ext\*" com.gitblit.AddIndexedBranch --repositoriesFolder %FOLDER% --branch %BRANCH% %EXCLUSIONS% %*

distrib/amd64/gitblit.exe → src/main/distrib/win/amd64/gitblit.exe Целия файл


+ 1
- 0
src/main/distrib/win/authority.cmd Целия файл

@@ -0,0 +1 @@
@java -cp gitblit.jar com.gitblit.authority.Launcher --baseFolder data %*

+ 1
- 0
src/main/distrib/win/gitblit-stop.cmd Целия файл

@@ -0,0 +1 @@
@java -jar gitblit.jar --stop --baseFolder data %*

+ 1
- 0
src/main/distrib/win/gitblit.cmd Целия файл

@@ -0,0 +1 @@
@java -jar gitblit.jar --baseFolder data %*

distrib/gitblitw.exe → src/main/distrib/win/gitblitw.exe Целия файл


distrib/ia64/gitblit.exe → src/main/distrib/win/ia64/gitblit.exe Целия файл


distrib/installService.cmd → src/main/distrib/win/installService.cmd Целия файл

@@ -23,12 +23,12 @@ SET ARCH=amd64
--StdOutput=auto ^
--StdError=auto ^
--StartPath="%CD%" ^
--StartClass=com.gitblit.Launcher ^
--StartClass=org.moxie.MxLauncher ^
--StartMethod=main ^
--StartParams="--storePassword;gitblit;--baseFolder;%CD%\data" ^
--StartMode=jvm ^
--StopPath="%CD%" ^
--StopClass=com.gitblit.Launcher ^
--StopClass=org.moxie.MxLauncher ^
--StopMethod=main ^
--StopParams="--stop;--baseFolder;%CD%\data" ^
--StopMode=jvm ^

distrib/uninstallService.cmd → src/main/distrib/win/uninstallService.cmd Целия файл


distrib/x86/gitblit.exe → src/main/distrib/win/x86/gitblit.exe Целия файл


+ 1
- 0
src/main/java/.gitignore Целия файл

@@ -0,0 +1 @@
/clientapps.json

src/WEB-INF/web.xml → src/main/java/WEB-INF/web.xml Целия файл

@@ -26,6 +26,11 @@
<param-name>baseFolder</param-name>
<param-value>${contextFolder}/WEB-INF/data</param-value>
</context-param>
<!-- Gitblit Displayname -->
<display-name>
Gitblit - @gb.version@
</display-name>
<!-- PARAMS -->
@@ -42,13 +47,27 @@
* Wicket Filter ignorePaths parameter -->
<servlet>
<servlet-name>GitServlet</servlet-name>
<servlet-class>com.gitblit.GitServlet</servlet-class>
<servlet-class>com.gitblit.git.GitServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>GitServlet</servlet-name>
<url-pattern>/git/*</url-pattern>
</servlet-mapping>
<!-- SparkleShare Invite Servlet
<url-pattern> MUST match:
* com.gitblit.Constants.SPARKLESHARE_INVITE_PATH
* Wicket Filter ignorePaths parameter -->
<servlet>
<servlet-name>SparkleShareInviteServlet</servlet-name>
<servlet-class>com.gitblit.SparkleShareInviteServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>SparkleShareInviteServlet</servlet-name>
<url-pattern>/sparkleshare/*</url-pattern>
</servlet-mapping>
<!-- Syndication Servlet
<url-pattern> MUST match:
@@ -121,7 +140,20 @@
<servlet-name>PagesServlet</servlet-name>
<url-pattern>/pages/*</url-pattern>
</servlet-mapping>
<!-- Logo Servlet
<url-pattern> MUST match:
* Wicket Filter ignorePaths parameter -->
<servlet>
<servlet-name>LogoServlet</servlet-name>
<servlet-class>com.gitblit.LogoServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>LogoServlet</servlet-name>
<url-pattern>/logo.png</url-pattern>
</servlet-mapping>
<!-- Robots.txt Servlet
<url-pattern> MUST match:
@@ -209,13 +241,22 @@
<filter-name>PagesFilter</filter-name>
<url-pattern>/pages/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>EnforceAuthenticationFilter</filter-name>
<filter-class>com.gitblit.EnforceAuthenticationFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>EnforceAuthenticationFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Wicket Filter -->
<filter>
<filter-name>wicketFilter</filter-name>
<filter-class>
org.apache.wicket.protocol.http.WicketFilter
com.gitblit.wicket.GitblitWicketFilter
</filter-class>
<init-param>
<param-name>applicationClassName</param-name>
@@ -230,6 +271,8 @@
* GitFilter <url-pattern>
* GitServlet <url-pattern>
* com.gitblit.Constants.GIT_PATH
* SparkleshareInviteServlet <url-pattern>
* com.gitblit.Constants.SPARKLESHARE_INVITE_PATH
* Zipfilter <url-pattern>
* ZipServlet <url-pattern>
* com.gitblit.Constants.ZIP_PATH
@@ -239,7 +282,7 @@
* PagesFilter <url-pattern>
* PagesServlet <url-pattern>
* com.gitblit.Constants.PAGES_PATH -->
<param-value>git/,feed/,zip/,federation/,rpc/,pages/,robots.txt</param-value>
<param-value>git/,feed/,zip/,federation/,rpc/,pages/,robots.txt,logo.png,sparkleshare/</param-value>
</init-param>
</filter>
<filter-mapping>

+ 9
- 0
src/main/java/WEB-INF/weblogic.xml Целия файл

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
<wls:weblogic-version>12.1.1</wls:weblogic-version>
<wls:context-root>gitblit</wls:context-root>
<wls:container-descriptor>
<wls:show-archived-real-path-enabled>true</wls:show-archived-real-path-enabled>
<wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
</wls:container-descriptor>
</wls:weblogic-web-app>

src/com/gitblit/.gitignore → src/main/java/com/gitblit/.gitignore Целия файл


src/com/gitblit/AccessRestrictionFilter.java → src/main/java/com/gitblit/AccessRestrictionFilter.java Целия файл


src/com/gitblit/AddIndexedBranch.java → src/main/java/com/gitblit/AddIndexedBranch.java Целия файл

@@ -23,15 +23,17 @@ import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.RepositoryCache.FileKey;
import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.storage.file.FileRepository;
import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
import org.eclipse.jgit.util.FS;
import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.ParameterException;
import com.beust.jcommander.Parameters;
import com.gitblit.models.RefModel;
import com.gitblit.utils.ArrayUtils;
import com.gitblit.utils.JGitUtils;
import com.gitblit.utils.StringUtils;
@@ -82,16 +84,29 @@ public class AddIndexedBranch {
continue;
}
System.out.println(MessageFormat.format("adding [gitblit] indexBranch={0} for {1}", params.branch, repo));
try {
// load repository config
File gitDir = FileKey.resolve(new File(folder, repo), FS.DETECTED);
FileRepository repository = new FileRepository(gitDir);
FileBasedConfig config = repository.getConfig();
Repository repository = new FileRepositoryBuilder().setGitDir(gitDir).build();
StoredConfig config = repository.getConfig();
config.load();
Set<String> indexedBranches = new LinkedHashSet<String>();
indexedBranches.add(Constants.DEFAULT_BRANCH);
// add all local branches to index
if(params.addAllLocalBranches) {
List<RefModel> list = JGitUtils.getLocalBranches(repository, true, -1);
for (RefModel refModel : list) {
System.out.println(MessageFormat.format("adding [gitblit] indexBranch={0} for {1}", refModel.getName(), repo));
indexedBranches.add(refModel.getName());
}
}
else {
// add only one branch to index ('default' if not specified)
System.out.println(MessageFormat.format("adding [gitblit] indexBranch={0} for {1}", params.branch, repo));
indexedBranches.add(params.branch);
}
String [] branches = config.getStringList("gitblit", null, "indexBranch");
if (!ArrayUtils.isEmpty(branches)) {
@@ -122,10 +137,13 @@ public class AddIndexedBranch {
@Parameter(names = { "--repositoriesFolder" }, description = "The root repositories folder ", required = true)
public String folder;
@Parameter(names = { "--branch" }, description = "The branch to index", required = true)
@Parameter(names = { "--branch" }, description = "The branch to index", required = false)
public String branch = "default";
@Parameter(names = { "--skip" }, description = "Skip the named repository (simple fizzy matching is supported)", required = false)
public List<String> exclusions = new ArrayList<String>();
@Parameter(names = { "--all-local-branches" }, description = "Add all local branches to index. If specified, the --branch parameter is not considered.", required = false)
public boolean addAllLocalBranches = false;
}
}

src/com/gitblit/AuthenticationFilter.java → src/main/java/com/gitblit/AuthenticationFilter.java Целия файл


Някои файлове не бяха показани, защото твърде много файлове са промени

Loading…
Отказ
Запис