comparison test/org/tmatesoft/hg/test/TestRevlog.java @ 628:6526d8adbc0f

Explicit HgRuntimeException to facilitate easy switch from runtime to checked exceptions
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 22 May 2013 15:52:31 +0200
parents 73c20c648c1f
children 7839ff0bfd78
comparison
equal deleted inserted replaced
627:5153eb73b18d 628:6526d8adbc0f
31 import org.tmatesoft.hg.internal.RevlogDump.RevlogReader; 31 import org.tmatesoft.hg.internal.RevlogDump.RevlogReader;
32 import org.tmatesoft.hg.repo.HgLookup; 32 import org.tmatesoft.hg.repo.HgLookup;
33 import org.tmatesoft.hg.repo.HgManifest; 33 import org.tmatesoft.hg.repo.HgManifest;
34 import org.tmatesoft.hg.repo.HgManifest.Flags; 34 import org.tmatesoft.hg.repo.HgManifest.Flags;
35 import org.tmatesoft.hg.repo.HgRepository; 35 import org.tmatesoft.hg.repo.HgRepository;
36 import org.tmatesoft.hg.repo.HgRuntimeException;
36 import org.tmatesoft.hg.util.Path; 37 import org.tmatesoft.hg.util.Path;
37 38
38 /** 39 /**
39 * Not a real JUnit test now 40 * Not a real JUnit test now
40 * 41 *
185 Patch patch1 = new Patch(); 186 Patch patch1 = new Patch();
186 patch1.read(new ByteArrayDataAccess(patchData.array(), patchData.arrayOffset(), patchData.remaining())); 187 patch1.read(new ByteArrayDataAccess(patchData.array(), patchData.arrayOffset(), patchData.remaining()));
187 return patch1; 188 return patch1;
188 } 189 }
189 190
190 private byte[] getRevisionTrueContent(File repoLoc, final int manifestRev, int clogRev) throws HgRepositoryNotFoundException { 191 private byte[] getRevisionTrueContent(File repoLoc, final int manifestRev, int clogRev) throws HgRepositoryNotFoundException, IllegalArgumentException, HgRuntimeException {
191 HgRepository hgRepo = new HgLookup().detect(repoLoc); 192 HgRepository hgRepo = new HgLookup().detect(repoLoc);
192 final ByteArrayOutputStream out = new ByteArrayOutputStream(1024 * 1000); 193 final ByteArrayOutputStream out = new ByteArrayOutputStream(1024 * 1000);
193 hgRepo.getManifest().walk(clogRev, clogRev, new HgManifest.Inspector() { 194 hgRepo.getManifest().walk(clogRev, clogRev, new HgManifest.Inspector() {
194 195
195 public boolean next(Nodeid nid, Path fname, Flags flags) { 196 public boolean next(Nodeid nid, Path fname, Flags flags) {