Package org.tmatesoft.hg.core

Examples of org.tmatesoft.hg.core.HgIOException


          newRev = Nodeid.fromAscii(line.substring(x+1));
        }
        state.put(oldRev, newRev);
      }
    } catch (NoSuchElementException ex) {
      throw new HgIOException("Bad format of rebase state file", f);
    } catch (HgBadNodeidFormatException ex) {
      throw new HgIOException("Bad format of rebase state file", ex, f);
    }
    return this;
  }
View Full Code Here


    try {
      w = new FileWriter(lastMessage);
      w.write(message == null ? new String() : message);
      w.flush();
    } catch (IOException ex) {
      throw new HgIOException("Failed to save last commit message", ex, lastMessage);
    } finally {
      new FileUtils(repo.getLog(), this).closeQuietly(w, lastMessage);
    }
  }
View Full Code Here

    DataAccess da = null;
    try {
      da = getDataStream();
      internalInspectChangelog(da, inspector);
    } catch (IOException ex) {
      throw new HgIOException("Failed to inspect changelog in the bundle", ex, bundleFile);
    } finally {
      if (da != null) {
        da.done();
      }
      lifecycleTearDown(lifecycle);
View Full Code Here

        return;
      }
      skipGroup(da); // changelog
      internalInspectManifest(da, inspector);
    } catch (IOException ex) {
      throw new HgIOException("Failed to inspect manifest in the bundle", ex, bundleFile);
    } finally {
      if (da != null) {
        da.done();
      }
      lifecycleTearDown(lifecycle);
View Full Code Here

        return;
      }
      skipGroup(da); // manifest
      internalInspectFiles(da, inspector);
    } catch (IOException ex) {
      throw new HgIOException("Failed to inspect files in the bundle", ex, bundleFile);
    } finally {
      if (da != null) {
        da.done();
      }
      lifecycleTearDown(lifecycle);
View Full Code Here

      if (flowControl.isStopped()) {
        return;
      }
      internalInspectFiles(da, inspector);
    } catch (IOException ex) {
      throw new HgIOException("Failed to inspect bundle", ex, bundleFile);
    } finally {
      if (da != null) {
        da.done();
      }
      lifecycleTearDown(lifecycle);
View Full Code Here

    int p2 = p2Rev.isNull() ? NO_REVISION : revlogRevs.revisionIndex(p2Rev);
    Patch p = null;
    try {
      p = HgInternals.patchFromData(ge);
    } catch (IOException ex) {
      throw new HgIOException("Failed to read patch information", ex, null);
    }
    //
    final Nodeid patchBase = ge.patchBase();
    int patchBaseRev = patchBase.isNull() ? NO_REVISION : revlogRevs.revisionIndex(patchBase);
    int baseRev = lastEntryIndex == NO_REVISION ? 0 : revlogStream.baseRevision(patchBaseRev);
View Full Code Here

    public ReadContentInspector read(RevlogStream rs, int revIndex) throws HgIOException, HgRuntimeException {
      assert revIndex >= 0;
      rs.iterate(revIndex, revIndex, true, this);
      if (failure != null) {
        String m = String.format("Failed to get content of revision %d", revIndex);
        throw rs.initWithIndexFile(new HgIOException(m, failure, null));
      }
      return this;
    }
View Full Code Here

    }
    write(buffer, 0, idx);
  }

  public void write(byte[] data, int offset, int length) throws HgIOException {
    throw new HgIOException("Attempt to write to non-existent file", null);
  }
View Full Code Here

    @Override
    public void write(byte[] data, int offset, int length) throws HgIOException {
      try {
        out.write(data, offset, length);
      } catch (IOException ex) {
        throw new HgIOException(ex.getMessage(), ex, null);
      }
    }
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.