Examples of RmCommand


Examples of com.cloudloop.client.cli.commands.RmCommand

    {
  CommandFactory.getInstance( ).registerCommand( new ExitCommand( ) );
  CommandFactory.getInstance( ).registerCommand( new HelpCommand( ) );
  CommandFactory.getInstance( ).registerCommand( new CatCommand( ) );
  CommandFactory.getInstance( ).registerCommand( new ConfigCommand( ) );
  CommandFactory.getInstance( ).registerCommand( new RmCommand( ) );
  CommandFactory.getInstance( ).registerCommand( new RmDirCommand( ) );
  CommandFactory.getInstance( ).registerCommand( new ChangeDirCommand( ) );
  CommandFactory.getInstance( ).registerCommand( new CopyCommand( ) );
  CommandFactory.getInstance( ).registerCommand( new ListCommand( ) );
  CommandFactory.getInstance( ).registerCommand( new MkDirCommand( ) );
View Full Code Here

Examples of org.eclipse.jgit.api.RmCommand

  private List<String> paths = new ArrayList<String>();


  @Override
  protected void run() throws Exception {
    RmCommand command = new Git(db).rm();
    for (String p : paths)
      command.addFilepattern(p);
    command.call();
  }
View Full Code Here

Examples of org.eclipse.jgit.api.RmCommand

      deleteFile(missingTxt);

      // remove the file
      Repository repository = getRepositoryForContentLocation(cloneContentLocation);
      Git git = new Git(repository);
      RmCommand rm = git.rm();
      rm.addFilepattern(removedFileName);
      rm.call();

      // untracked file
      String untrackedFileName = "untracked.txt";
      request = getPostFilesRequest(folder.getString(ProtocolConstants.KEY_LOCATION), getNewFileJSON(untrackedFileName).toString(), untrackedFileName);
      response = webConversation.getResponse(request);
View Full Code Here

Examples of org.eclipse.jgit.api.RmCommand

      resetCommand.setRef(HEAD);
      for (String path : paths)
        resetCommand.addPath(getCommandPath(path));
      return resetCommand;
    } else {
      RmCommand rmCommand = git.rm();
      rmCommand.setCached(true);
      for (String path : paths)
        rmCommand.addFilepattern(getCommandPath(path));
      return rmCommand;
    }
  }
View Full Code Here

Examples of org.eclipse.jgit.api.RmCommand

      } catch (Exception e1) {
        Activator.handleError(e1.getMessage(), e1, true);
      }
    if (!rmPaths.isEmpty())
      try {
        RmCommand rm = git.rm().setCached(true);
        for (String rmPath : rmPaths)
          rm.addFilepattern(rmPath);
        rm.call();
      } catch (NoFilepatternException e) {
        // cannot happen
      } catch (JGitInternalException e) {
        Activator.handleError(e.getCause().getMessage(), e.getCause(),
            true);
View Full Code Here

Examples of org.eclipse.jgit.api.RmCommand

  @Override
  public void delete(FileVersion... files) {
    Repository repository = getRepository(files[0].getFile());
    Git git = new Git(repository);
    try {
      RmCommand remover = git.rm();
      for (FileVersion fileVersion : files) {
        remover.addFilepattern(getPath(fileVersion.getFile(), repository));
      }
      remover.call();
      commit(git, String.format("[FitNesse] Deleted files: %s.", formatFileVersions(files)), files[0].getAuthor());
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
    persistence.delete(files);
View Full Code Here

Examples of org.eclipse.jgit.api.RmCommand

     * Removes a file pattern
     *
     * @param filePattern the file pattern
     */
    public void remove(String filePattern) {
        RmCommand remove = git.rm();

        DirCache cache;
        try {
            cache = remove.addFilepattern(filePattern).call();
            updateCache(cache);
        } catch (NoFilepatternException e) {
            throw new IllegalStateException("Unable to remove file from the Git cache", e);
        } catch (IOException e) {
            throw new IllegalStateException("Unable to remove file from the Git cache", e);
View Full Code Here

Examples of org.eclipse.jgit.api.RmCommand

     * Removes a file pattern
     *
     * @param filePattern the file pattern
     */
    public void remove(String filePattern) {
        RmCommand remove = git.rm();

        DirCache cache;
        try {
            cache = remove.addFilepattern(filePattern).call();
            updateCache(cache);
        } catch (NoFilepatternException e) {
            throw new IllegalStateException("Unable to remove file from the Git cache", e);
        } catch (IOException e) {
            throw new IllegalStateException("Unable to remove file from the Git cache", e);
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.