Mercurial > hg4j
comparison src/org/tmatesoft/hg/internal/NewlineFilter.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 | 4a948ec83980 |
| children | 981f9f50bb6c |
comparison
equal
deleted
inserted
replaced
| 236:883300108179 | 237:6e1373b54e9b |
|---|---|
| 25 import java.io.FileOutputStream; | 25 import java.io.FileOutputStream; |
| 26 import java.nio.ByteBuffer; | 26 import java.nio.ByteBuffer; |
| 27 import java.util.ArrayList; | 27 import java.util.ArrayList; |
| 28 import java.util.Map; | 28 import java.util.Map; |
| 29 | 29 |
| 30 import org.tmatesoft.hg.repo.HgInternals; | |
| 31 import org.tmatesoft.hg.repo.HgRepository; | 30 import org.tmatesoft.hg.repo.HgRepository; |
| 32 import org.tmatesoft.hg.util.Path; | 31 import org.tmatesoft.hg.util.Path; |
| 33 | 32 |
| 34 /** | 33 /** |
| 35 * | 34 * |
| 165 private String nativeRepoFormat; | 164 private String nativeRepoFormat; |
| 166 private String nativeOSFormat; | 165 private String nativeOSFormat; |
| 167 | 166 |
| 168 public void initialize(HgRepository hgRepo, ConfigFile cfg) { | 167 public void initialize(HgRepository hgRepo, ConfigFile cfg) { |
| 169 failIfInconsistent = cfg.getBoolean("eol", "only-consistent", true); | 168 failIfInconsistent = cfg.getBoolean("eol", "only-consistent", true); |
| 170 File cfgFile = new File(new HgInternals(hgRepo).getRepositoryDir().getParentFile(), ".hgeol"); | 169 File cfgFile = new File(hgRepo.getWorkingDir(), ".hgeol"); |
| 171 if (!cfgFile.canRead()) { | 170 if (!cfgFile.canRead()) { |
| 172 return; | 171 return; |
| 173 } | 172 } |
| 174 // XXX if .hgeol is not checked out, we may get it from repository | 173 // XXX if .hgeol is not checked out, we may get it from repository |
| 175 // HgDataFile cfgFileNode = hgRepo.getFileNode(".hgeol"); | 174 // HgDataFile cfgFileNode = hgRepo.getFileNode(".hgeol"); |
