MCPcopy Create free account
hub / github.com/carbonengine/trinity / _p4

Method _p4

shadercompiler/pythonBuildScript/build.py:304–312  ·  view source on GitHub ↗
(self, action, paths)

Source from the content-addressed store, hash-verified

302 return match.group(1)
303
304 def _p4(self, action, paths):
305 args = ['p4', '-b', str(len(paths) + 1), '-x', '-', action]
306 logging.debug(f'Running {" ".join(args)}')
307 p = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
308 stdout, stderr = p.communicate('\n'.join(paths).encode())
309 logging.debug(f'p4 output: stdout: ({stdout.decode()}), stderr: ({stderr.decode()})')
310 if p.returncode != 0:
311 logging.error(f'Error when running p4 {action}: {stderr.decode()}')
312 raise subprocess.CalledProcessError(p.returncode, 'p4', stderr.decode())
313
314
315def str2bool(v):

Callers 3

pre_buildMethod · 0.95
submitMethod · 0.95
_revertMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected