diff src/org/tmatesoft/hg/repo/HgBranches.java @ 366:189dc6dc1c3e

Use exceptions to expose errors reading mercurial data
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 16 Dec 2011 04:43:18 +0100
parents 5f9073eabf06
children 2fadf8695f8a
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgBranches.java	Sun Dec 11 00:39:07 2011 +0100
+++ b/src/org/tmatesoft/hg/repo/HgBranches.java	Fri Dec 16 04:43:18 2011 +0100
@@ -125,7 +125,7 @@
 		return -1; // deliberately not lastInCache, to avoid anything but -1 when 1st line was read and there's error is in lines 2..end
 	}
 
-	void collect(final ProgressSupport ps) {
+	void collect(final ProgressSupport ps) throws HgInvalidControlFileException {
 		branches.clear();
 		ps.start(1 + repo.getChangelog().getRevisionCount() * 2);
 		//
@@ -299,7 +299,7 @@
 			this(branchName, Nodeid.NULL, branchHeads);
 		}
 		
-		void validate(HgChangelog clog, HgChangelog.RevisionMap rmap) {
+		void validate(HgChangelog clog, HgChangelog.RevisionMap rmap) throws HgInvalidControlFileException {
 			int[] localCset = new int[heads.size()];
 			int i = 0;
 			for (Nodeid h : heads) {