Package org.eclipse.jgit.api.errors

Examples of org.eclipse.jgit.api.errors.JGitInternalException


    Iterable<RevCommit> commitsToUse = cmd.call();

    List<RevCommit> cherryPickList = new ArrayList<RevCommit>();
    for (RevCommit commit : commitsToUse) {
      if (commit.getParentCount() != 1)
        throw new JGitInternalException(
            JGitText.get().canOnlyCherryPickCommitsWithOneParent);
      cherryPickList.add(commit);
    }

    Collections.reverse(cherryPickList);
View Full Code Here


          throw new IOException("Could not fast-forward");
        }
      }
      return newCommit;
    } catch (RefAlreadyExistsException e) {
      throw new JGitInternalException(e.getMessage(), e);
    } catch (RefNotFoundException e) {
      throw new JGitInternalException(e.getMessage(), e);
    } catch (InvalidRefNameException e) {
      throw new JGitInternalException(e.getMessage(), e);
    }
  }
View Full Code Here

      }
    } else
      switch (repo.getRepositoryState()) {
      case SAFE:
        if (this.upstreamCommit == null)
          throw new JGitInternalException(MessageFormat
              .format(JGitText.get().missingRequiredParameter,
                  "upstream"));
        return;
      default:
        throw new WrongRepositoryStateException(MessageFormat.format(
View Full Code Here

        case FAST_FORWARD:
        case FORCED:
        case NO_CHANGE:
          break;
        default:
          throw new JGitInternalException(
              JGitText.get().abortingRebaseFailed);
        }
      }
      // cleanup the files
      FileUtils.delete(rebaseDir, FileUtils.RECURSIVE);
View Full Code Here

   */
  public RebaseCommand setUpstream(AnyObjectId upstream) {
    try {
      this.upstreamCommit = walk.parseCommit(upstream);
    } catch (IOException e) {
      throw new JGitInternalException(MessageFormat.format(
          JGitText.get().couldNotReadObjectWhileParsingCommit,
          upstream.name()), e);
    }
    return this;
  }
View Full Code Here

        throw new RefNotFoundException(MessageFormat.format(JGitText
            .get().refNotResolved, upstream));
      upstreamCommit = walk.parseCommit(repo.resolve(upstream));
      return this;
    } catch (IOException ioe) {
      throw new JGitInternalException(ioe.getMessage(), ioe);
    }
  }
View Full Code Here

        } else {
          return null;
        }
      }
    } catch (IOException e) {
      throw new JGitInternalException(
          MessageFormat.format(
                  JGitText.get().exceptionCaughtDuringExecutionOfRevertCommand,
              e), e);
    } finally {
      revWalk.release();
View Full Code Here

        try {
          PushResult result = transport.push(monitor, toPush);
          pushResults.add(result);

        } catch (TransportException e) {
          throw new JGitInternalException(
              JGitText.get().exceptionCaughtDuringExecutionOfPushCommand,
              e);
        } finally {
          transport.close();
        }
      }

    } catch (URISyntaxException e) {
      throw new InvalidRemoteException(MessageFormat.format(
          JGitText.get().invalidRemote, remote));
    } catch (NotSupportedException e) {
      throw new JGitInternalException(
          JGitText.get().exceptionCaughtDuringExecutionOfPushCommand,
          e);
    } catch (IOException e) {
      throw new JGitInternalException(
          JGitText.get().exceptionCaughtDuringExecutionOfPushCommand,
          e);
    }

    return pushResults;
View Full Code Here

    } else {
      Ref src;
      try {
        src = repo.getRef(nameOrSpec);
      } catch (IOException e) {
        throw new JGitInternalException(
            JGitText.get().exceptionCaughtDuringExecutionOfPushCommand,
            e);
      }
      if (src != null)
        add(src);
View Full Code Here

          return CherryPickResult.CONFLICT;
        }
      }
    } catch (IOException e) {
      throw new JGitInternalException(
          MessageFormat.format(
              JGitText.get().exceptionCaughtDuringExecutionOfCherryPickCommand,
              e), e);
    } finally {
      revWalk.release();
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.api.errors.JGitInternalException

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.