Examples of addFilepattern()


Examples of org.eclipse.jgit.api.AddCommand.addFilepattern()

      FileUtils.writeContent(new File(newProject.dir, ".gitignore"), sb.toString());
     
      AddCommand add = git.add();
      add.addFilepattern("build.xml");
      add.addFilepattern("build.moxie");
      add.addFilepattern(".gitignore");
      if (newProject.eclipse.includeProject()) {
        add.addFilepattern(".project")
      }
      if (newProject.eclipse.includeClasspath()) {
        // MOXIE_HOME relative dependencies in .classpath
View Full Code Here

Examples of org.eclipse.jgit.api.AddCommand.addFilepattern()

      AddCommand add = git.add();
      add.addFilepattern("build.xml");
      add.addFilepattern("build.moxie");
      add.addFilepattern(".gitignore");
      if (newProject.eclipse.includeProject()) {
        add.addFilepattern(".project")
      }
      if (newProject.eclipse.includeClasspath()) {
        // MOXIE_HOME relative dependencies in .classpath
        add.addFilepattern(".classpath")
      }
View Full Code Here

Examples of org.eclipse.jgit.api.AddCommand.addFilepattern()

      if (newProject.eclipse.includeProject()) {
        add.addFilepattern(".project")
      }
      if (newProject.eclipse.includeClasspath()) {
        // MOXIE_HOME relative dependencies in .classpath
        add.addFilepattern(".classpath")
      }
        if (newProject.idea.includeProject()) {
            add.addFilepattern(".project");
        }
        if (newProject.idea.includeClasspath()) {
View Full Code Here

Examples of org.eclipse.jgit.api.AddCommand.addFilepattern()

      if (newProject.eclipse.includeClasspath()) {
        // MOXIE_HOME relative dependencies in .classpath
        add.addFilepattern(".classpath")
      }
        if (newProject.idea.includeProject()) {
            add.addFilepattern(".project");
        }
        if (newProject.idea.includeClasspath()) {
            // MOXIE_HOME relative dependencies in .iml
            add.addFilepattern("*.iml");
        }
View Full Code Here

Examples of org.eclipse.jgit.api.AddCommand.addFilepattern()

        if (newProject.idea.includeProject()) {
            add.addFilepattern(".project");
        }
        if (newProject.idea.includeClasspath()) {
            // MOXIE_HOME relative dependencies in .iml
            add.addFilepattern("*.iml");
        }
      try {
        add.call();
        CommitCommand commit = git.commit();
        PersonIdent moxie = new PersonIdent("Moxie", "moxie@localhost");
View Full Code Here

Examples of org.eclipse.jgit.api.RmCommand.addFilepattern()

  @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.addFilepattern()

      // 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);
View Full Code Here

Examples of org.eclipse.jgit.api.RmCommand.addFilepattern()

      return resetCommand;
    } else {
      RmCommand rmCommand = git.rm();
      rmCommand.setCached(true);
      for (String path : paths)
        rmCommand.addFilepattern(getCommandPath(path));
      return rmCommand;
    }
  }

  private static boolean hasHead(Repository repository) {
View Full Code Here

Examples of org.eclipse.jgit.api.RmCommand.addFilepattern()

      }
    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(),
View Full Code Here

Examples of org.eclipse.jgit.api.RmCommand.addFilepattern()

    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);
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.