comparison src/org/tmatesoft/hg/core/HgFileRevision.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 1792b37650f2
children 4c3b9f679412
comparison
equal deleted inserted replaced
236:883300108179 237:6e1373b54e9b
13 * For information on how to redistribute this software under 13 * For information on how to redistribute this software under
14 * the terms of a license other than GNU General Public License 14 * the terms of a license other than GNU General Public License
15 * contact TMate Software at support@hg4j.com 15 * contact TMate Software at support@hg4j.com
16 */ 16 */
17 package org.tmatesoft.hg.core; 17 package org.tmatesoft.hg.core;
18
19 import java.io.IOException;
20 18
21 import org.tmatesoft.hg.repo.HgDataFile; 19 import org.tmatesoft.hg.repo.HgDataFile;
22 import org.tmatesoft.hg.repo.HgRepository; 20 import org.tmatesoft.hg.repo.HgRepository;
23 import org.tmatesoft.hg.util.ByteChannel; 21 import org.tmatesoft.hg.util.ByteChannel;
24 import org.tmatesoft.hg.util.CancelledException; 22 import org.tmatesoft.hg.util.CancelledException;
49 return path; 47 return path;
50 } 48 }
51 public Nodeid getRevision() { 49 public Nodeid getRevision() {
52 return revision; 50 return revision;
53 } 51 }
54 public void putContentTo(ByteChannel sink) throws HgDataStreamException, IOException, CancelledException { 52 public void putContentTo(ByteChannel sink) throws HgDataStreamException, CancelledException {
55 HgDataFile fn = repo.getFileNode(path); 53 HgDataFile fn = repo.getFileNode(path);
56 int localRevision = fn.getLocalRevision(revision); 54 int localRevision = fn.getLocalRevision(revision);
57 fn.contentWithFilters(localRevision, sink); 55 fn.contentWithFilters(localRevision, sink);
58 } 56 }
59 57