Search in sources :

Example 6 with RevPerson

use of org.locationtech.geogig.api.RevPerson in project GeoGig by boundlessgeo.

the class FormatCommonV2 method readCommit.

public static RevCommit readCommit(ObjectId id, DataInput in) throws IOException {
    final ObjectId treeId = readObjectId(in);
    final int nParents = readUnsignedVarInt(in);
    final Builder<ObjectId> parentListBuilder = ImmutableList.builder();
    for (int i = 0; i < nParents; i++) {
        ObjectId parentId = readObjectId(in);
        parentListBuilder.add(parentId);
    }
    final RevPerson author = readRevPerson(in);
    final RevPerson committer = readRevPerson(in);
    final String message = in.readUTF();
    return new RevCommitImpl(id, treeId, parentListBuilder.build(), author, committer, message);
}
Also used : RevPerson(org.locationtech.geogig.api.RevPerson) ObjectId(org.locationtech.geogig.api.ObjectId) Integer.toBinaryString(java.lang.Integer.toBinaryString) RevCommitImpl(org.locationtech.geogig.api.RevCommitImpl)

Example 7 with RevPerson

use of org.locationtech.geogig.api.RevPerson in project GeoGig by boundlessgeo.

the class FormatCommonV2 method readTag.

public static RevTag readTag(ObjectId id, DataInput in) throws IOException {
    final ObjectId commitId = readObjectId(in);
    final String name = in.readUTF();
    final String message = in.readUTF();
    final RevPerson tagger = readRevPerson(in);
    return new RevTagImpl(id, name, commitId, message, tagger);
}
Also used : RevPerson(org.locationtech.geogig.api.RevPerson) ObjectId(org.locationtech.geogig.api.ObjectId) RevTagImpl(org.locationtech.geogig.api.RevTagImpl) Integer.toBinaryString(java.lang.Integer.toBinaryString)

Aggregations

ObjectId (org.locationtech.geogig.api.ObjectId)7 RevPerson (org.locationtech.geogig.api.RevPerson)7 RevTagImpl (org.locationtech.geogig.api.RevTagImpl)4 Integer.toBinaryString (java.lang.Integer.toBinaryString)2 RevCommitImpl (org.locationtech.geogig.api.RevCommitImpl)2 RevTag (org.locationtech.geogig.api.RevTag)2 Date (java.util.Date)1 Test (org.junit.Test)1 Context (org.locationtech.geogig.api.Context)1 NodeRef (org.locationtech.geogig.api.NodeRef)1 Ref (org.locationtech.geogig.api.Ref)1 RevCommit (org.locationtech.geogig.api.RevCommit)1 RevPersonImpl (org.locationtech.geogig.api.RevPersonImpl)1 LsTreeOp (org.locationtech.geogig.api.plumbing.LsTreeOp)1 ParseTimestamp (org.locationtech.geogig.api.plumbing.ParseTimestamp)1 RefParse (org.locationtech.geogig.api.plumbing.RefParse)1 RevParse (org.locationtech.geogig.api.plumbing.RevParse)1 UpdateRef (org.locationtech.geogig.api.plumbing.UpdateRef)1 DiffEntry (org.locationtech.geogig.api.plumbing.diff.DiffEntry)1 LogOp (org.locationtech.geogig.api.porcelain.LogOp)1