Mercurial > jhg
comparison src/org/tmatesoft/hg/core/HgManifestCommand.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 | 78a9e26e670d |
children | 98ff1fb49abe |
comparison
equal
deleted
inserted
replaced
627:5153eb73b18d | 628:6526d8adbc0f |
---|---|
188 failure = null; | 188 failure = null; |
189 throw ex; | 189 throw ex; |
190 } | 190 } |
191 } | 191 } |
192 | 192 |
193 public boolean begin(int manifestRevision, Nodeid nid, int changelogRevision) { | 193 public boolean begin(int manifestRevision, Nodeid nid, int changelogRevision) throws HgRuntimeException { |
194 if (needDirs && manifestContent == null) { | 194 if (needDirs && manifestContent == null) { |
195 manifestContent = new LinkedList<HgFileRevision>(); | 195 manifestContent = new LinkedList<HgFileRevision>(); |
196 } | 196 } |
197 try { | 197 try { |
198 visitor.begin(manifestNodeid = nid); | 198 visitor.begin(manifestNodeid = nid); |
204 } catch (CancelledException ex) { | 204 } catch (CancelledException ex) { |
205 recordCancel(ex); | 205 recordCancel(ex); |
206 return false; | 206 return false; |
207 } | 207 } |
208 } | 208 } |
209 public boolean end(int revision) { | 209 public boolean end(int revision) throws HgRuntimeException { |
210 try { | 210 try { |
211 if (needDirs) { | 211 if (needDirs) { |
212 LinkedHashMap<Path, LinkedList<HgFileRevision>> breakDown = new LinkedHashMap<Path, LinkedList<HgFileRevision>>(); | 212 LinkedHashMap<Path, LinkedList<HgFileRevision>> breakDown = new LinkedHashMap<Path, LinkedList<HgFileRevision>>(); |
213 for (HgFileRevision fr : manifestContent) { | 213 for (HgFileRevision fr : manifestContent) { |
214 Path filePath = fr.getPath(); | 214 Path filePath = fr.getPath(); |
241 } finally { | 241 } finally { |
242 manifestNodeid = null; | 242 manifestNodeid = null; |
243 } | 243 } |
244 } | 244 } |
245 | 245 |
246 public boolean next(Nodeid nid, Path fname, Flags flags) { | 246 public boolean next(Nodeid nid, Path fname, Flags flags) throws HgRuntimeException { |
247 if (matcher != null && !matcher.accept(fname)) { | 247 if (matcher != null && !matcher.accept(fname)) { |
248 return true; | 248 return true; |
249 } | 249 } |
250 try { | 250 try { |
251 HgFileRevision fr = new HgFileRevision(repo, nid, flags, fname); | 251 HgFileRevision fr = new HgFileRevision(repo, nid, flags, fname); |