Merge branch 'master'

Conflicts:
	src/main/scala/gitbucket/core/servlet/AutoUpdate.scala
This commit is contained in:
Naoki Takezoe
2016-01-24 18:40:25 +09:00
8 changed files with 24 additions and 13 deletions

View File

@@ -63,7 +63,7 @@ Release Notes
### 3.10 - 30 Dec 2015
- Move to Bootstrap3
- New URL for raw contents (`raw/master/doc/activity.md` instead of `blob/master/doc/activity.md?raw=true`)
- Update xsbt-web-pligin
- Update xsbt-web-plugin
- Update H2 database
### 3.9 - 5 Dec 2015

View File

@@ -8,7 +8,7 @@ To release a new version of GitBucket, add the version definition to the [gitbuc
object AutoUpdate {
...
/**
* The history of versions. A head of this sequence is the current BitBucket version.
* The history of versions. A head of this sequence is the current GitBucket version.
*/
val versions = Seq(
Version(1, 0)
@@ -20,7 +20,7 @@ Next, add a SQL file which updates database schema into [/src/main/resources/upd
GitBucket stores the current version to ```GITBUCKET_HOME/version``` and checks it at start-up. If the stored version differs from the actual version, it executes differences of SQL files between the stored version and the actual version. And ```GITBUCKET_HOME/version``` is updated by the actual version.
We can also add any Scala code for upgrade GitBucket which modifies esources other than database. Override ```Version.update``` like below:
We can also add any Scala code for upgrade GitBucket which modifies resources other than database. Override ```Version.update``` like below:
```scala
val versions = Seq(

View File

@@ -8,10 +8,10 @@ This directory has following structure:
* /HOME/gitbucket
* /repositories
* /USER_NAME
* / REPO_NAME.git (substance of repository. GitServlet sees this directory)
* / REPO_NAME
* /REPO_NAME.git (substance of repository. GitServlet sees this directory)
* /REPO_NAME
* /issues (files which are attached to issue)
* / REPO_NAME.wiki.git (wiki repository)
* /REPO_NAME.wiki.git (wiki repository)
* /data
* /USER_NAME
* /files

View File

@@ -23,7 +23,7 @@ object MyBuild extends Build {
object AutoUpdate {
/**
* The history of versions. A head of this sequence is the current BitBucket version.
* The history of versions. A head of this sequence is the current GitBucket version.
*/
val versions = Seq(
new Version(3, 3), // <---- add this line!!

View File

@@ -30,6 +30,10 @@ abstract class ControllerBase extends ScalatraFilter
implicit val jsonFormats = gitbucket.core.api.JsonFormat.jsonFormats
before("/api/v3/*") {
contentType = formats("json")
}
// TODO Scala 2.11
// // Don't set content type via Accept header.
// override def format(implicit request: HttpServletRequest) = ""

View File

@@ -634,7 +634,7 @@ trait RepositoryViewerControllerBase extends ControllerBase {
val parentPath = if (path == ".") Nil else path.split("/").toList
// process README.md or README.markdown
val readme = files.find { file =>
readmeFiles.contains(file.name.toLowerCase)
!file.isDirectory && readmeFiles.contains(file.name.toLowerCase)
}.map { file =>
val path = (file.name :: parentPath.reverse).reverse
path -> StringUtil.convertFromByteArray(JGitUtil.getContentFromId(

View File

@@ -48,7 +48,7 @@
}
@if(userRepositories.size > max){
<li class="list-group-item show-more">
<a href="javascript:void(0);" id="show-more-repos">Show more @{userRepositories.size - max} pages...</a>
<a href="javascript:void(0);" id="show-more-repos">Show @{userRepositories.size - max} more repositories...</a>
</li>
}
}
@@ -62,12 +62,19 @@
@if(recentRepositories.isEmpty){
<li class="list-group-item">No repositories</li>
} else {
@recentRepositories.map { repository =>
<li class="list-group-item repo-link">
@defining(20){ max =>
@recentRepositories.zipWithIndex.map { case (repository, i) =>
<li class="list-group-item repo-link" style="@if(i > max - 1){display:none;}">
@helper.html.repositoryicon(repository, false)
<a href="@url(repository)">@repository.owner/<span class="strong">@repository.name</span></a>
</li>
}
@if(recentRepositories.size > max){
<li class="list-group-item show-more">
<a href="javascript:void(0);" id="show-more-recent-repos">Show @{recentRepositories.size - max} more repositories...</a>
</li>
}
}
}
</ul>
</div>
@@ -77,7 +84,7 @@
}
<script>
$(function(){
$('#show-more-repos').click(function(e){
$('#show-more-repos, #show-more-recent-repos').click(function(e){
$(e.target).parents('ul.list-group').find('li.repo-link').show();
$(e.target).parents('li.show-more').remove();
});

View File

@@ -28,7 +28,7 @@
<td style="padding: 20px; background-color: #eee; text-align: center;">
No labels to show.
@if(hasWritePermission){
<a href="@url(repository)/issues/labels/new">Create a new label.</a>
Click on the "New Label" button above to create one.
}
</td>
</tr>