comparison src/org/tmatesoft/hg/repo/HgManifest.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 d42a45a2c9d6
children 189dc6dc1c3e
comparison
equal deleted inserted replaced
353:0f3687e79f5a 354:5f9073eabf06
24 import java.util.Arrays; 24 import java.util.Arrays;
25 import java.util.HashMap; 25 import java.util.HashMap;
26 import java.util.Map; 26 import java.util.Map;
27 27
28 import org.tmatesoft.hg.core.HgBadStateException; 28 import org.tmatesoft.hg.core.HgBadStateException;
29 import org.tmatesoft.hg.core.HgInvalidControlFileException;
29 import org.tmatesoft.hg.core.Nodeid; 30 import org.tmatesoft.hg.core.Nodeid;
30 import org.tmatesoft.hg.internal.DataAccess; 31 import org.tmatesoft.hg.internal.DataAccess;
31 import org.tmatesoft.hg.internal.DigestHelper; 32 import org.tmatesoft.hg.internal.DigestHelper;
32 import org.tmatesoft.hg.internal.EncodingHelper; 33 import org.tmatesoft.hg.internal.EncodingHelper;
33 import org.tmatesoft.hg.internal.Experimental; 34 import org.tmatesoft.hg.internal.Experimental;
472 } 473 }
473 for (int u : undefinedChangelogRevision) { 474 for (int u : undefinedChangelogRevision) {
474 Nodeid manifest = repo.getChangelog().range(u, u).get(0).manifest(); 475 Nodeid manifest = repo.getChangelog().range(u, u).get(0).manifest();
475 // FIXME calculate those missing effectively (e.g. cache and sort nodeids to speed lookup 476 // FIXME calculate those missing effectively (e.g. cache and sort nodeids to speed lookup
476 // right away in the #next (may refactor ParentWalker's sequential and sorted into dedicated helper and reuse here) 477 // right away in the #next (may refactor ParentWalker's sequential and sorted into dedicated helper and reuse here)
477 changelog2manifest[u] = repo.getManifest().getLocalRevision(manifest); 478 try {
479 changelog2manifest[u] = repo.getManifest().getLocalRevision(manifest);
480 } catch (HgInvalidControlFileException ex) {
481 // FIXME need to propagate the error up to client
482 repo.getContext().getLog().error(getClass(), ex, null);
483 }
478 } 484 }
479 } 485 }
480 } 486 }
481 } 487 }