Questions tagged [p4java]
32 questions
3
votes
0 answers
How to get the list of files from perforce in groovy using P4Java
I am trying to get the list of files from a certain folder in Groovy and the Filelist which is returned is null
The code which I am trying is:
//I am able to get a successful connection
def p4Server = getp4connection()
def filePath =…

Gagandeep Chhabda
- 41
- 4
2
votes
1 answer
Using p4 zip and unzip to export files from one perforce server to another
I was trying to export files along with their revision history inside my depot folder from 2015.2 to 2019 perforce server.Also , I would want perforce to create new user on my new server corresponding to the commiter/submitter on my original 2015…

95_96
- 341
- 2
- 12
2
votes
1 answer
p4 changes equivalent for P4Java
I want to get the CLs that are part of all intermediate builds between two build labels. That can be achieved on the command line using :
p4 changes "DEPOT_DIR_STRUCT/...@>BUILD_LBL_1,@<=BUILD_LBL_2"
Is there a P4J equivalent of this ?

anuvab1911
- 311
- 3
- 10
2
votes
1 answer
Gradle P4Java java.net.SocketTimeoutException: Read timed out
I am using P4Java library in my build.gradle file to sync a large zip file (>200MB) residing at a remote Perforce repository but I am encountering a "java.net.SocketTimeoutException: Read timed out" error either during the sync process or (mostly)…

Abhishek Bhadange
- 23
- 7
2
votes
1 answer
sync via p4java api
What fields should be set in the FileSpec object passed into IClient.sync in the perforce java API?
I've set:
The pathname passed to the constructor to the abs path/... of the local workspace
setClient(myIClient)
the action to FileAction.SYNC
No…

bmargulies
- 97,814
- 39
- 186
- 310
1
vote
1 answer
How to find unresolved files using the Perforce p4java library?
Using the p4java library from Perforce (http://kb.perforce.com/article/1086/p4java-api), I'm trying to find out what files in a changelist are unresolved and need to be resolved before I can submit them.
IChangelist changelist =…

Jasper Roel
- 13
- 3
1
vote
1 answer
Using P4JAVA with JDK6 on Unix: Client.sync() ignores the execute bit
Using p4java-2011.1.297684 with Java 6 on Solaris
Running p4 sync -f on the given file will sync the file w/ the execute bit set correctly.
Calling client.sync(List, true, false, false, false) does NOT set the execute bit.
I also tried implementing…

John
- 127
- 5
1
vote
1 answer
Perforce Server 2020 Giving Problems On Multiple Logins
On migrating from 2015 perforce server to 2019, i was facing parrallel login issues from Java API for P4, P4JAVA.
On 2019 server ,if multiple IServer objects( say server1 and server2) made connection to the server using same userId, then logging…

95_96
- 341
- 2
- 12
1
vote
1 answer
P4JAVA Equivalent to p4 changes -m1 @workspace
I need to find out what is the last revision Synced to my workspace but using the P4JAVA API, Any help??

DevOops
- 276
- 2
- 8
- 20
1
vote
2 answers
How to clone p4 repo using p4java?
I'm trying to clone the P4 repository in a Java program, using P4java for the same.
How can I clone entire P4 repository at once?, Instead of reading one file at a time (as shown below) ?
fileList =…

Manjunath Bhavi
- 51
- 6
1
vote
0 answers
Perforce - Latin characters in filenames creates issue while getting file history
I have renamed a file (on windows host using p4v client) to CDNÍs.txt (I with acute. Now when i try to read this file using p4v on Mac host. I get the file name as CDN�s.txt and p4v fails to load the history of this file.
Similar is the case with…

Chunkyy Garg
- 107
- 1
- 5
1
vote
2 answers
How to sync to a label with p4java
I've seen examples online of using Perforce's p4java api to sync a client workspace with the latest files. Eg:
public List sync(List fileSpecs,
boolean forceUpdate,
boolean…

Gurce
- 592
- 7
- 18
1
vote
1 answer
Appending perforce permission table through java results in blank permission table
I am trying to grant permission to a group on a folder in Perforce. However, the permission table that is created/updated from Java in Perforce is empty.
Following are the steps that I do -
//Get the server object.
IOptionsServer server =…

JHS
- 7,761
- 2
- 29
- 53
1
vote
1 answer
Perforce P4J getting change lists for a directory
I am trying to get the changelists on a directory using P4J. Here is the snippet I used,
P4JServer server = //get a valid server using username/pwd
List fileSpec = P4JFileSpecBuilder.makeFileSpecList(new String[]{"//depot/se/mydir"});…

Kannan Ekanath
- 16,759
- 22
- 75
- 101
1
vote
0 answers
P4Java sync to head revision
The Sync API in P4Java is pretty straightforward right?
client.sync(FileSpecBuilder.makeFileSpecList("//depot/test/..."), new SyncOptions(forcesync, false, false, false));
The problem is that, when "forcesync" is true, it works well. However, when…

Michael Lin
- 81
- 3