Package org.opensolaris.opengrok.util

Examples of org.opensolaris.opengrok.util.Executor.exec()


     */
    History parse(File file, String changeset) throws HistoryException {
        isDir = file.isDirectory();
        try {
            Executor executor = repository.getHistoryLogExecutor(file, changeset);
            int status = executor.exec(true, this);

            if (status != 0) {
                throw new HistoryException("Failed to get history for: \"" +
                                           file.getAbsolutePath() +
                                           "\" Exit code: " + status);
View Full Code Here


        handler = new Handler(repos.getDirectoryName(), repos.reposPath,
                RuntimeEnvironment.getInstance().getSourceRootPath().length(),
                repos.getDateFormat());

        Executor executor = repos.getHistoryLogExecutor(file, sinceRevision);
        int status = executor.exec(true, this);

        if (status != 0) {
            throw new HistoryException("Failed to get history for: \"" +
                    file.getAbsolutePath() + "\" Exit code: " + status);
        }
View Full Code Here

     */
    History parse(File file, Repository repos) throws HistoryException {
        repository = (CVSRepository) repos;
        try {
            Executor executor = repository.getHistoryLogExecutor(file);
            int status = executor.exec(true, this);

            if (status != 0) {
                throw new HistoryException("Failed to get history for: \"" +
                                           file.getAbsolutePath() + "\" Exit code: " + status);
            }
View Full Code Here

            env.setSourceRoot(repository.getSourceRoot());
            env.setDataRoot(repository.getDataRoot());
            Executor executor;

            executor = new Executor(new String[]{"mkdir", "-p", repository.getSourceRoot() + "/testBug11896"});
            executor.exec(true);

            executor = new Executor(new String[]{"mkfifo", repository.getSourceRoot() + "/testBug11896/FIFO"});
            executor.exec(true);

            if (env.validateExuberantCtags()) {
View Full Code Here

            executor = new Executor(new String[]{"mkdir", "-p", repository.getSourceRoot() + "/testBug11896"});
            executor.exec(true);

            executor = new Executor(new String[]{"mkfifo", repository.getSourceRoot() + "/testBug11896/FIFO"});
            executor.exec(true);

            if (env.validateExuberantCtags()) {
                Project project = new Project();
                project.setPath("/testBug11896");
                IndexDatabase idb = new IndexDatabase(project);
View Full Code Here

    private void importHgChangeset(File reposRoot, String changesetFile) {
        String[] cmdargs = {
            MercurialRepository.CMD_FALLBACK, "import", changesetFile
        };
        Executor exec = new Executor(Arrays.asList(cmdargs), reposRoot);
        int exitCode = exec.exec();
        if (exitCode != 0) {
            fail("hg import failed." +
                    "\nexit code: " + exitCode +
                    "\nstdout:\n" + exec.getOutputString() +
                    "\nstderr:\n" + exec.getErrorString());
View Full Code Here

            try {
                /*
                 * Errors will be logged, so not bothering to add to the output.
                 */
                Executor executor = repository.getHistoryLogExecutor(file);
                executor.exec(true, this);

                /*
                 * Try again because there was no 'keep' history.
                 */
                if (!foundHistory) {
View Full Code Here

                /*
                 * Try again because there was no 'keep' history.
                 */
                if (!foundHistory) {
                    executor = repository.getHistoryLogExecutor(file);
                    executor.exec(true, this);
                }
            } catch (IOException e) {
                throw new HistoryException(
                        "Failed to get history for: \""
                        + file.getAbsolutePath() + "\"" + e);
View Full Code Here

        }

        cmd.add(path);

        Executor executor = new Executor(cmd, file.getParentFile());
        executor.exec();
        try (BufferedReader reader = new BufferedReader(executor.getOutputReader())) {
            String line;
            int lineno = 0;
            try {
                while ((line = reader.readLine()) != null) {
View Full Code Here

        cmd.add(this.cmd);
        cmd.add("stat");
        cmd.add("-fe");
        cmd.add(basename);
        Executor executor = new Executor(cmd, directory);
        executor.exec();

        String elementID = null;

        try (BufferedReader info = new BufferedReader(executor.getOutputReader())) {
            String line = info.readLine();
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.