perforce

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...

perforce: create a local backup of current pendinglist

hello, in perforce, i have a pending list with some changed files. now i want to revert to the base, but without loosing my changes, so i want to back them up somewhere. like saving the DIFFs of each file. at a later time, i want to restore those changes and continue my work. is this possible? if so, how? thanks! ...

Faster clean Perforce sync over VPN

I have to regularly do a clean Perforce sync to new hardware/virtual machines over the VPN. This can take hours as the project is quite large. Is there a way that I can simply copy an up-to-date tree from an existing client and tell Perforce to use this tree? ...

Can a script be automated after a commit on Perforce?

We use Perforce at work, and routinely keep software projects in the repository. In general creators follow the normal Perforce flow, BUT we also have a class of users, who doesn't have any need to edit the files but only read them. Currently we use P4Web but that requires the user so download each file individually to reassemble the p...

using perforce with team foundation server

Does Team Foundation Server 2008 or upcoming 2010 work with perforce as the SCM tool? I haven't been able to find any documentation on the web indicating whether or not this configuration is supported? I apologize if this question has been answered elsewhere. ...

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...

In Perforce command line, how to diff a file reopened for add?

Suppose you open a file for branch to another place (without submitting), and then reopen it for add and make some edits. I would like to diff this edited version against its branch source in a script. p4 diff2 is no good because one of the versions is in the client. p4 diff is no good because it can only diff against the "correspondin...

Eclipse + Perforce: Is it possible to avoid interrupting a build to check out a file?

This may be somewhat obscure but I've been happily using Eclipse + Perfoce/P4WSAD for over a year now and have thus far been unable to figure this out myself. I often start a build and let it run in the background while I continue to edit source files. The problem occurs when I try to edit a file that is not checked out from perforce. ...

Running hg convert on Linux

I would like to convert a remote Perforce repository into a Mercurial repository on Linux. So I have installed Python and Mercurial on a Linux box. Then I test few hg (Mercurial's drive program) commands. All are working fine. Now without creating any hg repository on the Linux box I want to run hg convert on Linux, so that a Mercurial...

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? ...

How can you safely use Perforce $Revision$ in LaTeX document?

I'd like to include Perforce's $Revision$ keyword in my LaTeX document. However, the presence of # seems to mess thing up. For example, if you have something like this: \cfoot{$Revision: #8 $} you end up with an error like "Illegal parameter number in definition of \temp@a". I did some searching and found packages (such as the L...

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...

How do I precache files on a perfoce proxy server in order to obtain some decent speed?

Perforce proxy does cache files only when a user does sync them so if you are the single user of a perforce proxy that is syncing some locations you will gain almost nothing from it. The question is how to make perforce cache the files for you? ...

Integrating moved files in perforce

Say I created a branch in perforce of our codebase. Here is the branch spec: //depot/code/main/... //depot/code/branch/... Then, in the branch, say I move the branched file a.txt -> b.txt using p4 integrate //depot/code/branch/a.txt //depot/code/branch/b.txt p4 delete //depot/code/branch/a.txt Now, let's say some changes are made t...

How do I rename a branch specification in perforce?

I would like to know how to rename a branch specification (aka, a "branch mapping") in perforce. The P4V client does not allow you to edit the branch spec name. Is it safe to just add another branch specification, copy the settings and remove the old one? ...

Reviving a deleted file for use in my workspace

Greetings We run perforce with several users. Each user has their own development website that shows files in their workspace. This is great for making and viewing changes to webpages before submitting them. Sometime ago, we deleted a few pages in Perforce. I would like to revive these pages, but not to make them visible on our live ...

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,...

List of Current Folder files ONLY?

Hello I'm trying to get Perforce syntax to obtain (for example using "fstat") list of files only in given folder (depot), without rubbish from all sub-folders. But I was not able to find anything in the docs, nothing related when using Google, even experimenting with ".", ".../." etc. lead me to nowhere... Is that because it's not possi...

Perforce -- generate a diff including added files?

When I use "p4 diff", it ignores files that I have open for add. Is it possible to generate a diff that includes added files as well as changed files? ...