Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.CheckoutResult


    CheckoutCommand checkout = git.checkout().setName("b1");
    try {
      checkout.call();
      fail("Checkout exception not thrown");
    } catch (org.eclipse.jgit.api.errors.CheckoutConflictException e) {
      CheckoutResult result = checkout.getResult();
      assertNotNull(result);
      assertNotNull(result.getConflictList());
      assertEquals(1, result.getConflictList().size());
      assertTrue(result.getConflictList().contains("file.txt"));
    }
  }
View Full Code Here


    if (doCheckout) {
      CheckoutCommand co = new Git(repository).checkout();
      try {
        co.setName(textForBranch).call();
      } catch (CheckoutConflictException e) {
        final CheckoutResult result = co.getResult();

        if (result.getStatus() == Status.CONFLICTS) {
          final Shell shell = getWizard().getContainer().getShell();

          shell.getDisplay().asyncExec(new Runnable() {
            public void run() {
              new CheckoutConflictDialog(shell, repository,
                  result.getConflictList()).open();
            }
          });
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.api.CheckoutResult

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.