Package org.eclipse.jgit.api.ResetCommand

Examples of org.eclipse.jgit.api.ResetCommand.ResetType


  @Override
  protected void run() throws Exception {
    ResetCommand command = new Git(db).reset();
    command.setRef(commit);
    ResetType mode = null;
    if (soft)
      mode = selectMode(mode, ResetType.SOFT);
    if (mixed)
      mode = selectMode(mode, ResetType.MIXED);
    if (hard)
View Full Code Here


            .bind("Mixing {0} and {1} parameters is not allowed.", new Object[] { ProtocolConstants.KEY_PATH, GitConstants.KEY_RESET_TYPE });
        return statusHandler.handleRequest(request, response, new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_BAD_REQUEST, msg, null));
      }
      String ref = toReset.optString(GitConstants.KEY_TAG_COMMIT, Constants.HEAD);
      try {
        ResetType type = ResetType.valueOf(resetType);
        switch (type) {
        case MIXED:
        case HARD:
        case SOFT:
          Git git = new Git(db);
View Full Code Here

    }
    ResetTargetSelectionDialog branchSelectionDialog = new ResetTargetSelectionDialog(
        getShell(event), repository);
    if (branchSelectionDialog.open() == IDialogConstants.OK_ID) {
      final String refName = branchSelectionDialog.getRefName();
      final ResetType type = branchSelectionDialog.getResetType();
      String jobname = NLS.bind(UIText.ResetAction_reset, refName);
      final ResetOperation operation = new ResetOperation(repository,
          refName, type);
      JobUtil.scheduleUserWorkspaceJob(operation, jobname,
          JobFamilies.RESET);
View Full Code Here

   * @throws ExecutionException
   */
  public static void performReset(ExecutionEvent event,
      final Repository repo, final ObjectId commitId, String resetMode)
      throws ExecutionException {
    final ResetType resetType = ResetType.valueOf(resetMode);

    final String jobName;
    switch (resetType) {
    case HARD:
      if (!MessageDialog.openQuestion(
View Full Code Here

        setWindowTitle(UIText.ResetCommand_WizardTitle);
      }

      @Override
      public boolean performFinish() {
        final ResetType resetType = ((SelectResetTypePage) getPages()[0])
            .getResetType();
        if (resetType == ResetType.HARD)
          if (!MessageDialog
              .openQuestion(
                  getShell(),
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.api.ResetCommand.ResetType

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.