Examples of HgMergeState


Examples of org.tmatesoft.hg.repo.HgMergeState

      System.out.printf("Done: %d\n", System.currentTimeMillis() - start);
    }
  }
 
  private void testMergeState() throws Exception {
    final HgMergeState mergeState = hgRepo.getMergeState();
    mergeState.refresh();
    System.out.printf("isMerging: %s, isStale: %s.\n", mergeState.isMerging(), mergeState.isStale());
    System.out.printf("P1:%s\nP2:%s\nState parent:%s\n",mergeState.getFirstParent().shortNotation(), mergeState.getSecondParent().shortNotation(), mergeState.getStateParent().shortNotation());
    for (HgMergeState.Entry e : mergeState.getConflicts()) {
      System.out.println(e.getState() + " " + e.getActualFile());
      System.out.println("p1:       " + formatFileRevision(e.getFirstParent()));
      System.out.println("p2:       " + formatFileRevision(e.getSecondParent()));
      System.out.println("ancestor: " + formatFileRevision(e.getCommonAncestor()));
      System.out.println();
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgMergeState

    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();
    ms.refresh();
    errorCollector.assertTrue(ms.isMerging());
    errorCollector.assertFalse(ms.isStale());
    errorCollector.assertFalse(ms.getStateParent().isNull());
    errorCollector.assertEquals(1, ms.getConflicts().size());
    final Entry entry = ms.getConflicts().get(0);
    errorCollector.assertEquals(create("file1"), entry.getActualFile());
    errorCollector.assertEquals(HgMergeState.Kind.Unresolved, entry.getState());
  }
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgMergeState

    // rev5: merge rev2 with rev3
    new HgCheckoutCommand(hgRepo).changeset(2).clean(true).execute();
    new HgMergeCommand(hgRepo).changeset(3).execute(new HgMergeCommand.MediatorBase());
    commitCmd.message("SIXTH: merge rev2 and rev3");
    errorCollector.assertTrue(commitCmd.isMergeCommit());
    HgMergeState ms = hgRepo.getMergeState();
    ms.refresh();
    errorCollector.assertTrue(ms.isMerging());
    errorCollector.assertFalse(ms.isStale());
    errorCollector.assertEquals(0, ms.getConflicts().size());
    Outcome o = commitCmd.execute();
    errorCollector.assertTrue(o.getMessage(), o.isOk());
    ms.refresh();
    errorCollector.assertFalse(ms.isMerging());
    errorCollector.assertEquals(0, ms.getConflicts().size());
    RepoUtils.assertHgVerifyOk(errorCollector, repoLoc);
  }
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.