Mercurial > jhg
comparison src/org/tmatesoft/hg/core/HgCatCommand.java @ 237:6e1373b54e9b
Allow access to working copy content through HgDataFile. Give access to repository's working dir
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 10 Jun 2011 04:35:21 +0200 |
parents | b7347daa50e3 |
children | 3fbfce107f94 |
comparison
equal
deleted
inserted
replaced
236:883300108179 | 237:6e1373b54e9b |
---|---|
19 import static org.tmatesoft.hg.repo.HgInternals.wrongLocalRevision; | 19 import static org.tmatesoft.hg.repo.HgInternals.wrongLocalRevision; |
20 import static org.tmatesoft.hg.repo.HgRepository.BAD_REVISION; | 20 import static org.tmatesoft.hg.repo.HgRepository.BAD_REVISION; |
21 import static org.tmatesoft.hg.repo.HgRepository.TIP; | 21 import static org.tmatesoft.hg.repo.HgRepository.TIP; |
22 | 22 |
23 import java.io.FileNotFoundException; | 23 import java.io.FileNotFoundException; |
24 import java.io.IOException; | |
25 | 24 |
26 import org.tmatesoft.hg.repo.HgDataFile; | 25 import org.tmatesoft.hg.repo.HgDataFile; |
27 import org.tmatesoft.hg.repo.HgRepository; | 26 import org.tmatesoft.hg.repo.HgRepository; |
28 import org.tmatesoft.hg.util.ByteChannel; | 27 import org.tmatesoft.hg.util.ByteChannel; |
29 import org.tmatesoft.hg.util.CancelledException; | 28 import org.tmatesoft.hg.util.CancelledException; |
121 * | 120 * |
122 * @param sink output channel to write data to. | 121 * @param sink output channel to write data to. |
123 * @throws HgDataStreamException | 122 * @throws HgDataStreamException |
124 * @throws IllegalArgumentException when command arguments are incomplete or wrong | 123 * @throws IllegalArgumentException when command arguments are incomplete or wrong |
125 */ | 124 */ |
126 public void execute(ByteChannel sink) throws HgDataStreamException, IOException, CancelledException { | 125 public void execute(ByteChannel sink) throws HgDataStreamException, CancelledException { |
127 if (localRevision == BAD_REVISION && revision == null && cset == null) { | 126 if (localRevision == BAD_REVISION && revision == null && cset == null) { |
128 throw new IllegalArgumentException("File revision, corresponing local number, or a changset nodeid shall be specified"); | 127 throw new IllegalArgumentException("File revision, corresponing local number, or a changset nodeid shall be specified"); |
129 } | 128 } |
130 if (file == null) { | 129 if (file == null) { |
131 throw new IllegalArgumentException("Name of the file is missing"); | 130 throw new IllegalArgumentException("Name of the file is missing"); |