Examples of changeset()


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

      m = new Dump();
    }
    final String revParam = cmdLineOpts.getSingle("-r", "--rev");
    final HgMergeCommand cmd = hgRepo.createMergeCommand();
    if (revParam.trim().length() == Nodeid.SIZE_ASCII) {
      cmd.changeset(Nodeid.fromAscii(revParam.trim()));
    } else {
      cmd.changeset(Integer.parseInt(revParam));
    }
    cmd.execute(m);
  }
View Full Code Here

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

    final String revParam = cmdLineOpts.getSingle("-r", "--rev");
    final HgMergeCommand cmd = hgRepo.createMergeCommand();
    if (revParam.trim().length() == Nodeid.SIZE_ASCII) {
      cmd.changeset(Nodeid.fromAscii(revParam.trim()));
    } else {
      cmd.changeset(Integer.parseInt(revParam));
    }
    cmd.execute(m);
  }

  static class Dump implements HgMergeCommand.Mediator {
View Full Code Here

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

    HgMergeCommand cmd = new HgMergeCommand(repo);

    MergeNotificationCollector c;
    // (fastForward(file1, file2, file3) changes, newInB(file5), same(file4))
    cmd.changeset(2).execute(c = new MergeNotificationCollector());
    errorCollector.assertTrue("file1", c.fastForwardA.contains("file1"));
    errorCollector.assertTrue("file2", c.fastForwardB.contains("file2"));
    errorCollector.assertTrue("file3", c.fastForwardA.contains("file3"));
    errorCollector.assertTrue("file4", c.same.contains("file4"));
    errorCollector.assertTrue("file5", c.newInB.contains("file5"));
View Full Code Here

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

    errorCollector.assertTrue("file2", c.fastForwardB.contains("file2"));
    errorCollector.assertTrue("file3", c.fastForwardA.contains("file3"));
    errorCollector.assertTrue("file4", c.same.contains("file4"));
    errorCollector.assertTrue("file5", c.newInB.contains("file5"));
    // (conflict(file1), onlyInA(file3), same(file4))
    cmd.changeset(3).execute(c = new MergeNotificationCollector());
    errorCollector.assertTrue("file1", c.conflict.contains("file1"));
    errorCollector.assertTrue("file2", c.same.contains("file2"));
    errorCollector.assertTrue("file3", c.onlyA.contains("file3"));
    errorCollector.assertTrue("file4", c.same.contains("file4"));
  }
View Full Code Here

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

    File repoLoc2 = RepoUtils.copyRepoToTempLocation("merge-1", "test-merge-with-conflicts");
    HgRepository repo = new HgLookup().detect(repoLoc1);
    Assert.assertEquals("[sanity]", repo.getChangelog().getRevisionIndex(repo.getWorkingCopyParents().first()), 1);

    HgMergeCommand cmd = new HgMergeCommand(repo);
    cmd.changeset(2).execute(new HgMergeCommand.MediatorBase() {
     
      public void resolve(HgFileRevision base, HgFileRevision first, HgFileRevision second, Resolver resolver) throws HgCallbackTargetException {
        errorCollector.fail("There's no conflict in changesets 1 and 2 merge");
      }
    });
View Full Code Here

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

    Collections.sort(modified);
    errorCollector.assertEquals(new Path[] {create("file1"), create("file3"), create("file4")}, clean.toArray());
    errorCollector.assertEquals(new Path[] {create("file2"), create("file5")}, modified.toArray());
    repo = new HgLookup().detect(repoLoc2);
    cmd = new HgMergeCommand(repo);
    cmd.changeset(3).execute(new HgMergeCommand.MediatorBase());
    RepoUtils.assertHgVerifyOk(errorCollector, repoLoc2);
    new HgStatusCommand(repo).all().execute(status = new TestStatus.StatusCollector());
    errorCollector.assertEquals(1, status.get(Kind.Modified).size());
    errorCollector.assertEquals(create("file1"), status.get(Kind.Modified).get(0));
    final HgMergeState ms = repo.getMergeState();
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.