Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.RepositoryState


      ConcurrentRefUpdateException,
      WrongRepositoryStateException {
    checkCallable();
    Collections.sort(only);

    RepositoryState state = repo.getRepositoryState();
    if (!state.canCommit())
      throw new WrongRepositoryStateException(MessageFormat.format(
          JGitText.get().cannotCommitOnARepoWithState, state.name()));
    processOptions(state);

    try {
      if (all && !repo.isBare() && repo.getWorkTree() != null) {
        Git git = new Git(repo);
View Full Code Here


    Ref r;
    RevCommit commit;

    try {
      RepositoryState state = repo.getRepositoryState();
      final boolean merging = state.equals(RepositoryState.MERGING)
          || state.equals(RepositoryState.MERGING_RESOLVED);
      final boolean cherryPicking = state
          .equals(RepositoryState.CHERRY_PICKING)
          || state.equals(RepositoryState.CHERRY_PICKING_RESOLVED);
      final boolean reverting = state.equals(RepositoryState.REVERTING)
          || state.equals(RepositoryState.REVERTING_RESOLVED);

      // resolve the ref to a commit
      final ObjectId commitId;
      try {
        commitId = repo.resolve(ref + "^{commit}"); //$NON-NLS-1$
View Full Code Here

    Collections.sort(only);

    RevWalk rw = new RevWalk(repo);

    try {
      RepositoryState state = repo.getRepositoryState();
      if (!state.canCommit())
        throw new WrongRepositoryStateException(MessageFormat.format(
            JGitText.get().cannotCommitOnARepoWithState,
            state.name()));
      processOptions(state, rw);

      if (all && !repo.isBare() && repo.getWorkTree() != null) {
        Git git = new Git(repo);
        try {
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.lib.RepositoryState

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.