Examples of HgFileRevision


Examples of org.tmatesoft.hg.core.HgFileRevision

          continue;
        }
        Path p1fname = pathPool.path(r[3]);
        Nodeid nidP1 = m1.nodeid(p1fname);
        Nodeid nidCA = nodeidPool.unify(Nodeid.fromAscii(r[5]));
        HgFileRevision p1 = new HgFileRevision(hgRepo, nidP1, m1.flags(p1fname), p1fname);
        HgFileRevision ca;
        if (nidCA == nidP1 && r[3].equals(r[4])) {
          ca = p1;
        } else {
          ca = new HgFileRevision(hgRepo, nidCA, null, pathPool.path(r[4]));
        }
        HgFileRevision p2;
        if (!wcp2.isNull() || !r[6].equals(r[4])) {
          final Path p2fname = pathPool.path(r[6]);
          Nodeid nidP2 = m2.nodeid(p2fname);
          if (nidP2 == null) {
            assert false : "There's not enough information (or I don't know where to look) in merge/state to find out what's the second parent";
            nidP2 = NULL;
          }
          p2 = new HgFileRevision(hgRepo, nidP2, m2.flags(p2fname), p2fname);
        } else {
          // no second parent known. no idea what to do here, assume linear merge, use common ancestor as parent
          p2 = ca;
        }
        final Kind k;
View Full Code Here

Examples of org.tmatesoft.hg.core.HgFileRevision

      throw new UnsupportedOperationException();
    }
    Path.Source ps = getRepo().getSessionContext().getPathFactory();
    Path origin = ps.path(metadata.find(fileRevisionIndex, "copy"));
    Nodeid originRev = Nodeid.fromAscii(metadata.find(fileRevisionIndex, "copyrev")); // XXX reuse/cache Nodeid
    return new HgFileRevision(getRepo(), originRev, null, origin);
  }
View Full Code Here

Examples of org.tmatesoft.hg.core.HgFileRevision

    eh.run("hg", "log", "--debug", "--follow", f.toString());
   
    CollectWithRenameHandler h = new CollectWithRenameHandler();
    new HgLogCommand(repo).file(f, true).execute(h);
    errorCollector.assertEquals(1, h.rh.renames.size());
    HgFileRevision from = h.rh.renames.get(0).first();
    boolean fromMatched = "src/com/tmate/hgkit/console/Remote.java".equals(from.getPath().toString());
    String what = "hg log - FOLLOW FILE HISTORY";
    errorCollector.checkThat(what + "#copyReported ", h.rh.copyReported, is(true));
    errorCollector.checkThat(what + "#copyFromMatched", fromMatched, is(true));
    //
    // cmdline always gives in changesets in order from newest (bigger rev number) to oldest.
View Full Code Here

Examples of org.tmatesoft.hg.core.HgFileRevision

        continue;
      }
      csetChunkStart = cset;
      if (df.isCopy(fileRev)) {
        chunks.addFirst(new Chunk(df, fileRev, chunkEnd, csetChunkStart, csetChunkEnd));
        HgFileRevision origin = df.getCopySource(fileRev);
        df = df.getRepo().getFileNode(origin.getPath());
        fileRev = chunkEnd = df.getRevisionIndex(origin.getRevision());
        csetMap = new BasicRevMap(0, fileRev).collect(df);
        chunkStart = 0;
        csetChunkEnd = cset - 1; // if df is copy, cset can't be 0
        csetChunkStart = -1;
      } else {
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.