private RevCommit getParentCommit(RevCommit srcCommit, RevWalk revWalk) throws MultipleParentsNotAllowedException, MissingObjectException, IOException { final RevCommit srcParent; if (mainlineParentNumber == null) { if (srcCommit.getParentCount() != 1) throw new MultipleParentsNotAllowedException( MessageFormat.format( JGitText.get().canOnlyCherryPickCommitsWithOneParent, srcCommit.name(), Integer.valueOf(srcCommit.getParentCount()))); srcParent = srcCommit.getParent(0); } else { if (mainlineParentNumber.intValue() > srcCommit.getParentCount()) throw new JGitInternalException(MessageFormat.format( JGitText.get().commitDoesNotHaveGivenParent, srcCommit, mainlineParentNumber)); srcParent = srcCommit .getParent(mainlineParentNumber.intValue() - 1); } revWalk.parseHeaders(srcParent); return srcParent; }
throw new MultipleParentsNotAllowedException( MessageFormat.format( JGitText.get().canOnlyRevertCommitsWithOneParent,
private RevCommit getParentCommit(RevCommit srcCommit, RevWalk revWalk) throws MultipleParentsNotAllowedException, MissingObjectException, IOException { final RevCommit srcParent; if (mainlineParentNumber == null) { if (srcCommit.getParentCount() != 1) throw new MultipleParentsNotAllowedException( MessageFormat.format( JGitText.get().canOnlyCherryPickCommitsWithOneParent, srcCommit.name(), Integer.valueOf(srcCommit.getParentCount()))); srcParent = srcCommit.getParent(0); } else { if (mainlineParentNumber.intValue() > srcCommit.getParentCount()) throw new JGitInternalException(MessageFormat.format( JGitText.get().commitDoesNotHaveGivenParent, srcCommit, mainlineParentNumber)); srcParent = srcCommit .getParent(mainlineParentNumber.intValue() - 1); } revWalk.parseHeaders(srcParent); return srcParent; }
private RevCommit getParentCommit(RevCommit srcCommit, RevWalk revWalk) throws MultipleParentsNotAllowedException, MissingObjectException, IOException { final RevCommit srcParent; if (mainlineParentNumber == null) { if (srcCommit.getParentCount() != 1) throw new MultipleParentsNotAllowedException( MessageFormat.format( JGitText.get().canOnlyCherryPickCommitsWithOneParent, srcCommit.name(), Integer.valueOf(srcCommit.getParentCount()))); srcParent = srcCommit.getParent(0); } else { if (mainlineParentNumber.intValue() > srcCommit.getParentCount()) throw new JGitInternalException(MessageFormat.format( JGitText.get().commitDoesNotHaveGivenParent, srcCommit, mainlineParentNumber)); srcParent = srcCommit .getParent(mainlineParentNumber.intValue() - 1); } revWalk.parseHeaders(srcParent); return srcParent; }
throw new IOException(new MultipleParentsNotAllowedException( MessageFormat.format( JGitText.get().canOnlyCherryPickCommitsWithOneParent,
throw new MultipleParentsNotAllowedException( MessageFormat.format( JGitText.get().canOnlyCherryPickCommitsWithOneParent,
throw new MultipleParentsNotAllowedException( MessageFormat.format( JGitText.get().canOnlyRevertCommitsWithOneParent,
throw new MultipleParentsNotAllowedException( MessageFormat.format( JGitText.get().canOnlyRevertCommitsWithOneParent,