Examples of StashApplyFailureException


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

          boolean ok = ixMerger.merge(headCommit, stashIndexCommit);
          if (ok) {
            resetIndex(revWalk
                .parseTree(ixMerger.getResultTreeId()));
          } else {
            throw new StashApplyFailureException(
                JGitText.get().stashApplyConflict);
          }
        }

        if (untrackedCommit != null) {
          ResolveMerger untrackedMerger = (ResolveMerger) strategy
              .newMerger(repo, true);
          untrackedMerger.setCommitNames(new String[] {
              "stashed HEAD", "HEAD", "untracked files" }); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
          untrackedMerger.setBase(stashHeadCommit);
          boolean ok = untrackedMerger.merge(headCommit,
              untrackedCommit);
          if (ok)
            try {
              RevTree untrackedTree = revWalk
                  .parseTree(untrackedMerger
                      .getResultTreeId());
              resetUntracked(untrackedTree);
            } catch (CheckoutConflictException e) {
              throw new StashApplyFailureException(
                  JGitText.get().stashApplyConflict);
            }
          else
            throw new StashApplyFailureException(
                JGitText.get().stashApplyConflict);
        }
      } else {
        throw new StashApplyFailureException(
            JGitText.get().stashApplyConflict);
      }
      return stashId;

    } catch (JGitInternalException e) {
View Full Code Here

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

          ixMerger.setBase(stashHeadCommit);
          boolean ok = ixMerger.merge(headCommit, stashIndexCommit);
          if (ok) {
            resetIndex(revWalk.parseTree(ixMerger.getResultTreeId()));
          } else {
            throw new StashApplyFailureException(JGitText.get().stashApplyConflict);
          }
        }

        if (untrackedCommit != null) {
          ResolveMerger untrackedMerger = (ResolveMerger) strategy.newMerger(repo, true);
          untrackedMerger.setCommitNames(new String[] { "stashed HEAD", "HEAD", "untracked files" }); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
          untrackedMerger.setBase(stashHeadCommit);
          boolean ok = untrackedMerger.merge(stashHeadCommit, untrackedCommit);
          if (ok)
            try {
              RevTree untrackedTree = revWalk.parseTree(untrackedMerger.getResultTreeId());
              resetUntracked(untrackedTree);
            } catch (CheckoutConflictException e) {
              throw new StashApplyFailureException(JGitText.get().stashApplyConflict);
            }
          else
            throw new StashApplyFailureException(JGitText.get().stashApplyConflict);
        }
      } else {
        throw new StashApplyFailureException(JGitText.get().stashApplyConflict);
      }
      return stashId;

    } catch (JGitInternalException e) {
      throw e;
View Full Code Here

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

          boolean ok = ixMerger.merge(headCommit, stashIndexCommit);
          if (ok) {
            resetIndex(revWalk
                .parseTree(ixMerger.getResultTreeId()));
          } else {
            throw new StashApplyFailureException(
                JGitText.get().stashApplyConflict);
          }
        }
      } else {
        throw new StashApplyFailureException(
            JGitText.get().stashApplyConflict);
      }
      return stashId;

    } catch (JGitInternalException e) {
View Full Code Here

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

          boolean ok = ixMerger.merge(headCommit, stashIndexCommit);
          if (ok) {
            resetIndex(revWalk
                .parseTree(ixMerger.getResultTreeId()));
          } else {
            throw new StashApplyFailureException(
                JGitText.get().stashApplyConflict);
          }
        }
      } else {
        throw new StashApplyFailureException(
            JGitText.get().stashApplyConflict);
      }
      return stashId;

    } catch (JGitInternalException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.