Examples of Git


Examples of org.eclipse.jgit.api.Git

        stream = new FileOutputStream(output);
      else
        stream = outs;

      try {
        ArchiveCommand cmd = new Git(db).archive()
          .setTree(tree)
          .setFormat(format)
          .setOutputStream(stream);
        if (output != null)
          cmd.setFilename(output);
View Full Code Here

Examples of org.eclipse.jgit.api.Git

  private boolean shownURI;

  @Override
  protected void run() throws Exception {
    Git git = new Git(db);
    PushCommand push = git.push();
    push.setDryRun(dryRun);
    push.setForce(force);
    push.setProgressMonitor(new TextProgressMonitor());
    push.setReceivePack(receivePack);
    push.setRefSpecs(refSpecs);
View Full Code Here

Examples of org.eluder.coveralls.maven.plugin.domain.Git

    /**
     * @return job that describes the coveralls report
     * @throws IOException if an I/O error occurs
     */
    protected Job createJob() throws IOException {
        Git git = new GitRepository(project.getBasedir()).load();
        return new Job()
            .withRepoToken(repoToken)
            .withServiceName(serviceName)
            .withServiceJobId(serviceJobId)
            .withServiceBuildNumber(serviceBuildNumber)
View Full Code Here

Examples of org.nbgit.Git

        }
        return f1;
    }

    public void performAction(ActionEvent e) {
        final Git git = Git.getInstance();

        File[] files = context.getRootFiles().toArray(new File[context.getRootFiles().size()]);
        if (files == null || files.length == 0) {
            return;     // If there is a .git directory in an ancestor of any of the files in
        // the context we fail.
        }
        for (File file : files) {
            if (!file.isDirectory()) {
                file = file.getParentFile();
            }
            if (git.getTopmostManagedParent(file) != null) {
                Git.LOG.log(Level.SEVERE, "Found .git directory in ancestor of {0} ", // NOI18N
                        file);
                return;
            }
        }

        final Project proj = GitUtils.getProject(context);
        File projFile = GitUtils.getProjectFile(proj);

        if (projFile == null) {
            OutputLogger logger = OutputLogger.getLogger(Git.GIT_OUTPUT_TAB_TITLE);
            logger.outputInRed(NbBundle.getMessage(InitAction.class, "MSG_CREATE_TITLE")); // NOI18N
            logger.outputInRed(NbBundle.getMessage(InitAction.class, "MSG_CREATE_TITLE_SEP")); // NOI18N
            logger.outputInRed(
                    NbBundle.getMessage(InitAction.class, "MSG_CREATE_NOT_SUPPORTED_INVIEW_INFO")); // NOI18N
            logger.output(""); // NOI18N
            JOptionPane.showMessageDialog(null,
                    NbBundle.getMessage(InitAction.class, "MSG_CREATE_NOT_SUPPORTED_INVIEW"),// NOI18N
                    NbBundle.getMessage(InitAction.class, "MSG_CREATE_NOT_SUPPORTED_INVIEW_TITLE"),// NOI18N
                    JOptionPane.INFORMATION_MESSAGE);
            logger.closeLog();
            return;
        }
        String projName = GitProjectUtils.getProjectName(projFile);

        File rootDir = getCommonAncestor(files);
        final File root = getCommonAncestor(rootDir, projFile);
        if (root == null) {
            return;
        }
        final String prjName = projName;
        final Repository repo = git.getRepository(root);

        RequestProcessor rp = git.getRequestProcessor(root.getAbsolutePath());

        GitProgressSupport supportCreate = new GitProgressSupport() {

            public void perform() {
                try {
                    OutputLogger logger = getLogger();
                    logger.outputInRed(
                            NbBundle.getMessage(InitAction.class,
                            "MSG_CREATE_TITLE")); // NOI18N
                    logger.outputInRed(
                            NbBundle.getMessage(InitAction.class,
                            "MSG_CREATE_TITLE_SEP")); // NOI18N
                    logger.output(
                            NbBundle.getMessage(InitAction.class,
                            "MSG_CREATE_INIT", prjName, root)); // NOI18N

                    repo.create();
                } catch (IOException ex) {
                    notifyLater(ex);
                }
            }
        };
        supportCreate.start(rp, root.getAbsolutePath(),
                org.openide.util.NbBundle.getMessage(InitAction.class, "MSG_Create_Progress")); // NOI18N

        GitProgressSupport supportAdd = new GitProgressSupport() {

            public void perform() {
                OutputLogger logger = getLogger();
                try {
                    List<File> files = getFileList(repo, root);
                    IndexBuilder.create(repo).
                            log(logger).
                            addAll(files).
                            write();

                    logger.output(
                            NbBundle.getMessage(InitAction.class,
                            "MSG_CREATE_ADD", files.size(), root.getAbsolutePath())); // NOI18N
                    logger.output(""); // NOI18N
                    logger.outputInRed(NbBundle.getMessage(InitAction.class, "MSG_CREATE_DONE_WARNING")); // NOI18N
                } catch (IOException ex) {
                    notifyLater(ex);
                } finally {
                    logger.outputInRed(NbBundle.getMessage(InitAction.class, "MSG_CREATE_DONE")); // NOI18N
                    logger.output(""); // NOI18N
                }
            }
        };

        supportAdd.start(rp, root.getAbsolutePath(),
                org.openide.util.NbBundle.getMessage(InitAction.class, "MSG_Create_Add_Progress")); // NOI18N

        GitProgressSupport supportStatus = new StatusTask(context) {

            @Override
            public void performAfter() {
                git.versionedFilesChanged();
                git.refreshAllAnnotations();
            }

        };

        supportStatus.start(rp, root.getAbsolutePath(),
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.