views:

710

answers:

10

A colleague of mine has become excited about the possibilities with PerForce (we basically need an abillity to logistically group patches and changes, and having the SCM support this natively would be very nice). We currently use CVS and are open to all posibillities. We are only few developers who use plain Eclipse and run builds using ant scripts.

Before jumping into the water, I'd like to hear others who on technical reasons can say "Good idea" or "Bad idea". I'd also like to hear how intrusive this is in your daily work.

+1  A: 

We're using it, and it definitely has a lot of "goodies" to recommend it. You do have to get used to it a little and think "in Perforce", though.

In general, you have the depot with its own directory structure, and each user has mappings that define where those files/directories will be placed locally. This makes it relatively easy to replace whole parts of the hierarchy with the same parts from a different version, for example, so managing different versions and branches of your product is easier.

It also has support for managing change sets, and checking them in atomically. This can really help when you're trying to figure out what else a certain checkin affected in the rest of the code and not just the file you're currently looking at.

We were using Vault before Perforce, and all-in-all the transition was very smooth without too much lost productivity. :)

Tal Pressman
+11  A: 

Within a corporation, in a closed centralized environment, Perforce is certainly a good option.
It does checkout your workspace fast, and manage changeset nicely.
It supports "locking by default" which help to see who it working on the same file.

However, you must be in sync with the P4 server at all time, and should have the proper infrastructure to support it, including backup and DRP scenarios: if no server, and you go on working, deleting a file for instance, it will not be restored on successive updates.

The main complaint I hear from the teams using it (since I only do a bit of administration tasks on the tool) is the notion of "Inter-File Branching", a bit confusing at first, but very useful.

Depending on the level of integration of Perforce with your IDE (here eclipse) and editors, the main intrusive aspect will be to make sure to keep your workspace in sync.

Other interesting links for you to read:

VonC
+2  A: 

I use Perforce at work, having previously used CVS at my last job. After the initial learning curve, it is much better to use that CVS. (It's probably easier to learn from scratch than CVS, but I don't have experience that way.) If someone needed a centralized source-control system, I would recommend Perforce, as long as they had the resources to license it.

On the other hand, I've recently been looking at some distributed source-control systems (git, Mercurial, and Bazaar, specifically). They have a lot of features that look very intriguing, especially not requiring the constant server connection. Additionally, you could set up your system to have a "main" server, even with the distributed systems. So I would suggest looking at one of those first, and see if they meet your needs.

Caleb Huitt - cjhuitt
Just about anything is better than CVS :)
Yann Ramin
+1  A: 

This question is similar in nature to whether Ant is better than Maven or C# better than Java. People's opinions will be influenced by their battle scars, and most people only have hard, useful experience of 1 to 3 SCM tools so can't give you a balanced opinion.

I would start by sitting down with the team and listing the shortcomings of CVS in terms of features, performance and integrations. Then look at the various SCM tools to see which fit your needs.

Would it hurt to try Subversion, Git, Mercurial, or one of the other open source SCMs for a while? If it turns out they aren't fit for purpose, at least it will give you an idea of what to look for when evaluating Perforce.

Rich Seller
Hehe, my colleague and I _are_ the team :) Hence the need to hear from others :D
Thorbjørn Ravn Andersen
+5  A: 

Perforce is quite heavy weight, esp for a small team.

I'd strongly consider SVN or GIT, for good solid, well supported VCS, then use the available tooling and best practice (all free from your friendly local internet) to support features you need.

For instance with SVN you can setup "bugtraq" properties that help group changes. We just enter the bug ID with every bugfix commit (you even get a nice input field for it on the check-in GUI forms) and then mutli-commit bugfixes are still grouped.

Reasonable blog post on this feature here : http://markphip.blogspot.com/2007/01/integrating-subversion-with-your-issue.html

Again, it's well supported by the tooling making it a decent call for our team of several.

I've heard better things about GIT recently (heck, the Spring guys are using it and that often speaks volumes) but we are on subversion ourselves, so it's all I can comment on.

Phantomwhale
Also P4 is different than other SCM (not in a good way) that if you start using it probably you will die with it.
bogdan
+3  A: 

At work we used to use Visual SourceSafe for many years before switching to Perforce last year. It is definitely pricey, and we also have Ant build scripts running under a "build" user which counts as one licensed user which kinda burns. The company paid for a 2-day training seminar so the devs here got up to speed pretty quickly, but there are still questions now and then over how to do foo, etc (I am part of a small group here that supports the other users on Perforce issues - mostly because of the way Visual Studio works, not really Perforce itself).

In terms of using Perforce, I think the biggest difference is in the way Perforce conceptualizes the whole task of keeping track of your changes. For instance, subversion keeps a directory named .svn to hold metadata about the files; with p4, the p4 server itself keeps a list of which files you have. This seems to be the biggest source of issues - someone tells the p4 server to get the latest files for a project, but then manually deletes something. When he/she asks the p4 server for the latest again, the p4 server thinks he/she already has it, so it doesn't get updated. Once people "get" this, it becomes much easier to work with. You just have to tell the server to "remove from workspace" and then get it again.

We have a mix of MS Visual Studio users as well as Eclipse and IntelliJ, and the p4 plugin support for all these work quite well. The daily routine of checking in/out and getting-latest is no different. We are mostly using the basic functionalities and even then it seems to be an improvement over Visual SafeSafe (then again, from the rants I see sometimes on the net over it, probably anything is an improvement over Visual SourceSafe). Just having multiple open changelists at the same time gives some of us a lot of flexibility with how we work. It seems Perforce plugin setups prefer silent checkouts which a lot of users noticed right away, but I like it a lot and I think overall it's an improvement for productivity. The IDEs will highlight file names in a different color, so you can see if somethings been modified - and the p4 changelists always show what you have checked out anyway.

Merging changes when multiple users have checked in changes to a file is pretty easy. The diff tools aren't super-spectacular but we can compare conflicts by line pretty well and just click through the ones we want. I should note that the gui tools are excellent. Most devs here do not use the p4v client, but some do and I for one use it all the time. Did I mention the gui tool is excellent? You can look through all submitted changelists, look at file history, drag and drop one revision onto any other revision and get an instant diff, look at a revision graph which shows you branching history, look at a "time-lapse" view of a file's revisions (very neat feature - drag a slider back and forth across the top and watch the file contents update with each revision).

We have only done a few codeline branches so we're not very experienced with it yet. So far, it has been very easy, and merging changes is also pretty easy. As part of the training course, everyone got a copy of "Practical Perforce", written by Perforce's VP of technology or some such. There's quite a lot of content in there about different methodologies for handling codelines and branching. I think when we used SourceSafe, we were so limited in what it could do that we could only think a certain way - Perforce is so much more flexible that suddenly it's actually possible to have different philosophies on when/how/why codelines should be set up, etc. So in this regard we are still trying out a lot of things with regards to branching and integrating (merging).

P.S. A two-user setup doesn't require a license and only limits you to 5 workspaces. You can evaluate it without a time limit. They also offer free (but unsupported) licensing for open source projects.

weiji
+2  A: 

Most of the benefits of Perforce are also available in Subversion. Subversion is also easier to manage, and doesn't have as rigid a requirement to remain connected to the server.

However, I find the p4 syntax much easier to use and the output is much less cryptic than svn.

system PAUSE
A: 

I've worked with svn, cvs, vss, and now I'm working with perforce. I use to work with baazar for my personal projects, and I have tried git and mercurial.

I don't recommend you perforce at all, and of course i don't recommend you VSS either. It's insecure, unreliable and impractical to work with. It's model it's much more twisted than svn, cvs, git, .. etc .It is also more difficult to use with scripts (as you have to deal with views, clients, and other system variables).

I would recommend you svn with any regular issue tracker. You can customize it throught svn hooks as desired.... In some cases it would be interesting to go distributed (git, mercurial, baazar), but if you don't have an opinion yet, you should start with svn ..

well, thats my opinion of course...

Jorge
A: 

Perforce is both expensive and untrustworthy. It doesn't reliably place the correct files in a workspace, leaving with stale versions at times.

There's a lot of things that perforce gets right, and it can handle very very large binary files more simply than other comparable solutions, but that one problem is enough to make me recommend against using it for any project.

jrodman
A: 

listen to linus: http://vodpod.com/watch/65074-tech-talk-linus-torvalds-on-git

Ray Tayek