[PATCH JGit 08/19] changed signature to allow a IOException

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: mike.gaffney <mike.gaffney@xxxxxxxxxxxxxx>

---
 .../jgit/lib/AlternateRepositoryDatabase.java      |    2 +-
 .../src/org/spearce/jgit/lib/ObjectDatabase.java   |    3 ++-
 .../src/org/spearce/jgit/lib/ObjectDirectory.java  |    4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/AlternateRepositoryDatabase.java b/org.spearce.jgit/src/org/spearce/jgit/lib/AlternateRepositoryDatabase.java
index 5cb0579..70ce505 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/AlternateRepositoryDatabase.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/AlternateRepositoryDatabase.java
@@ -132,7 +132,7 @@ protected void closeAlternates(final ObjectDatabase[] alt) {
 	}
 
 	@Override
-	public void updateInfoCache() {
+	public void updateInfoCache() throws IOException {
 		odb.updateInfoCache();
 	}
 }
diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDatabase.java b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDatabase.java
index 68ff523..5ded7bb 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDatabase.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDatabase.java
@@ -78,8 +78,9 @@ protected ObjectDatabase() {
 	 * Creates the caches that are typically done by 
 	 * update-server-info, namely objects/info/packs and 
 	 * info/refs
+	 * @throws IOException 
 	 */
-	public abstract void updateInfoCache();
+	public abstract void updateInfoCache() throws IOException;
 	
 	/**
 	 * Does this database exist yet?
diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDirectory.java b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDirectory.java
index a90ae00..95618b9 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDirectory.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectDirectory.java
@@ -516,7 +516,7 @@ boolean tryAgain(final long currLastModified) {
 	}
 
 	@Override
-	public void updateInfoCache() {
-		new UpdateDirectoryInfoCache(this.listLocalPacks(), this.infoDirectory).execute();
+	public void updateInfoCache() throws IOException {
+		new UpdateDirectoryInfoCache(this.listLocalPacks(), new File(this.infoDirectory, "packs")).execute();
 	}
 }
-- 
1.6.4.2

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]