p4

Is it possible to set permissions in Perforce such that a user cannot integrate into a certain area of the depot?

In a perforce depot I have an area containing stable branches, and an area containing unstable branches. I want to control a users ability to create new branches (using p4 integrate) within the stable area. So for example my depot is laid out like so: //depot /stable stable_branch_1/... stable_branch_2...

How to parse Perforce "pickle" binary output?

Perforce command line has a special switch, -G, that supposedly causes its output to be machine readable, using python's "pickle" serialization format. Is this actually so, in general? For example, consider the output of p4 -G diff -duw3 <file1> <file2> <file3>. The output, as far as I can tell, is a sequence of: pickle, raw diff, pickl...

moving commits from unrelated repository in git, git-p4

I've been learning git and git-p4 and have ended up in a situation where I can't 'git-p4 submit' anymore; patches don't cleanly apply. I can always re-clone the p4 depot and copy my new changes over the top and 'git-p4 submit', but I'd like to maintain my commit history in the new git repository. Given that the old and new repositories...

open/edit all files of depot using p4 add/edit command

Is it possible to add all new files using p4 add command. Actually I do not want to pass each file names or any wild chard pattern with p4 add command. same question for p4 edit operation. Edit all files which are modified at client side. Any suggestions? ...

git-p4 is eating my image files

So, I can import from p4 using git-p4 without any problem. Everything seems to work, but my PNG files (and perhaps others) are getting corrupted. I've read about gitattributes and the line ending issues, but nothing I do seems to change the end result. Broken images. My attributes file is: *.png binary Any ideas? As I understand it...

How to perform p4 submit operation without passing description inside the p4 submit form.

I have p4 client workspace on Linux machine. I added/edited few files in my client space and then try to submit those changes to perforce server. I did below steps but could not succeed: p4 submit -d "test" (same command works on windows machine) when I tried with just p4 submit then it open p4 submit form and then I replaced [enter...

Anything similar to git-svn for Perforce?

Is there a tool that allows me to gain the same functionality as git-svn for Perforce? I saw git-p4 on github but it looks like this imports source from a git repo to a Perforce repo. Does it go the other way around? Is it intended to be used as a frequent tool or just a 1 time, import-only type of tool? Scenario: I am a contractor,...

How do I make the perforce command line view the same as the P4Win view

I've written some python tools which work with the p4 command line to work on files I have opened in P4Win. However it seems like the p4 view can become different to the P4Win view. I'm not quite sure how to make them the same. ...

how to display list of updating files in p4v

While I sync code using p4v client, the Log window does not show the list of files which are updated. Is there any way to do that? p4win client does show the list though. Thank you. ...

Convert p4 move to p4 integrate

Is there a simple way to convert a (large) list of p4 moves to p4 integrates? There are a lot of pending modifications to the moved files, so just reverting and instead integrating isn't an option. Perforce won't let you just revert the deleted file (which would leave the desired integration behind). ...

How do I delete a file from depot, but leave local copy in tact?

I'm trying to learn Perforce and want to delete a file from the depot(easy to do with p4 delete, p4 submit), but that deletes it from the client machine dir structure as well. I want to keep my local file in my directory intact. The only way I can see to do this would be to move it out of the hierarchy that is under Perforce control ...

Perforce auto resolve (on a pending changelist) from the command line?

I want to safe resolve all the files in a pending changelist. Currently, the only way I know to do this is to pass p4 a list of files. SET CHANGE_NUMBER=default SET CHANGE_FILES=files.txt DEL %CHANGE_FILES% for /f "tokens=1 delims=#" %%a in ('p4 opened -c %CHANGE_NUMBER%') DO ECHO %%a>>%CHANGE_FILES% p4 -x %CHANGE_FILES% resolve -as ...

Perforce visual diff of a branched file (p4 diff2 with external diff)

I'd like see a visual diff of a branched file. So I do this p4 diff2 -b branchname main.cpp One problem... it's not visual and external diff isn't supported. http://www.perforce.com/perforce/doc.current/manuals/cmdref/diff2.html p4 diff2 does not use the diff program specified by the environment variable P4DIFF. The diff algorithm ...

Is there a script that provides the equivalent to git-bisect for Perforce (p4)?

The git-bisect provides hooks to perform a binary search on revisions and figure out which change broke the design. Is there an equivalent script for Perforce? I did SO and Google searches with no luck. Update Mar 1 2010: As Douglas Leeder correctly pointed out, this is easy with a linear history. However we do have multiple branches...

Show p4 diff2 for new files between two revisions

I am using the command line tool: p4.exe. When I try to execute the following command: p4 diff2 -u ....@10 ....@11 It shows the difference in those files only which were present in change 10 as well as change 11. However, I want to see the difference in those files as well which were added in change 11. Any ideas on how this can be ...

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 exception is thrown, but one IFileSpec comes back in the result, and it complains that t...

Perforce - is it possible to directly submit open files on a different branch?

I'm using perforce for versioning control. Let's say I am working on a file in the main branch: //main/xx.cs (it's open for edit) In the mean time, //main gets branched to //v1 and then //main gets locked. Is there a way I can integrate my local changes in //main/xx.cs directly to //v1/xx.cs ? ...

Perforce tasks for MS Build

Are there any community MSBuild tasks for Perforce (e.g. even just basic syncing)? Neither the MSBuild Community tasks or MSBuildExtenstion pack seem to have any. ...

understanding P4 describe / diff summary (-ds) option

Greetings P4 folks, I am trying to understand the P4 describe -ds output. I am assuming that this is the same as the p4 diff -ds output. Here is an example of the "Differences ..." block: ==== //depot/Groups/mygroup/trunk/main/FooBar.java#5 (text) ==== add 7 chunks 13 lines deleted 1 chunks 1 lines changed 16 chunks 92 / 118 lines ~ ...

Mercurial Pull Error

I am new to the dvcs world. My company uses perforce and I'm not a fan so I thought I'd try to use mercurial as a front end. I set it up on a windows machine with TortiseHG, enabled the Perfarce extension, did a small checkout (limiting the target revision) and pulled for the rest. This seemed to be more robust than clone alone. This...