comparison src/org/tmatesoft/hg/internal/WorkingDirFileWriter.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 bd5926e24aa3
children b4242b7e7dfe
comparison
equal deleted inserted replaced
627:5153eb73b18d 628:6526d8adbc0f
24 import java.nio.ByteBuffer; 24 import java.nio.ByteBuffer;
25 import java.nio.channels.FileChannel; 25 import java.nio.channels.FileChannel;
26 26
27 import org.tmatesoft.hg.repo.HgDataFile; 27 import org.tmatesoft.hg.repo.HgDataFile;
28 import org.tmatesoft.hg.repo.HgManifest; 28 import org.tmatesoft.hg.repo.HgManifest;
29 import org.tmatesoft.hg.repo.HgRuntimeException;
29 import org.tmatesoft.hg.util.ByteChannel; 30 import org.tmatesoft.hg.util.ByteChannel;
30 import org.tmatesoft.hg.util.CancelledException; 31 import org.tmatesoft.hg.util.CancelledException;
31 import org.tmatesoft.hg.util.LogFacility.Severity; 32 import org.tmatesoft.hg.util.LogFacility.Severity;
32 import org.tmatesoft.hg.util.Path; 33 import org.tmatesoft.hg.util.Path;
33 34
60 } 61 }
61 62
62 /** 63 /**
63 * Writes content of specified file revision into local filesystem, or create a symlink according to flags. 64 * Writes content of specified file revision into local filesystem, or create a symlink according to flags.
64 * Executable bit is set if specified and filesystem supports it. 65 * Executable bit is set if specified and filesystem supports it.
66 * @throws HgRuntimeException
65 */ 67 */
66 public void processFile(HgDataFile df, int fileRevIndex, HgManifest.Flags flags) throws IOException { 68 public void processFile(HgDataFile df, int fileRevIndex, HgManifest.Flags flags) throws IOException, HgRuntimeException {
67 try { 69 try {
68 prepare(df.getPath()); 70 prepare(df.getPath());
69 if (flags != HgManifest.Flags.Link) { 71 if (flags != HgManifest.Flags.Link) {
70 destChannel = new FileOutputStream(dest).getChannel(); 72 destChannel = new FileOutputStream(dest).getChannel();
71 } else { 73 } else {