perforce

Where can I find best practice info on SCM (perforce)

BLUF: I am looking for SCM best practices for large / complex java based project. DETAILS: In my environment we have a single production DB cluster that is being accessed concurrently by a variety of different web applications. Our code is structured so that common functionality is extracted into separate projects and the resultant ja...

Perforce - submit only files open for branch, not files open for edit

Quite often when I'm working in a branch in Perforce, I realise I need a file I didn't branch when I initially branched. So, I add the file to my client, run p4 integrate -b branchname, then p4 submit. Thing that bugs me is that I then need to go through the list of files for submit, and remove all entries that are open for edit. I ca...

How to prevent people from editing other's workspace options in Perforce ?

Hi, I am new to Perforce. There seems to be a a misconfiguration in our current Server, as anybody can change anyone else's workspace options. Does anyone know how to quickly fix that problem ? Thanks, Thomas ...

How to force a confirmation step before certain perforce command ?

Hi, I am new to Perforce. Is it possible in P4 to have a confirmation step before using some deletion command. E.g.: deleting a workspace has no confirmation step ( P4 client -d workspace_name ) deleting label has no confirmation step ( P4 label -d label_name) Which I found dangerous. Thanks, Thomas ...

What are your Perforce practices for view/branches ?

Hi, I am new to Perforce. What would you consider P4 best practices in terms of views/branches. Would you create 1 view with access to many branches, or would you create 1 view / branch ? I am not sure switching between views/worspaces is that easy in Perforce. Thanks, Thomas ...

Perforce P4J getting change lists for a directory

Hi, 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<P4JFileSpec> fileSpec = P4JFileSpecBuilder.makeFileSpecList(new String[]{"//depot/se/mydir"}); //a valid directory if(P4JFileSpecBuilder.getValidFileSpecs(fileSpec).isEmpty()) { ...

Easy way to create perforce changelist with multiple filespecs

I wish to submit a changelist with multiple filespecs, e.g. ...this... ...file.h ...theother.... Perforce won't let me. I could create a changelist from a file but I do want a chance to review the files and enter the comment. This is for a command-line solution. ...

How do you quickly find/delete all empty changelists in Perforce ?

Hi, I was wondering what could be the point in trying to delete committed changelists, because a committed changelist is not supposed to be empty. But then I am playing with the tutorial depot, and using the obliterate command on a whole branch, I can see there are situation where you can end up with empty committed changelists (that n...

What is a branch specification in Perforce ?

Hi, it seems to me that keeping the "branch" object in Perforce may not be entirely necessary after an integration has been submitted. I.e. the "real" branch, is actually a folder path, and even if you delete the branch object that was created to perform the integ, the folder path is still valid, and all the files in this path are stil...

Local commits pushing to a central server

Hello, At work we use perforce and are encouraged to make regular commits to it (something I am fine with). However, I'd like to run something like mercurial so I can locally commit stuff that is work in progress and doesn't necessarily compile/run and then from this do my regular commits to the central perforce server. My question her...

How to share files in a depot

We are using Perforce. In the depot are some projects that have their own main/branches/releases sub folders. There are also some resource files (png, mp3 and so on) that are needed (shared) for some of the different projects. Those don't have the main/branches/structure. Currently they are stored in a seperat folder in the depot that is...

Is there an equivalent to flashbake (easy version control) for Perforce or Subversion

Flashbake is introduced by Cory Doctorow and discussed here and its project page is here. It hides most of the complexity of git and allows simple configuration. I'm looking for something for Perforce since I have 10s of GB growing to 100+ GB in the next year of a few MB files (pictures mainly) which might not be ideal for git. I also...

git-p4 and pulling from other repos

I have a laptop and a desktop, for which I'm trying to learn to use git to manage my work against a perforce repository. I'm using git-p4 successfully on the desktop, and can use it successfully on the laptop as well, in isolation. However, one of the things I'd like to be able to do is to "pull" or "push" changes from the laptop to de...

How to use ant to check for tags (TODO: etc) in java source

it's common to see something like this in code, hopefully only during development: //XXX: not in production! String password = "hello"; // getActualPassword(...); ... catch(Exception e) { /* TODO: Auto-generated catch block*/ } I would like ant to be able to a) warn (on TODO: / FIXME: tags) or fail (on XXX: or simmilar) The build serv...

Tools for Ruby on Rails projects in Perforce

Hi, we are using Perforce for source configuration management and I have just started to hack some small stuff in Ruby on Rails. As Perforce follows the "check-out before modify" paradigm, and RoR expects to have all files writable for the various script/ stuff, do you know/use any helpers to make RoR work together with Perforce? I know ...

IntelliJ community Perforce plug-in

I used to love using IntelliJ but my new company doesn't spend money on IDEs. Now with the release of IntelliJ Community Edition, the only obstacle I have is that my company uses Perforce. Does anyone know if there are Perforce plug-ins that work with the Community Edition? ...

perforce: how to propogate unsubmitted changes

I have made some changes in one perforce client, but haven't submitted them. I want to propagate these changes to another perforce client, without submitting the changes in the first client. Is it possible? If yes how? Thanks ...

Perforce: Re-reverse-integrating a changelist

(I've already asked this on SU; while I appreciate the Tumbleweed badge there, I'd prefer an answer...) I have a reverse integration pending that I'd like to perform again on the files that are checked out for the integration. The use case is when I've made a change in the integration source and I'd like to propagate it to the integrati...

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

Vim auto commands: writing a read-only file?

I'm using Perforce with Vim on Windows. I currently have an auto command set up to open a read-only file for edit when changing it: au FileChangedRO * !p4 edit <afile> Is there any way to set up a similar auto command to execute p4 edit when attempting to write a read-only file rather than edit it? ...