Example #1
0
    def shell(self, cmdline, data=None, environ=None, shell=False, timeout=None,
            merge_output=False, passthrough=True):

        if passthrough:
            passthrough = self.verbose

        process = Process(cmdline, environ, shell, merge_output, passthrough)
        process.run(self, data, timeout)
        return process
Example #2
0
    def _run_command(self, tokens, cwd=True, passthrough=False, root=None, cmd='svn'):
        process = Process([cmd] + tokens)
        if passthrough and self.runtime and self.runtime.verbose:
            process.merge_output = True
            process.passthrough = True

        root = root or self.root
        if process(runtime=self.runtime, cwd=root if cwd else None) == 0:
            return process
        else:
            raise RuntimeError(process.stderr or '')
Example #3
0
    def _run_command(self, tokens, cwd=True, passthrough=False, root=None, cmd='svn'):
        process = Process([cmd] + tokens)
        if passthrough and self.runtime and self.runtime.verbose:
            process.merge_output = True
            process.passthrough = True

        root = root or self.root
        if process(runtime=self.runtime, cwd=root if cwd else None) == 0:
            return process
        else:
            raise RuntimeError(process.stderr or '')
Example #4
0
    def _run_command(self, tokens, cwd=True, passthrough=False, root=None, passive=False):
        process = Process(['git'] + tokens)
        if passthrough and self.runtime and self.runtime.verbose:
            process.merge_output = True
            process.passthrough = True

        root = root or self.root
        returncode = process(runtime=self.runtime, cwd=(root if cwd else None))
        if passive or returncode == 0:
            return process
        else:
            raise RuntimeError(process.stderr or '')
Example #5
0
    def _run_command(self, tokens, cwd=True, passthrough=False, root=None, passive=False):
        process = Process(['git'] + tokens)
        if passthrough and self.runtime and self.runtime.verbose:
            process.merge_output = True
            process.passthrough = True

        root = root or self.root
        returncode = process(runtime=self.runtime, cwd=(root if cwd else None))
        if passive or returncode == 0:
            return process
        else:
            raise RuntimeError(process.stderr or '')
Example #6
0
    def shell(self,
              cmdline,
              data=None,
              environ=None,
              shell=False,
              timeout=None,
              merge_output=False,
              passthrough=True):

        if passthrough:
            passthrough = self.verbose

        process = Process(cmdline, environ, shell, merge_output, passthrough)
        process.run(self, data, timeout)
        return process
Example #7
0
File: git.py Project: esho/bake
    def execute(self, tokens, cwd=True, passthrough=False, root=None, passive=False):
        root = root or self.root
        if cwd:
            cwd = str(root)
        else:
            cwd = None

        process = Process([self.binary] + tokens)
        if passthrough and self.runtime and self.runtime.verbose:
            process.merge_output = True
            process.passthrough = True

        returncode = process(runtime=self.runtime, cwd=cwd)
        if passive or returncode == 0:
            return process
        else:
            raise RuntimeError(process.stderr or '')
Example #8
0
    def execute(self, tokens, cwd=True):
        if cwd:
            cwd = str(self.root)
        else:
            cwd = None

        process = Process([self.binary] + tokens)
        if process(cwd=cwd) == 0:
            return process
        else:
            raise RuntimeError(process.stderr or '')