Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.BatchRefUpdate.execute()


        newCommand(B, null, "refs/heads/masters",
            ReceiveCommand.Type.DELETE));
    BatchRefUpdate batchUpdate = refdir.newBatchUpdate();
    batchUpdate.setAllowNonFastForwards(true);
    batchUpdate.addCommand(commands);
    batchUpdate.execute(new RevWalk(diskRepo), new StrictWorkMonitor());
    Map<String, Ref> refs = refdir.getRefs(RefDatabase.ALL);
    assertEquals(ReceiveCommand.Result.OK, commands.get(0).getResult());
    assertEquals(ReceiveCommand.Result.OK, commands.get(1).getResult());
    assertEquals(ReceiveCommand.Result.OK, commands.get(2).getResult());
    assertEquals("[HEAD, refs/heads/master, refs/heads/masters/x]", refs
View Full Code Here


    batch.setAllowNonFastForwards(isAllowNonFastForwards());
    batch.setRefLogIdent(getRefLogIdent());
    batch.setRefLogMessage("push", true); //$NON-NLS-1$
    batch.addCommand(toApply);
    try {
      batch.execute(walk, updating);
    } catch (IOException err) {
      for (ReceiveCommand cmd : toApply) {
        if (cmd.getResult() == Result.NOT_ATTEMPTED)
          cmd.reject(err);
      }
View Full Code Here

    batch.setAllowNonFastForwards(isAllowNonFastForwards());
    batch.setRefLogIdent(getRefLogIdent());
    batch.setRefLogMessage("push", true);
    batch.addCommand(toApply);
    try {
      batch.execute(walk, updating);
    } catch (IOException err) {
      for (ReceiveCommand cmd : toApply) {
        if (cmd.getResult() == Result.NOT_ATTEMPTED)
          cmd.reject(err);
      }
View Full Code Here

        for (ReceiveCommand cmd : batch.getCommands()) {
          if (cmd.getResult() == NOT_ATTEMPTED)
            cmd.setResult(OK);
        }
      } else
        batch.execute(walk, monitor);
    } catch (IOException err) {
      throw new TransportException(MessageFormat.format(
          JGitText.get().failureUpdatingTrackingRef,
          getFirstFailedRefName(batch), err.getMessage()), err);
    } finally {
View Full Code Here

        for (ReceiveCommand cmd : batch.getCommands()) {
          if (cmd.getResult() == NOT_ATTEMPTED)
            cmd.setResult(OK);
        }
      } else
        batch.execute(walk, monitor);
    } catch (IOException err) {
      throw new TransportException(MessageFormat.format(
          JGitText.get().failureUpdatingTrackingRef,
          getFirstFailedRefName(batch), err.getMessage()), err);
    } finally {
View Full Code Here

    batch.setAllowNonFastForwards(isAllowNonFastForwards());
    batch.setRefLogIdent(getRefLogIdent());
    batch.setRefLogMessage("push", true); //$NON-NLS-1$
    batch.addCommand(toApply);
    try {
      batch.execute(walk, updating);
    } catch (IOException err) {
      for (ReceiveCommand cmd : toApply) {
        if (cmd.getResult() == Result.NOT_ATTEMPTED)
          cmd.reject(err);
      }
View Full Code Here

    batch.setAllowNonFastForwards(isAllowNonFastForwards());
    batch.setRefLogIdent(getRefLogIdent());
    batch.setRefLogMessage("push", true); //$NON-NLS-1$
    batch.addCommand(toApply);
    try {
      batch.execute(walk, updating);
    } catch (IOException err) {
      for (ReceiveCommand cmd : toApply) {
        if (cmd.getResult() == Result.NOT_ATTEMPTED)
          cmd.reject(err);
      }
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.