Package org.tmatesoft.hg.internal.DataSerializer

Examples of org.tmatesoft.hg.internal.DataSerializer.OutputStreamSerializer.writeInt()


    final OutputStreamSerializer outRaw = new OutputStreamSerializer(osBundle);
    outRaw.write("HG10UN".getBytes(), 0, 6);
    //
    RevlogStream clogStream = repo.getImplAccess().getChangelogStream();
    new ChunkGenerator(outRaw, clogMap).iterate(clogStream, clogRevs);
    outRaw.writeInt(0); // null chunk for changelog group
    //
    RevlogStream manifestStream = repo.getImplAccess().getManifestStream();
    new ChunkGenerator(outRaw, clogMap).iterate(manifestStream, manifestRevs.toArray(true));
    outRaw.writeInt(0); // null chunk for manifest group
    //
View Full Code Here


    new ChunkGenerator(outRaw, clogMap).iterate(clogStream, clogRevs);
    outRaw.writeInt(0); // null chunk for changelog group
    //
    RevlogStream manifestStream = repo.getImplAccess().getManifestStream();
    new ChunkGenerator(outRaw, clogMap).iterate(manifestStream, manifestRevs.toArray(true));
    outRaw.writeInt(0); // null chunk for manifest group
    //
    EncodingHelper fnEncoder = repo.buildFileNameEncodingHelper();
    for (HgDataFile df : sortedByName(files)) {
      RevlogStream s = repo.getImplAccess().getStream(df);
      final IntVector fileRevs = new IntVector();
View Full Code Here

      if (!fileRevs.isEmpty()) {
        // although BundleFormat page says "filename length, filename" for a file,
        // in fact there's a sort of 'filename chunk', i.e. filename length field includes
        // not only length of filename, but also length of the field itseld, i.e. filename.length+sizeof(int)
        byte[] fnameBytes = fnEncoder.toBundle(df.getPath());
        outRaw.writeInt(fnameBytes.length + 4);
        outRaw.writeByte(fnameBytes);
        new ChunkGenerator(outRaw, clogMap).iterate(s, fileRevs.toArray(true));
        outRaw.writeInt(0); // null chunk for file group
      }
    }
View Full Code Here

        // not only length of filename, but also length of the field itseld, i.e. filename.length+sizeof(int)
        byte[] fnameBytes = fnEncoder.toBundle(df.getPath());
        outRaw.writeInt(fnameBytes.length + 4);
        outRaw.writeByte(fnameBytes);
        new ChunkGenerator(outRaw, clogMap).iterate(s, fileRevs.toArray(true));
        outRaw.writeInt(0); // null chunk for file group
      }
    }
    outRaw.writeInt(0); // null chunk to indicate no more files (although BundleFormat page doesn't mention this)
    outRaw.done();
    osBundle.flush();
View Full Code Here

        outRaw.writeByte(fnameBytes);
        new ChunkGenerator(outRaw, clogMap).iterate(s, fileRevs.toArray(true));
        outRaw.writeInt(0); // null chunk for file group
      }
    }
    outRaw.writeInt(0); // null chunk to indicate no more files (although BundleFormat page doesn't mention this)
    outRaw.done();
    osBundle.flush();
    osBundle.close();
    //return new HgBundle(repo.getSessionContext(), repo.getDataAccess(), bundleFile);
    return bundleFile;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.