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
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 '')
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 '')
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 '')
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 '')