Package org.tmatesoft.hg.repo

Examples of org.tmatesoft.hg.repo.HgPhase


    Matcher m = Pattern.compile("(\\d+): (\\w+)$", Pattern.MULTILINE).matcher(output.result());
    int i = 0;
    while (m.find()) {
      int x = Integer.parseInt(m.group(1));
      assert x == i;
      HgPhase v = HgPhase.parse(m.group(2));
      result[x] = v;
      i++;
    }
    return result;
  }
View Full Code Here


    // update bookmarks
    if (p1Commit != NO_REVISION || p2Commit != NO_REVISION) {
      repo.getRepo().getBookmarks().updateActive(p1Cset, p2Cset, changesetRev);
    }
    PhasesHelper phaseHelper = new PhasesHelper(repo);
    HgPhase newCommitPhase = HgPhase.parse(repo.getRepo().getConfiguration().getStringValue("phases", "new-commit", HgPhase.Draft.mercurialString()));
    phaseHelper.newCommitNode(changesetRev, newCommitPhase);
    // TODO Revisit: might be reasonable to send out a "Repo changed" notification, to clear
    // e.g. cached branch, tags and so on, not to rely on file change detection methods?
    // The same notification might come useful once Pull is implemented
    return changesetRev;
View Full Code Here

    }
  }

  public void newCommitNode(Nodeid newChangeset, HgPhase newCommitPhase) throws HgRuntimeException {
    final int riCset = repo.getRepo().getChangelog().getRevisionIndex(newChangeset);
    HgPhase ph = getPhase(riCset, newChangeset);
    if (ph.compareTo(newCommitPhase) >= 0) {
      // present phase is more secret than the desired one
      return;
    }
    // newCommitPhase can't be public here, condition above would be satisfied
    assert newCommitPhase != HgPhase.Public;
View Full Code Here

        Nodeid rootRev = Nodeid.fromAscii(lc[1]);
        if (!getRepo().getChangelog().isKnown(rootRev)) {
          repo.getSessionContext().getLog().dump(getClass(), Warn, "Phase(%d) root node %s doesn't exist in the repository, ignored.", phaseIndex, rootRev);
          continue;
        }
        HgPhase phase = HgPhase.parse(phaseIndex);
        List<Nodeid> roots = phase2roots.get(phase);
        if (roots == null) {
          phase2roots.put(phase, roots = new LinkedList<Nodeid>());
        }
        roots.add(rootRev);
View Full Code Here

TOP

Related Classes of org.tmatesoft.hg.repo.HgPhase

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.