Package org.eclipse.jgit.errors

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


  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

      prescanOneTree();

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

    // update our index
View Full Code Here

  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

      prescanOneTree();

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

    // update our index
View Full Code Here

  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

      prescanOneTree();
    else prescanTwoTrees();
    if (!conflicts.isEmpty()) {
      if (failOnConflict) {
        String[] entries = conflicts.toArray(new String[0]);
        throw new CheckoutConflictException(entries);
      }
    }

    cleanUpConflicts();
    if (head == null)
View Full Code Here

  private void cleanUpConflicts() throws CheckoutConflictException {
    for (String c : conflicts) {
      File conflict = new File(root, c);
      if (!conflict.delete())
        throw new CheckoutConflictException(MessageFormat.format(JGitText.get().cannotDeleteFile, c));
      removeEmptyParents(conflict);
    }
    for (String r : removed) {
      File file = new File(root, r);
      file.delete();
View Full Code Here

      prescanOneTree();

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

    // update our index
View Full Code Here

  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

Related Classes of org.eclipse.jgit.errors.CheckoutConflictException

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.