Package org.tmatesoft.hg.core

Examples of org.tmatesoft.hg.core.HgIOException


            ok = consumer.consume(line, paramObj);
          }
        }
        return paramObj;
      } catch (IOException ex) {
        throw new HgIOException(ex.getMessage(), ex, file);
      } finally {
        new FileUtils(log, this).closeQuietly(statusFileReader);
//        try {
//          consumer.end(file, paramObj);
//        } catch (IOException ex) {
View Full Code Here


    } catch (IOException ex) {
      // not in finally because I don't want to loose exception from fos.close()
      closeQuietly(fis, from);
      closeQuietly(fos, to);
      String m = String.format("Failed to copy %s to %s", from.getName(), to.getName());
      throw new HgIOException(m, ex, from);
    }
    /* Copy of cpython's 00changelog.d, 20Mb+
     * Linux&Windows: 300-400 ms,
     * Windows uncached run: 1.6 seconds
     */
 
View Full Code Here

      first.putContentTo(new OutputStreamSink(fos));
      fos.flush();
      fos.close();
      unresolved.add(r);
    } catch (IOException ex) {
      throw new HgIOException(String.format("Failed to write content of unresolved file %s to merge state at %s", file, f), f);
    } catch (CancelledException ex) {
      repo.getLog().dump(getClass(), Severity.Error, ex, "Our impl doesn't throw cancellation");
    }
  }
View Full Code Here

        fos.write(NL);
      }
      fos.flush();
      fos.close();
    } catch (IOException ex) {
      throw new HgIOException("Failed to serialize merge state", mergeStateFile);
    }
  }
View Full Code Here

        fos.write(data, offset, length);
        fos.flush();
      } catch (IOException ex) {
        writeFailed = true;
        transaction.failure(transactionFile, ex);
        throw new HgIOException("Write failure", ex, transactionFile);
      }
    }
View Full Code Here

        } catch (IOException ex) {
          if (!writeFailed) {
            // do not eclipse original exception
            transaction.failure(transactionFile, ex);
          }
          throw new HgIOException("Write failure", ex, transactionFile);
        }
      }
    }
View Full Code Here

        // #allocate() above ensures backing array
        out.write(buffer.array(), 0, buffer.limit());
        buffer.clear();
      }
    } catch (IOException ex) {
      throw new HgIOException("Failed to get content of the file", ex, file);
    } finally {
      new FileUtils(ctx.getLog(), this).closeQuietly(fis);
    }
  }
View Full Code Here

      }
      fncacheFile.force(true);
      tr.done(f);
    } catch (IOException ex) {
      tr.failure(f, ex);
      throw new HgIOException("Failed to write fncache", ex, f);
    } finally {
      new FileUtils(repo.getLog(), this).closeQuietly(fos, f);
    }
   
  }
View Full Code Here

TOP

Related Classes of org.tmatesoft.hg.core.HgIOException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.