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

when I try to add files to the changelist I keep getting error files not in files(s) not in client view

When I am trying to add files from the command line I get the error saying files not in client view what does it mean ? createdCLNumber = p4.save_change(changeList)[0].split()[1] >>> createdCLNumber '1157539' >>> p4.run_add("-c", createdCLNumber,…
Ciasto piekarz
  • 7,853
  • 18
  • 101
  • 197
0
votes
1 answer

Undoing changelist in P4Python

I have an issue with undoing changes in Perforce using p4python given that I have sumitted the changelist that I now want to undo. My idea is first to create a changelist and then run the undo. However, Iam doing something wrong and the file doesnt…
Payam30
  • 689
  • 1
  • 5
  • 20
0
votes
2 answers

P4Python does not check out the file in Perforce

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…
Payam30
  • 689
  • 1
  • 5
  • 20
0
votes
0 answers

Using P4Python, how can I use environment variables to access different clients across different computers/workspaces?

I'm working with Perforce and have a script to check out various files depending on my current task. The issue is that I'd like to store environment variables for the port, user and client so that I don't have to change my script each time it is run…
0
votes
3 answers

How do I install p4python on macOS 10.15 Catalina?

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…
Synck
  • 2,727
  • 22
  • 20
0
votes
0 answers

How to set config variables using p4python

I have tried doing below: p4.run('configure', 'set', 'auth.ldap.timeout=30') However, when I try below, I dont see this configuration set. p4.run('configure', 'show') Please let me know if i am missing something.
0
votes
1 answer

How to fix P4 client errors after integrating p4python in code?

I have aligned my client perforce and view perforce with all the files and links. Though, while connected through my p4python code base, then it's not able to get/ fetch the updated paths in the view. Hence while integrating some code from perforce…
Indra
  • 1
  • 2
0
votes
0 answers

P4Python Adding new file - [Error]: Null directory (//) not allowed in //workspaceXXXX//xxxx.txt

I am trying to add new to perforce. I getting error as below [Error]: "Null directory (//) not allowed in '//workspaceXXXX//xxxx.txt'." What i am doing: 1) I create a workspace self.p4.client = "workspaceXXXX" client =…
Rachan R K
  • 211
  • 2
  • 13
0
votes
2 answers

P4Python run method does not work on empty folder

I want to search a Perforce depot for files. I do this from a python script and use the p4python library command: list = p4.run("files", "//mypath/myfolder/*") This works fine as long as myfolder contains some files. I get a python list as a return…
0
votes
1 answer

P4 python connection broken SSL error

I'm already using P4V client and everything is fine, no connection error. Error: I've got some SSL errors when I try to execute p4 command from Python. And it's random, If i re run the script, error isnt thrown everytime From the client, the output…
Marcassin
  • 1,386
  • 1
  • 11
  • 21
0
votes
1 answer

How to check whether given Changelist is backout or not in child branch?

Basically we have one CL ( e.g.1000000) that is integrated in one master branch as well as in all of its child branch . Now suppose that CL 1000000 is backout in master branch . Is there any way to check whether this changes are backed out in all of…
0
votes
2 answers

p4python: perforce: giving sync command throwing error-: rename: failed to rename after 10 attempts

i am syncing my workspace file to a previous revision by using sync command as : p4_object.run("sync", "-f", "--parallel=0", "c:\Users\agrahari\Desktop\give\first\test_2.txt#2") it is throwing error: rename: failed to rename…
manish
  • 43
  • 2
  • 7
0
votes
1 answer

Cannot checkout file and associate to a pending changelist using p4 python

try: # Catch exceptions with try/except p4.connect() # Connect to the Perforce Server p4.run_login() client = p4.fetch_client() client['View'] = ['//TestPublic/Extern/firanl/... //mitica/TestPublic/Extern/firanl/...'] # workspace…
0
votes
1 answer

P4Python: use multiple threads that request perforce information at the same time

I've been working on a "crawler" of sorts that goes through our repository, and lists directories and files as it goes. For every directory it enounters, it creates a thread that does the same for that directory and so on, recursively. Effectively…
MaVCArt
  • 745
  • 8
  • 21
0
votes
1 answer

Syncing code to a label using P4Python

I am trying to sync code to a particular label in the depot using the Python script with help of Python API provided by Perforce. Any help would be appreciated.