From 7b7c0e1eee2f8cc00081af903921576b090a4664 Mon Sep 17 00:00:00 2001 From: Tomofumi Tanaka Date: Fri, 11 Apr 2014 01:28:43 +0900 Subject: [PATCH 1/2] Fix getAllcommitIds bug in empty repository --- src/main/scala/util/JGitUtil.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/scala/util/JGitUtil.scala b/src/main/scala/util/JGitUtil.scala index 4d89a3ec5..b15a10a4d 100644 --- a/src/main/scala/util/JGitUtil.scala +++ b/src/main/scala/util/JGitUtil.scala @@ -573,7 +573,9 @@ object JGitUtil { /** * Returns all commit id in the specified repository. */ - def getAllCommitIds(git: Git): Seq[String] = { + def getAllCommitIds(git: Git): Seq[String] = if(isEmpty(git)) { + Nil + } else { val existIds = new scala.collection.mutable.ListBuffer[String]() val i = git.log.all.call.iterator while(i.hasNext){ From d7eef8bd257327f157646efcdb36fcf32f7a6c05 Mon Sep 17 00:00:00 2001 From: takezoe Date: Fri, 11 Apr 2014 07:40:07 +0900 Subject: [PATCH 2/2] (refs #343)Add drop COMMIT_LOG table statement in migration for 1.13 --- src/main/resources/update/1_13.sql | 1 + src/main/scala/servlet/AutoUpdateListener.scala | 1 + 2 files changed, 2 insertions(+) create mode 100644 src/main/resources/update/1_13.sql diff --git a/src/main/resources/update/1_13.sql b/src/main/resources/update/1_13.sql new file mode 100644 index 000000000..ed26f65ac --- /dev/null +++ b/src/main/resources/update/1_13.sql @@ -0,0 +1 @@ +DROP TABLE COMMIT_LOG; \ No newline at end of file diff --git a/src/main/scala/servlet/AutoUpdateListener.scala b/src/main/scala/servlet/AutoUpdateListener.scala index 8cafb6059..9ffed838e 100644 --- a/src/main/scala/servlet/AutoUpdateListener.scala +++ b/src/main/scala/servlet/AutoUpdateListener.scala @@ -50,6 +50,7 @@ object AutoUpdate { * The history of versions. A head of this sequence is the current BitBucket version. */ val versions = Seq( + Version(1, 13), Version(1, 12), Version(1, 11), Version(1, 10),