Examples of CheckoutConflictException


Examples of org.eclipse.jgit.errors.CheckoutConflictException

      if (isConflict(stashIndexIter, stashWorkingIter, headIter,
          indexIter, workingIter)) {
        String path = treeWalk.getPathString();
        File file = new File(workingTree, path);
        throw new CheckoutConflictException(file.getAbsolutePath());
      }
    }
  }
View Full Code Here

Examples of org.eclipse.jgit.errors.CheckoutConflictException

      else
        prescanOneTree();

      if (!conflicts.isEmpty()) {
        if (failOnConflict)
          throw new CheckoutConflictException(conflicts.toArray(new String[conflicts.size()]));
        else
          cleanUpConflicts();
      }

      // update our index
View Full Code Here

Examples of org.eclipse.jgit.errors.CheckoutConflictException

  private void cleanUpConflicts() throws CheckoutConflictException {
    // TODO: couldn't we delete unsaved worktree content here?
    for (String c : conflicts) {
      File conflict = new File(repo.getWorkTree(), c);
      if (!conflict.delete())
        throw new CheckoutConflictException(MessageFormat.format(
            JGitText.get().cannotDeleteFile, c));
      removeEmptyParents(conflict);
    }
    for (String r : removed) {
      File file = new File(repo.getWorkTree(), r);
      if (!file.delete())
        throw new CheckoutConflictException(
            MessageFormat.format(JGitText.get().cannotDeleteFile,
                file.getAbsolutePath()));
      removeEmptyParents(file);
    }
  }
View Full Code Here

Examples of org.eclipse.jgit.errors.CheckoutConflictException

      else
        prescanOneTree();

      if (!conflicts.isEmpty()) {
        if (failOnConflict)
          throw new CheckoutConflictException(conflicts.toArray(new String[conflicts.size()]));
        else
          cleanUpConflicts();
      }

      // update our index
View Full Code Here

Examples of org.eclipse.jgit.errors.CheckoutConflictException

  private void cleanUpConflicts() throws CheckoutConflictException {
    // TODO: couldn't we delete unsaved worktree content here?
    for (String c : conflicts) {
      File conflict = new File(repo.getWorkTree(), c);
      if (!conflict.delete())
        throw new CheckoutConflictException(MessageFormat.format(
            JGitText.get().cannotDeleteFile, c));
      removeEmptyParents(conflict);
    }
    for (String r : removed) {
      File file = new File(repo.getWorkTree(), r);
      if (!file.delete())
        throw new CheckoutConflictException(
            MessageFormat.format(JGitText.get().cannotDeleteFile,
                file.getAbsolutePath()));
      removeEmptyParents(file);
    }
  }
View Full Code Here

Examples of org.eclipse.jgit.errors.CheckoutConflictException

      else
        prescanOneTree();

      if (!conflicts.isEmpty()) {
        if (failOnConflict)
          throw new CheckoutConflictException(conflicts.toArray(new String[conflicts.size()]));
        else
          cleanUpConflicts();
      }

      // update our index
View Full Code Here

Examples of org.eclipse.jgit.errors.CheckoutConflictException

  private void cleanUpConflicts() throws CheckoutConflictException {
    // TODO: couldn't we delete unsaved worktree content here?
    for (String c : conflicts) {
      File conflict = new File(repo.getWorkTree(), c);
      if (!conflict.delete())
        throw new CheckoutConflictException(MessageFormat.format(
            JGitText.get().cannotDeleteFile, c));
      removeEmptyParents(conflict);
    }
    for (String r : removed) {
      File file = new File(repo.getWorkTree(), r);
      if (!file.delete())
        throw new CheckoutConflictException(
            MessageFormat.format(JGitText.get().cannotDeleteFile,
                file.getAbsolutePath()));
      removeEmptyParents(file);
    }
  }
View Full Code Here

Examples of org.eclipse.jgit.errors.CheckoutConflictException

      else
        prescanOneTree();

      if (!conflicts.isEmpty()) {
        if (failOnConflict)
          throw new CheckoutConflictException(conflicts.toArray(new String[conflicts.size()]));
        else
          cleanUpConflicts();
      }

      // update our index
View Full Code Here

Examples of org.eclipse.jgit.errors.CheckoutConflictException

  private void cleanUpConflicts() throws CheckoutConflictException {
    // TODO: couldn't we delete unsaved worktree content here?
    for (String c : conflicts) {
      File conflict = new File(repo.getWorkTree(), c);
      if (!conflict.delete())
        throw new CheckoutConflictException(MessageFormat.format(
            JGitText.get().cannotDeleteFile, c));
      removeEmptyParents(conflict);
    }
    for (String r : removed) {
      File file = new File(repo.getWorkTree(), r);
      if (!file.delete())
        throw new CheckoutConflictException(
            MessageFormat.format(JGitText.get().cannotDeleteFile,
                file.getAbsolutePath()));
      removeEmptyParents(file);
    }
  }
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.