mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-10-29 17:46:27 +01:00
Compare commits
3 Commits
optimize-c
...
4.14.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
47ec2d4712 | ||
|
|
31160f42cb | ||
|
|
4f11cbaa77 |
@@ -71,11 +71,13 @@ Support
|
||||
|
||||
Release Notes
|
||||
-------------
|
||||
### 4.14 - 1 Jul 2017
|
||||
### 4.14.1 - 4 Jul 2017
|
||||
- Bug fix: Possibility of error in forking repository
|
||||
|
||||
### 4.14 - 1 Jul 2017
|
||||
- Support priority in issues and pull requests
|
||||
- Show icons when the sidebar is collapsed
|
||||
- Support gollumn events in web hook
|
||||
- Support gollum events in web hook
|
||||
- Support account (user / group) level web hook
|
||||
- Add `--max_file_size` option
|
||||
- Configuration by system property or environment variable
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
val Organization = "io.github.gitbucket"
|
||||
val Name = "gitbucket"
|
||||
val GitBucketVersion = "4.14.0"
|
||||
val GitBucketVersion = "4.14.1"
|
||||
val ScalatraVersion = "2.5.0"
|
||||
val JettyVersion = "9.3.19.v20170502"
|
||||
|
||||
|
||||
@@ -38,5 +38,6 @@ object GitBucketCoreModule extends Module("gitbucket-core",
|
||||
new Version("4.14.0",
|
||||
new LiquibaseMigration("update/gitbucket-core_4.14.xml"),
|
||||
new SqlMigration("update/gitbucket-core_4.14.sql")
|
||||
)
|
||||
),
|
||||
new Version("4.14.1")
|
||||
)
|
||||
|
||||
@@ -594,22 +594,23 @@ trait AccountControllerBase extends AccountManagementControllerBase {
|
||||
|
||||
// Insert default labels
|
||||
insertDefaultLabels(accountName, repository.name)
|
||||
// Insert default priorities
|
||||
insertDefaultPriorities(accountName, repository.name)
|
||||
|
||||
// clone repository actually
|
||||
JGitUtil.cloneRepository(
|
||||
getRepositoryDir(repository.owner, repository.name),
|
||||
getRepositoryDir(accountName, repository.name))
|
||||
FileUtil.deleteIfExists(getRepositoryDir(accountName, repository.name)))
|
||||
|
||||
// Create Wiki repository
|
||||
JGitUtil.cloneRepository(
|
||||
getWikiRepositoryDir(repository.owner, repository.name),
|
||||
getWikiRepositoryDir(accountName, repository.name))
|
||||
JGitUtil.cloneRepository(getWikiRepositoryDir(repository.owner, repository.name),
|
||||
FileUtil.deleteIfExists(getWikiRepositoryDir(accountName, repository.name)))
|
||||
|
||||
// Copy files
|
||||
FileUtils.copyDirectory(
|
||||
Directory.getRepositoryFilesDir(repository.owner, repository.name),
|
||||
Directory.getRepositoryFilesDir(accountName, repository.name)
|
||||
)
|
||||
// Copy LFS files
|
||||
val lfsDir = getLfsDir(repository.owner, repository.name)
|
||||
if(lfsDir.exists){
|
||||
FileUtils.copyDirectory(lfsDir, FileUtil.deleteIfExists(getLfsDir(accountName, repository.name)))
|
||||
}
|
||||
|
||||
// Record activity
|
||||
recordForkActivity(repository.owner, repository.name, loginUserName, accountName)
|
||||
|
||||
@@ -68,9 +68,24 @@ object FileUtil {
|
||||
|
||||
def readableSize(size: Long): String = FileUtils.byteCountToDisplaySize(size)
|
||||
|
||||
/**
|
||||
* Delete the given directory if it's empty.
|
||||
* Do nothing if the given File is not a directory or not empty.
|
||||
*/
|
||||
def deleteDirectoryIfEmpty(dir: File): Unit = {
|
||||
if(dir.isDirectory() && dir.list().isEmpty) {
|
||||
FileUtils.deleteDirectory(dir)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete file or directory forcibly.
|
||||
*/
|
||||
def deleteIfExists(file: java.io.File): java.io.File = {
|
||||
if(file.exists){
|
||||
FileUtils.forceDelete(file)
|
||||
}
|
||||
file
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user