comparison src/org/tmatesoft/hg/internal/DataAccessProvider.java @ 538:dd4f6311af52

Commit: first working version
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 05 Feb 2013 22:30:21 +0100
parents 243202f1bda5
children ed243b668502
comparison
equal deleted inserted replaced
537:5a455624be4f 538:dd4f6311af52
103 public DataSerializer createWriter(File f, boolean createNewIfDoesntExist) { 103 public DataSerializer createWriter(File f, boolean createNewIfDoesntExist) {
104 if (!f.exists() && !createNewIfDoesntExist) { 104 if (!f.exists() && !createNewIfDoesntExist) {
105 return new DataSerializer(); 105 return new DataSerializer();
106 } 106 }
107 try { 107 try {
108 return new StreamDataSerializer(context.getLog(), new FileOutputStream(f)); 108 return new StreamDataSerializer(context.getLog(), new FileOutputStream(f, true));
109 } catch (final FileNotFoundException ex) { 109 } catch (final FileNotFoundException ex) {
110 context.getLog().dump(getClass(), Error, ex, null); 110 context.getLog().dump(getClass(), Error, ex, null);
111 return new DataSerializer() { 111 return new DataSerializer() {
112 public void write(byte[] data, int offset, int length) throws IOException { 112 public void write(byte[] data, int offset, int length) throws IOException {
113 throw ex; 113 throw ex;