mirror of
				https://github.com/gitbucket/gitbucket.git
				synced 2025-10-31 02:25:59 +01:00 
			
		
		
		
	Compare commits
	
		
			3 Commits
		
	
	
		
			optimize-c
			...
			4.14.1
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 47ec2d4712 | ||
|  | 31160f42cb | ||
|  | 4f11cbaa77 | 
| @@ -71,11 +71,13 @@ Support | |||||||
|  |  | ||||||
| Release Notes | 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 | - Support priority in issues and pull requests | ||||||
| - Show icons when the sidebar is collapsed | - 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 | - Support account (user / group) level web hook | ||||||
| - Add `--max_file_size` option | - Add `--max_file_size` option | ||||||
| - Configuration by system property or environment variable | - Configuration by system property or environment variable | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| val Organization = "io.github.gitbucket" | val Organization = "io.github.gitbucket" | ||||||
| val Name = "gitbucket" | val Name = "gitbucket" | ||||||
| val GitBucketVersion = "4.14.0" | val GitBucketVersion = "4.14.1" | ||||||
| val ScalatraVersion = "2.5.0" | val ScalatraVersion = "2.5.0" | ||||||
| val JettyVersion = "9.3.19.v20170502" | val JettyVersion = "9.3.19.v20170502" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -38,5 +38,6 @@ object GitBucketCoreModule extends Module("gitbucket-core", | |||||||
|   new Version("4.14.0", |   new Version("4.14.0", | ||||||
|     new LiquibaseMigration("update/gitbucket-core_4.14.xml"), |     new LiquibaseMigration("update/gitbucket-core_4.14.xml"), | ||||||
|     new SqlMigration("update/gitbucket-core_4.14.sql") |     new SqlMigration("update/gitbucket-core_4.14.sql") | ||||||
|   ) |   ), | ||||||
|  |   new Version("4.14.1") | ||||||
| ) | ) | ||||||
|   | |||||||
| @@ -594,22 +594,23 @@ trait AccountControllerBase extends AccountManagementControllerBase { | |||||||
|  |  | ||||||
|           // Insert default labels |           // Insert default labels | ||||||
|           insertDefaultLabels(accountName, repository.name) |           insertDefaultLabels(accountName, repository.name) | ||||||
|  |           // Insert default priorities | ||||||
|  |           insertDefaultPriorities(accountName, repository.name) | ||||||
|  |  | ||||||
|           // clone repository actually |           // clone repository actually | ||||||
|           JGitUtil.cloneRepository( |           JGitUtil.cloneRepository( | ||||||
|             getRepositoryDir(repository.owner, repository.name), |             getRepositoryDir(repository.owner, repository.name), | ||||||
|             getRepositoryDir(accountName, repository.name)) |             FileUtil.deleteIfExists(getRepositoryDir(accountName, repository.name))) | ||||||
|  |  | ||||||
|           // Create Wiki repository |           // Create Wiki repository | ||||||
|           JGitUtil.cloneRepository( |           JGitUtil.cloneRepository(getWikiRepositoryDir(repository.owner, repository.name), | ||||||
|             getWikiRepositoryDir(repository.owner, repository.name), |             FileUtil.deleteIfExists(getWikiRepositoryDir(accountName, repository.name))) | ||||||
|             getWikiRepositoryDir(accountName, repository.name)) |  | ||||||
|  |  | ||||||
|           // Copy files |           // Copy LFS files | ||||||
|           FileUtils.copyDirectory( |           val lfsDir = getLfsDir(repository.owner, repository.name) | ||||||
|             Directory.getRepositoryFilesDir(repository.owner, repository.name), |           if(lfsDir.exists){ | ||||||
|             Directory.getRepositoryFilesDir(accountName, repository.name) |             FileUtils.copyDirectory(lfsDir, FileUtil.deleteIfExists(getLfsDir(accountName, repository.name))) | ||||||
|           ) |           } | ||||||
|  |  | ||||||
|           // Record activity |           // Record activity | ||||||
|           recordForkActivity(repository.owner, repository.name, loginUserName, accountName) |           recordForkActivity(repository.owner, repository.name, loginUserName, accountName) | ||||||
|   | |||||||
| @@ -68,9 +68,24 @@ object FileUtil { | |||||||
|  |  | ||||||
|   def readableSize(size: Long): String = FileUtils.byteCountToDisplaySize(size) |   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 = { |   def deleteDirectoryIfEmpty(dir: File): Unit = { | ||||||
|     if(dir.isDirectory() && dir.list().isEmpty) { |     if(dir.isDirectory() && dir.list().isEmpty) { | ||||||
|       FileUtils.deleteDirectory(dir) |       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