comparison src/org/tmatesoft/hg/internal/NewlineFilter.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 b3c16d1aede0
children
comparison
equal deleted inserted replaced
627:5153eb73b18d 628:6526d8adbc0f
1 /* 1 /*
2 * Copyright (c) 2011-2012 TMate Software Ltd 2 * Copyright (c) 2011-2013 TMate Software Ltd
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License. 6 * the Free Software Foundation; version 2 of the License.
7 * 7 *
26 import java.io.File; 26 import java.io.File;
27 import java.nio.ByteBuffer; 27 import java.nio.ByteBuffer;
28 import java.util.ArrayList; 28 import java.util.ArrayList;
29 import java.util.Map; 29 import java.util.Map;
30 30
31 import org.tmatesoft.hg.repo.HgInvalidFileException; 31 import org.tmatesoft.hg.core.HgIOException;
32 import org.tmatesoft.hg.repo.HgInvalidStateException; 32 import org.tmatesoft.hg.repo.HgInvalidStateException;
33 import org.tmatesoft.hg.repo.HgRepository; 33 import org.tmatesoft.hg.repo.HgRepository;
34 import org.tmatesoft.hg.util.Adaptable; 34 import org.tmatesoft.hg.util.Adaptable;
35 import org.tmatesoft.hg.util.Path; 35 import org.tmatesoft.hg.util.Path;
36 36
312 // } 312 // }
313 // XXX perhaps, add HgDataFile.hasWorkingCopy and workingCopyContent()? 313 // XXX perhaps, add HgDataFile.hasWorkingCopy and workingCopyContent()?
314 ConfigFile hgeol = new ConfigFile(hgRepo.getSessionContext()); 314 ConfigFile hgeol = new ConfigFile(hgRepo.getSessionContext());
315 try { 315 try {
316 hgeol.addLocation(cfgFile); 316 hgeol.addLocation(cfgFile);
317 } catch (HgInvalidFileException ex) { 317 } catch (HgIOException ex) {
318 hgRepo.getSessionContext().getLog().dump(getClass(), Warn, ex, null); 318 hgRepo.getSessionContext().getLog().dump(getClass(), Warn, ex, null);
319 } 319 }
320 nativeRepoFormat = hgeol.getSection("repository").get("native"); 320 nativeRepoFormat = hgeol.getSection("repository").get("native");
321 if (nativeRepoFormat == null) { 321 if (nativeRepoFormat == null) {
322 nativeRepoFormat = "LF"; 322 nativeRepoFormat = "LF";