Package org.eclipse.jgit.api.errors

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


        }
      }
    } catch (org.eclipse.jgit.errors.CheckoutConflictException e) {
      List<String> conflicts = (dco == null) ? Collections
          .<String> emptyList() : dco.getConflicts();
      throw new CheckoutConflictException(conflicts, e);
    } catch (IOException e) {
      throw new JGitInternalException(
          MessageFormat.format(
              JGitText.get().exceptionCaughtDuringExecutionOfMergeCommand,
              e), e);
View Full Code Here


          commit.getTree());
      checkout.setFailOnConflict(false);
      try {
        checkout.checkout();
      } catch (org.eclipse.jgit.errors.CheckoutConflictException cce) {
        throw new CheckoutConflictException(checkout.getConflicts(),
            cce);
      }
    } finally {
      dc.unlock();
    }
View Full Code Here

        }
      }
    } catch (org.eclipse.jgit.errors.CheckoutConflictException e) {
      List<String> conflicts = (dco == null) ? Collections
          .<String> emptyList() : dco.getConflicts();
      throw new CheckoutConflictException(conflicts, e);
    } catch (IOException e) {
      throw new JGitInternalException(
          MessageFormat.format(
              JGitText.get().exceptionCaughtDuringExecutionOfMergeCommand,
              e), e);
View Full Code Here

        try {
          dco.checkout();
        } catch (org.eclipse.jgit.errors.CheckoutConflictException e) {
          status = new CheckoutResult(Status.CONFLICTS,
              dco.getConflicts());
          throw new CheckoutConflictException(dco.getConflicts(), e);
        }
      } finally {
        dc.unlock();
      }
      Ref ref = repo.getRef(name);
View Full Code Here

        }
      }
    } catch (org.eclipse.jgit.errors.CheckoutConflictException e) {
      List<String> conflicts = (dco == null) ? Collections
          .<String> emptyList() : dco.getConflicts();
      throw new CheckoutConflictException(conflicts, e);
    } catch (IOException e) {
      throw new JGitInternalException(
          MessageFormat.format(
              JGitText.get().exceptionCaughtDuringExecutionOfMergeCommand,
              e), e);
View Full Code Here

          commitTree);
      checkout.setFailOnConflict(false);
      try {
        checkout.checkout();
      } catch (org.eclipse.jgit.errors.CheckoutConflictException cce) {
        throw new CheckoutConflictException(checkout.getConflicts(),
            cce);
      }
    } finally {
      dc.unlock();
    }
View Full Code Here

        try {
          dco.checkout();
        } catch (org.eclipse.jgit.errors.CheckoutConflictException e) {
          status = new CheckoutResult(Status.CONFLICTS,
              dco.getConflicts());
          throw new CheckoutConflictException(dco.getConflicts(), e);
        }
      } finally {
        dc.unlock();
      }
      Ref ref = repo.getRef(name);
View Full Code Here

          repo.lockDirCache(), commit.getTree());
      dco.setFailOnConflict(true);
      try {
        dco.checkout();
      } catch (org.eclipse.jgit.errors.CheckoutConflictException cce) {
        throw new CheckoutConflictException(dco.getConflicts(), cce);
      }
      // update the HEAD
      RefUpdate refUpdate = repo.updateRef(Constants.HEAD, true);
      refUpdate.setExpectedOldObjectId(head);
      refUpdate.setNewObjectId(commit);
View Full Code Here

    FileEntry entry = new FileTreeIterator.FileEntry(new File(
        db.getWorkTree(), "a"), db.getFS());
    assertEquals(FileMode.TREE, entry.getMode());

    CheckoutConflictException exception = null;
    try {
      git.checkout().setName(branch_1.getName()).call();
    } catch (CheckoutConflictException e) {
      exception = e;
    }
    assertNotNull(exception);
    assertEquals(2, exception.getConflictingPaths().size());
    assertEquals("a", exception.getConflictingPaths().get(0));
    assertEquals("a/c", exception.getConflictingPaths().get(1));
  }
View Full Code Here

    FileEntry entry = new FileTreeIterator.FileEntry(new File(
        db.getWorkTree(), "a"), db.getFS());
    assertEquals(FileMode.REGULAR_FILE, entry.getMode());

    CheckoutConflictException exception = null;
    try {
      git.checkout().setName(branch_1.getName()).call();
    } catch (CheckoutConflictException e) {
      exception = e;
    }
    assertNotNull(exception);
    assertEquals(1, exception.getConflictingPaths().size());
    assertEquals("a", exception.getConflictingPaths().get(0));
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.api.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.