Examples of changeset()


Examples of com.aragost.javahg.Repository.changeset()

                boolean active = stream.read() == '*';
                stream.mustMatch(' ');
                String name = stream.textUpTo(' ');
                stream.upTo(':');
                String node = stream.textUpTo('\n');
                Bookmark bookmark = new Bookmark(repo.changeset(node), name, active);
                result.add(bookmark);
            }
            return result;
        } catch (IOException e) {
            throw new RuntimeIOException(e);
View Full Code Here

Examples of com.aragost.javahg.Repository.changeset()

        try {
            while (!stream.isEof()) {
                String node = stream.textUpTo(' ');
                String phaseName = stream.textUpTo(0);
                Phase phase = Phase.fromText(phaseName);
                result.put(repo.changeset(node), phase);
            }
        } catch (IOException e) {
            throw new RuntimeIOException(e);
        }
        return result;
View Full Code Here

Examples of com.aragost.javahg.Repository.changeset()

                boolean active = stream.read() == '*';
                stream.mustMatch(' ');
                String name = stream.textUpTo(' ');
                stream.upTo(':');
                String node = stream.textUpTo('\n');
                Bookmark bookmark = new Bookmark(repo.changeset(node), name, active);
                result.add(bookmark);
            }
            return result;
        } catch (IOException e) {
            throw new RuntimeIOException(e);
View Full Code Here

Examples of com.aragost.javahg.Repository.changeset()

        stream = new HgInputStream(new ByteArrayInputStream(bos.toByteArray()), repo.newDecoder());

        if (stream.find(BEGIN)) {
            result = Lists.newArrayList();
            while (!stream.isEof() && !stream.match(BEGIN_FALLBACK)) {
                result.add(repo.changeset(stream.textUpTo('\n')));
            }
        } else {
            stream = new HgInputStream(new ByteArrayInputStream(bos.toByteArray()), repo.newDecoder());

            List<String> nodePrefixes = Lists.newArrayList();
View Full Code Here

Examples of com.aragost.javahg.Repository.changeset()

                boolean active = stream.read() == '*';
                stream.mustMatch(' ');
                String name = stream.textUpTo(':');
                name = name.substring(0, name.lastIndexOf(' ')).trim();
                String node = stream.textUpTo('\n');
                Bookmark bookmark = new Bookmark(repo.changeset(node), name, active);
                result.add(bookmark);
            }
            return result;
        } catch (IOException e) {
            throw new RuntimeIOException(e);
View Full Code Here

Examples of org.tmatesoft.hg.core.HgAnnotateCommand.changeset()

      return;
    }
    int rev = cmdLineOpts.getSingleInt(TIP, "-r", "--rev");
    HgAnnotateCommand cmd = repo.createAnnotateCommand();
    AnnotateDumpInspector insp = new AnnotateDumpInspector(cmdLineOpts.getBoolean(false, "-l", "--line-number"));
    cmd.changeset(rev);
    for (String fname : cmdLineOpts.getList("")) {
      cmd.file(Path.create(fname));
      cmd.execute(insp);
    }
  }
View Full Code Here

Examples of org.tmatesoft.hg.core.HgAnnotateCommand.changeset()

    HgAnnotateCommand cmd = hgRepoFacade.createAnnotateCommand();
    final Path fname = Path.create("file1b.txt");
    final int changeset = TIP;
    AnnotateInspector ai = new AnnotateInspector();

    cmd.changeset(changeset);
    // follow
    cmd.file(fname);
    cmd.execute(ai);
    AnnotateRunner ar = new AnnotateRunner(fname, repo.getWorkingDir());
    ar.run(changeset, true);
View Full Code Here

Examples of org.tmatesoft.hg.core.HgAnnotateCommand.changeset()

    // how map(diff(p1->base->p2)) merge strategy works
    final String file1AnnotateResult = "3:1:1\n3:2:2x\n3:3:3y\n2:4:z\n0:1:1\n1:2:2x\n4:3:3y\n";
    final String file4AnnotateResult = "3:1:1\n1:2:2x\n4:3:3y\n2:4:z\n0:1:1\n3:6:2x\n3:7:3y\n";
    final String file5AnnotateResult = "0:1:1\n1:2:2x\n4:3:3y\n2:4:z\n5:5:1\n5:6:2x\n5:7:3y\n";
    HgAnnotateCommand cmd = new HgAnnotateCommand(repo);
    cmd.changeset(5);
    AnnotateInspector insp = new AnnotateInspector();
    // file1
    cmd.file(df1, false).execute(insp);
    doAnnotateLineCheck(5, splitLines(file1AnnotateResult), insp);
    // file4
View Full Code Here

Examples of org.tmatesoft.hg.core.HgCatCommand.changeset()

  public void testCatAtCsetRevision() throws Exception {
    HgCatCommand cmd = new HgCatCommand(repo);
    final Path file = Path.create("src/org/tmatesoft/hg/internal/RevlogStream.java");
    cmd.file(file);
    final Nodeid cset = Nodeid.fromAscii("08db726a0fb7914ac9d27ba26dc8bbf6385a0554");
    cmd.changeset(cset);
    final ByteArrayChannel sink = new ByteArrayChannel();
    cmd.execute(sink);
    final int result1 = sink.toArray().length;
    HgChangesetFileSneaker i = new HgChangesetFileSneaker(repo);
    boolean result = i.changeset(cset).checkExists(file);
View Full Code Here

Examples of org.tmatesoft.hg.core.HgCatCommand.changeset()

    cmd1.file(Path.create("a")); // a is initial b through temporary c
    cmd2.file(Path.create("c"));
    ByteArrayChannel sink1, sink2;
    // a from wc/tip was c in rev 4
    cmd1.changeset(4).execute(sink1 = new ByteArrayChannel());
    cmd2.changeset(4).execute(sink2 = new ByteArrayChannel());
    assertArrayEquals(sink2.toArray(), sink1.toArray());
    //
    // d from wc/tip was a in 0..2 and b in rev 3..4. Besides, there's another d in r4
    cmd2.file(Path.create("d"));
    cmd1.changeset(2).execute(sink1 = new ByteArrayChannel());
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.