Mercurial > hg4j
comparison src/org/tmatesoft/hg/internal/DirstateBuilder.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 | 65c01508f002 |
children | b4242b7e7dfe |
comparison
equal
deleted
inserted
replaced
627:5153eb73b18d | 628:6526d8adbc0f |
---|---|
31 import org.tmatesoft.hg.core.HgIOException; | 31 import org.tmatesoft.hg.core.HgIOException; |
32 import org.tmatesoft.hg.core.Nodeid; | 32 import org.tmatesoft.hg.core.Nodeid; |
33 import org.tmatesoft.hg.repo.HgDirstate; | 33 import org.tmatesoft.hg.repo.HgDirstate; |
34 import org.tmatesoft.hg.repo.HgDirstate.EntryKind; | 34 import org.tmatesoft.hg.repo.HgDirstate.EntryKind; |
35 import org.tmatesoft.hg.repo.HgDirstate.Record; | 35 import org.tmatesoft.hg.repo.HgDirstate.Record; |
36 import org.tmatesoft.hg.repo.HgInvalidControlFileException; | |
36 import org.tmatesoft.hg.repo.HgInvalidStateException; | 37 import org.tmatesoft.hg.repo.HgInvalidStateException; |
37 import org.tmatesoft.hg.repo.HgManifest.Flags; | 38 import org.tmatesoft.hg.repo.HgManifest.Flags; |
38 import org.tmatesoft.hg.util.Path; | 39 import org.tmatesoft.hg.util.Path; |
39 | 40 |
40 /** | 41 /** |
162 tr.failure(dirstateFile, ex); | 163 tr.failure(dirstateFile, ex); |
163 throw new HgIOException("Can't write down new directory state", ex, dirstateFile); | 164 throw new HgIOException("Can't write down new directory state", ex, dirstateFile); |
164 } | 165 } |
165 } | 166 } |
166 | 167 |
167 public void fillFrom(DirstateReader dirstate) { | 168 public void fillFrom(DirstateReader dirstate) throws HgInvalidControlFileException { |
168 // TODO preserve order, if reasonable and possible | 169 // TODO preserve order, if reasonable and possible |
169 dirstate.readInto(new HgDirstate.Inspector() { | 170 dirstate.readInto(new HgDirstate.Inspector() { |
170 | 171 |
171 public boolean next(EntryKind kind, Record entry) { | 172 public boolean next(EntryKind kind, Record entry) { |
172 switch (kind) { | 173 switch (kind) { |