Package org.tmatesoft.hg.repo

Examples of org.tmatesoft.hg.repo.HgDataFile.parents()


      private int[] parentRevisions = new int[2];
     
      public void next(int revisionNumber, Nodeid nodeid, RawChangeset cset) {
        try {
          fileChangesetRevisions[fileLocalRevisions] = revisionNumber;
          fn.parents(fileLocalRevisions, parentRevisions, null, null);
          boolean join = parentRevisions[0] != -1 && parentRevisions[1] != -1;
          if (join) {
            System.out.print("join[");
          }
          if (parentRevisions[0] != -1) {
View Full Code Here


          byte[] content = sink.toArray();
          System.out.println(new String(content));
          int[] parentRevisions = new int[2];
          byte[] parent1 = new byte[20];
          byte[] parent2 = new byte[20];
          fn.parents(i, parentRevisions, parent1, parent2);
          System.out.println(dh.sha1(parent1, parent2, content).asHexString());
        }
      } else {
        System.out.println(">>>Not found!");
      }
View Full Code Here

      int revisionIndex = fn.getRevisionIndex(revision);
      int[] pr = new int[2];
      byte[] p1 = new byte[20], p2 = new byte[20];
      // XXX Revlog#parents is not the best method to use here
      // need smth that gives Nodeids (piped through Pool<Nodeid> from repo's context)
      fn.parents(revisionIndex, pr, p1, p2);
      parents = new Pair<Nodeid, Nodeid>(Nodeid.fromBinary(p1, 0), Nodeid.fromBinary(p2, 0));
    }
    return parents;
  }
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.