diff test/org/tmatesoft/hg/test/RepoUtils.java @ 653:629a7370554c

Tests for recent changes in HgParentChildMap and RepositoryComparator (outgoing to respect drafts and Issue 47)
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 03 Jul 2013 14:38:30 +0200
parents 4a0bab2c6da1
children 12a4f60ea972
line wrap: on
line diff
--- a/test/org/tmatesoft/hg/test/RepoUtils.java	Tue Jul 02 23:21:16 2013 +0200
+++ b/test/org/tmatesoft/hg/test/RepoUtils.java	Wed Jul 03 14:38:30 2013 +0200
@@ -34,6 +34,7 @@
 
 import org.tmatesoft.hg.core.HgException;
 import org.tmatesoft.hg.core.HgInitCommand;
+import org.tmatesoft.hg.core.Nodeid;
 import org.tmatesoft.hg.internal.FileUtils;
 import org.tmatesoft.hg.internal.StreamLogFacility;
 import org.tmatesoft.hg.repo.HgRepository;
@@ -190,4 +191,12 @@
 		}
 		dest.delete();
 	}
+
+	static Nodeid[] allRevisions(HgRepository repo) {
+		Nodeid[] allRevs = new Nodeid[repo.getChangelog().getRevisionCount()];
+		for (int i = 0; i < allRevs.length; i++) {
+			allRevs[i] = repo.getChangelog().getRevision(i);
+		}
+		return allRevs;
+	}
 }