p4python

P4Python does not check out the file in Perforce

人走茶凉 提交于 2021-01-29 10:23:28
问题 I have following piece of code. I'm trying to check out two files from Perforce and put them in a changelist. But run_add does not check the files out. The only thing I see in Perforce is a empty changelist with no files in it. """ Checks out files from workspace using P4""" files = ['analyse-location.cfg', 'CMakeLists.txt'] p4 = P4() # Connect and disconnect if (p4.connected()): p4.disconnect() p4.port = portp4 p4.user = usernameP4 p4.password = passwordP4 p4.client = clientP4 try: p4

How do I install p4python on macOS 10.15 Catalina?

我的未来我决定 提交于 2020-05-17 06:48:06
问题 I get an error when trying to install p4python on macOS 10.15 Catalina. Command pip install p4python . Cannot build P4Python without SSL support Exception: Parameter –ssl is needed When I try to install an older version, I also get an error. Command pip install p4python==2018.2.1743033 . Cannot match OpenSSL Version string ‘LibreSSL 2.8.3’ Cannot build P4Python without SSL support The second error seems to be caused by macOS using LibreSSL instead of OpenSSL. Any ideas how to get it installed

p4python: get diff2 form depot

拜拜、爱过 提交于 2020-01-04 03:15:32
问题 I want to retrieve output of the next command (where p4 is standard perforce client): p4 diff2 //depot/...#1 //depot/...#2 In terminal it is producing something like this: ==== //depot/bin/build.sh#1 (xtext) - //depot/bin/build.sh#2 (xtext) ==== content 1a2 > #added something 2 9c10 < fi--- > fi ==== //depot/bin/README#1 - <none> === ==== //depot/bin/status_ok#1 - <none> === Let's assume that I have next script in python: from P4 import P4 p4 = P4() p4.port = "1818" p4.host = "localhost" p4

How to use p4tickets with p4python

本小妞迷上赌 提交于 2019-12-24 20:21:39
问题 There's a large number of examples of using your user/pass as credentials to connect to the p4 server using p4python, but very little describing how to use a p4ticket. It's unclear how to use a p4tickets file with p4python. 回答1: It turns out the perforce documentation is really, really precise. The documentation basically says that if the user isn't logged in, then you have to provide a password to login. The flip side of that coin is that if the user is logged in then no password is needed .

need equivalent python command for p4 describe

痴心易碎 提交于 2019-12-24 13:42:18
问题 I need equivalent for p4 describe #cl , in p4 python. However, running the same command p4.run_describe("#cl") using p4python. I get dict: [{'client': 'NonDev1408-Dev', 'digest': ['E41FFB100C73F7B443EE8DE7A0DD966C'], 'desc': 'Merging //ATTE/1507_SWP122 to OCX Main (//ATTE/1408-Dev)\n', 'type': ['text'], 'fileSize': ['33067'], 'status': 'submitted', 'rev': ['49'], 'depotFile': ['//ATTE/1408-Dev/cust/oms/bb/cord9src/src/main/java/amdocs/oms/cust/osact/foundation/NegotiateServiceConnection.java'