Examples of HgRemoteRepository


Examples of org.tmatesoft.hg.repo.HgRemoteRepository

    HgServer server = new HgServer().start(dstRepoLoc);
    try {
      final HgLookup hgLookup = new HgLookup();
      HgRepository srcRepo = hgLookup.detect(srcRepoLoc);
      HgPushCommand cmd = new HgPushCommand(srcRepo);
      final HgRemoteRepository dstRemote = hgLookup.detect(server.getURL());
      cmd.destination(dstRemote);
      cmd.execute();
      final HgRepository dstRepo = hgLookup.detect(dstRepoLoc);
      checkRepositoriesAreSame(srcRepo, dstRepo);
      final List<Nodeid> outgoing = new HgOutgoingCommand(srcRepo).against(dstRemote).executeLite();
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgRemoteRepository

    assertTrue("[sanity]", f1.canWrite());
    HgServer server = new HgServer().start(dstRepoLoc);
    try {
      final HgLookup hgLookup = new HgLookup();
      final HgRepository srcRepo = hgLookup.detect(srcRepoLoc);
      final HgRemoteRepository dstRemote = hgLookup.detect(server.getURL());
      RepoUtils.modifyFileAppend(f1, "change1");
      new HgCommitCommand(srcRepo).message("Commit 1").execute();
      new HgCheckoutCommand(srcRepo).changeset(7).clean(true).execute();
      assertEquals("[sanity]", "no-merge", srcRepo.getWorkingCopyBranchName());
      RepoUtils.modifyFileAppend(f1, "change2");
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgRemoteRepository

    assertTrue("[sanity]", f1.canWrite());
    HgServer server = new HgServer().publishing(false).start(dstRepoLoc);
    try {
      final HgLookup hgLookup = new HgLookup();
      final HgRepository srcRepo = hgLookup.detect(srcRepoLoc);
      final HgRemoteRepository dstRemote = hgLookup.detect(server.getURL());
      PhasesHelper phaseHelper = new PhasesHelper(HgInternals.getImplementationRepo(srcRepo));
      final RevisionSet allDraft = phaseHelper.allDraft();
      assertFalse("[sanity]", allDraft.isEmpty());
      final int publicCsetToBranchAt = 4;
      assertEquals("[sanity]", HgPhase.Public, phaseHelper.getPhase(publicCsetToBranchAt, null));
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgRemoteRepository

    assertEquals(0, dstRun.getExitValue());
    dstRun.exec("hg", "phase", "--secret", "--force", String.valueOf(r8));
    assertEquals(0, dstRun.getExitValue());
    HgServer server = new HgServer().publishing(false).start(dstRepoLoc);
    try {
      final HgRemoteRepository dstRemote = hgLookup.detect(server.getURL());
      // commit new draft head
      new HgCheckoutCommand(srcRepo).changeset(publicCsetToBranchAt).clean(true).execute();
      RepoUtils.modifyFileAppend(f1, "// aaa");
      final HgCommitCommand commitCmd = new HgCommitCommand(srcRepo).message("Commit aaa");
      assertTrue(commitCmd.execute().isOk());
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgRemoteRepository

    final int r4 = 4, r5 = 5, r6 = 6, r9 = 9;
    HgServer server = new HgServer().publishing(false).start(dstRepoLoc);
    try {
      final HgLookup hgLookup = new HgLookup();
      final HgRepository srcRepo = hgLookup.detect(srcRepoLoc);
      final HgRemoteRepository dstRemote = hgLookup.detect(server.getURL());
      new HgPushCommand(srcRepo).destination(dstRemote).execute();
      //
      // make sure pushed repository got same draft root
      final Nodeid r4PublicHead = srcRepo.getChangelog().getRevision(r4);
      final Nodeid r5DraftRoot = srcRepo.getChangelog().getRevision(r5);
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgRemoteRepository

    File dstRepoLoc = RepoUtils.initEmptyTempRepo("test-push-pub-dst");
    HgServer server = new HgServer().publishing(true).start(dstRepoLoc);
    try {
      final HgLookup hgLookup = new HgLookup();
      final HgRepository srcRepo = hgLookup.detect(srcRepoLoc);
      final HgRemoteRepository dstRemote = hgLookup.detect(server.getURL());
      PhasesHelper phaseHelper = new PhasesHelper(HgInternals.getImplementationRepo(srcRepo));
      final RevisionSet allDraft = phaseHelper.allDraft();
      assertFalse("[sanity]", allDraft.isEmpty());
      // push all changes
      new HgPushCommand(srcRepo).destination(dstRemote).execute();
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgRemoteRepository

    File dstRepoLoc = RepoUtils.initEmptyTempRepo("test-push-no-secret-dst");
    HgServer server = new HgServer().start(dstRepoLoc);
    try {
      final HgLookup hgLookup = new HgLookup();
      final HgRepository srcRepo = hgLookup.detect(srcRepoLoc);
      final HgRemoteRepository dstRemote = hgLookup.detect(server.getURL());
      PhasesHelper phaseHelper = new PhasesHelper(HgInternals.getImplementationRepo(srcRepo));
      final RevisionSet allSecret = phaseHelper.allSecret();
      assertFalse("[sanity]", allSecret.isEmpty());
      new HgPushCommand(srcRepo).destination(dstRemote).execute();
      HgRepository dstRepo = hgLookup.detect(dstRepoLoc);
View Full Code Here

Examples of org.tmatesoft.hg.repo.HgRemoteRepository

    //
    HgServer server = new HgServer().start(dstRepoLoc);
    try {
      final HgLookup hgLookup = new HgLookup();
      final HgRepository srcRepo = hgLookup.detect(srcRepoLoc);
      final HgRemoteRepository dstRemote = hgLookup.detect(server.getURL());
      RepoUtils.modifyFileAppend(f1, "change1");
      final HgCommitCommand commitCmd = new HgCommitCommand(srcRepo).message("Commit 1");
      assertTrue(commitCmd.execute().isOk());
      assertEquals(bm1, srcRepo.getBookmarks().getActiveBookmarkName());
      assertEquals(commitCmd.getCommittedRevision(), srcRepo.getBookmarks().getRevision(bm1));
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.