Mercurial > hg4j
diff test/org/tmatesoft/hg/test/MapTagsToFileRevisions.java @ 354:5f9073eabf06
Propagate errors with exceptions up to a end client
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 01 Dec 2011 05:21:40 +0100 |
parents | 694ebabb5cb3 |
children | 189dc6dc1c3e |
line wrap: on
line diff
--- a/test/org/tmatesoft/hg/test/MapTagsToFileRevisions.java Thu Dec 01 03:05:28 2011 +0100 +++ b/test/org/tmatesoft/hg/test/MapTagsToFileRevisions.java Thu Dec 01 05:21:40 2011 +0100 @@ -122,7 +122,11 @@ fileNode.walk(0, TIP, new HgDataFile.RevisionInspector() { public void next(int localRevision, Nodeid revision, int linkedRevision) { - changesetToNodeid_3.put(clog.getRevision(linkedRevision), revision); + try { + changesetToNodeid_3.put(clog.getRevision(linkedRevision), revision); + } catch (HgException ex) { + ex.printStackTrace(); + } } }); final long end_3 = System.nanoTime(); @@ -259,7 +263,7 @@ // Approach 1. Build map with all files, their revisions and corresponding tags // - private void collectTagsPerFile_Approach_1(final HgChangelog.RevisionMap clogrmap, final int[] tagLocalRevs, final TagInfo[] allTags, Path targetPath) { + private void collectTagsPerFile_Approach_1(final HgChangelog.RevisionMap clogrmap, final int[] tagLocalRevs, final TagInfo[] allTags, Path targetPath) throws HgException { HgRepository repository = clogrmap.getRepo(); final long start = System.currentTimeMillis(); // file2rev2tag value is array of revisions, always of allTags.length. Revision index in the array