Package org.tmatesoft.hg.internal.Patch

Examples of org.tmatesoft.hg.internal.Patch.PatchDataSource


          return;
        }
        Patch p = GeneratePatchInspector.delta(prevContent, nextContent);
        prevContent = nextContent;
        nextContent = null;
        PatchDataSource pds = p.new PatchDataSource();
        int len = pds.serializeLength() + 84;
        ds.writeInt(len);
        ds.write(nodeid, 0, Nodeid.SIZE);
        if (parent1Revision != NO_REVISION) {
          ds.writeByte(parentMap.get(parent1Revision).toByteArray());
        } else {
          ds.writeByte(Nodeid.NULL.toByteArray());
        }
        if (parent2Revision != NO_REVISION) {
          ds.writeByte(parentMap.get(parent2Revision).toByteArray());
        } else {
          ds.writeByte(Nodeid.NULL.toByteArray());
        }
        ds.writeByte(clogMap.get(linkRevision).toByteArray());
        pds.serialize(ds);
      } catch (IOException ex) {
        // XXX odd to have object with IOException to use where no checked exception is allowed
        throw new HgInvalidControlFileException(ex.getMessage(), ex, null);
      } catch (HgIOException ex) {
        throw new HgInvalidControlFileException(ex, true); // XXX any way to refactor ChunkGenerator not to get checked exception here?
View Full Code Here

TOP

Related Classes of org.tmatesoft.hg.internal.Patch.PatchDataSource

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.