Questions tagged [p4python]

p4python is a Python interface to Perforce, a source-code control system.

P4Python: Perforce's API for Python allows you to write Python scripts that directly execute Perforce commands. Documentation can be found here: Helix Core P4Python Developer Guide.

98 questions
0
votes
1 answer

How to install p4python on Cygwin64

Trying to install p4python on Cygwin fails with $pip install p4python [... logs ...] File "/tmp/pip-install-6mn3hyn3/p4python_9e95a104710b449a90a68bc227a2ee69/setup.py", line 292, in run raise Exception("Parameter --ssl is…
Zois Tasoulas
  • 1,242
  • 1
  • 11
  • 23
0
votes
1 answer

P4Python cannot use progress class

I don’t know why this will raise AttributeError, but in document it seems right https://www.perforce.com/manuals/p4python/Content/P4Python/python.p4_progress.html from P4 import P4, P4Exception, Progress from tqdm import tqdm class…
Hanerx
  • 3
  • 2
0
votes
0 answers

P4Python - getting affected files given changelist number

so far I have been using p4.run("files", "@=" + ) to find the affected files per CL. However, I'm having the issue that for certain CLs the output shows 'no files found'. When I run the p4 files with the same CL in my command line it shows that…
0
votes
0 answers

Trying to Migrate P4V data to git using P4Python

Here I am trying to migrate my perforce data. The code is below: from P4 import P4, P4Exception p4 = P4() p4.port = "localhost:1666" p4.user = "xyz" p4.client = "xyz" p4.connect() p4.run("edit", "//Depot/AllFiles/") Here I need add origin, and the…
Ambika Sharma
  • 11
  • 1
  • 1
  • 5
0
votes
1 answer

p4python check if any actions are being run

I have a threaded timer running to disconnect from p4 after a certain amount of time (because perforce will auto timeout in our application and fails to reconnect). I want to make sure that I do not disconnect if any long action is running (like…
ghost654
  • 161
  • 2
  • 18
0
votes
1 answer

Tkinter Messagebox doesn´t appear when called in perforce trigger script

I am writing a script in Python 3.8.7 using the P4Python interface for our Perforce server. There are some circumstances where I don´t want to abort the submit of changes, but I need to inform the user about some information. For that purpose I…
Kev1990
  • 3
  • 2
0
votes
1 answer

How to get all the mainline streams of a project in Perforce

I need to get all the mainline streams of a project. I tried this in the terminal p4 streams -F "Type=mainline" //someproject and got the following error, //ConMod - must refer to client 'dummy'. How can I resolve this and is there any better way.…
0
votes
1 answer

P4Python trouble deleting client/Workspace

I am trying to delete a client but I get the following error : "Identifiers too long. Must not be longer than 1024 bytes of UTF-8." My code goes smth like this: try: client=p4.fetch_client("-S", stream_root, client_name) client._root =…
0
votes
1 answer

How can I download/sync file in P4V/p4python locally?

I am trying to download/sync locally into my Perforce workspace a file from another stream of my P4V, I've tried p4.run_sync("-f", "//depot-of-file") in my python script but it doesn't work. Any idea?
0
votes
1 answer

p4python windows x64 build link errors

I've been trying to build p4python on 64 bit for windows, but I am getting the following link errors: Creating library build\temp.win-amd64-2.7\Release\P4API.lib and object build\temp.win-amd64-2.7\Release\P4API.exp librpc.lib(netssltransport.obj)…
Kotsuki
  • 61
  • 1
  • 3
0
votes
1 answer

using p4python module create a patch between two changelist

I am trying to create a patch between two changelist using p4python. I am not getting any success. Below is my attempt: $ vi patchp4.py from P4 import P4,P4Exception p4 = p4() #Performed P4 Connection if p4.connected(): …
0
votes
1 answer

Sending json collections to Perforce depot

I am trying to send json collections from a Flask server to remote Perforce depot using P4Python. Is there a way to do that through Python?
0
votes
1 answer

In P4, how do i check if a change submitted to one branch is also submitted to another branch using command

I want to find out there is a p4 command that can find cl submitted in a depot branch from a cl submitted in another depot branch. like - if CL 123 was submitted to branch //code/v1.0/files/... and same code changes were also submitted to another…
0
votes
1 answer

How can I checkout a file from a changelist on perforce server using Perforce Python API's (p4python)

Originally I am trying to implement a customized python based linter to help me out with the lexical code analysis. This linter requires me to point to the directory where the scripts or code files (which needed to be analyzed) resides. The original…
0
votes
1 answer

No files to submit even after I add them to perforce changlist

I get a changelist number and I am able to add the files to the changelist >>> createdCLNumber '1157545' >>> p4.run_add("-c", createdCLNumber,…
Ciasto piekarz
  • 7,853
  • 18
  • 101
  • 197