Package org.tmatesoft.hg.repo

Examples of org.tmatesoft.hg.repo.HgRemoteRepository$Range


    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


    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

    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

    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

    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

    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

    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

    //
    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

        Array dataArray = Array.factory(DataType.FLOAT, section.getShape());
        GradsVariable gradsVar = findVar(v2);

        // Canonical ordering is ens, time, level, lat, lon
        int           rangeIdx  = 0;
        Range         ensRange  = (gradsDDF.getEnsembleDimension() != null)
                                  ? section.getRange(rangeIdx++)
                                  : new Range(0, 0);
        Range         timeRange = (section.getRank() > 2)
                                  ? section.getRange(rangeIdx++)
                                  : new Range(0, 0);
        Range         levRange  = (gradsVar.getNumLevels() > 0)
                                  ? section.getRange(rangeIdx++)
                                  : new Range(0, 0);
        Range         yRange    = section.getRange(rangeIdx++);
        Range         xRange    = section.getRange(rangeIdx);

        IndexIterator ii        = dataArray.getIndexIterator();

        // loop over ens
        for (int ensIdx = ensRange.first(); ensIdx <= ensRange.last();
View Full Code Here

    // create the List<Dim>
    // Section shifted = intersect.shiftOrigin(dataSection); // want reletive to dataSection
    int wantStride = 1;
    int dataStride = 1;
    for (int ii = varRank - 1; ii >= 0; ii--) {
      Range dr = dataSection.getRange(ii);
      Range wr = wantSection.getRange(ii);
      Range ir = intersect.getRange(ii);
      dimList.add(new Dim(dr, wr, ir, dataStride, wantStride)); // note reversed : fastest first
      dataStride *= dr.length();
      wantStride *= wr.length();
    }

View Full Code Here

TOP

Related Classes of org.tmatesoft.hg.repo.HgRemoteRepository$Range

Copyright © 2018 www.massapicom. 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.