MCPcopy Create free account
hub / github.com/git/git / p4_has_command

Function p4_has_command

git-p4.py:416–424  ·  view source on GitHub ↗

Ask p4 for help on this command. If it returns an error, the command does not exist in this version of p4.

(cmd)

Source from the content-addressed store, hash-verified

414
415
416def p4_has_command(cmd):
417 """Ask p4 for help on this command. If it returns an error, the command
418 does not exist in this version of p4.
419 """
420 real_cmd = p4_build_cmd(["help", cmd])
421 p = subprocess.Popen(real_cmd, stdout=subprocess.PIPE,
422 stderr=subprocess.PIPE)
423 p.communicate()
424 return p.returncode == 0
425
426
427def p4_has_move_command():

Callers 1

p4_has_move_commandFunction · 0.85

Calls 1

p4_build_cmdFunction · 0.85

Tested by

no test coverage detected