Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the benefits of using Perforce instead of Subversion?

Tags:

svn

perforce

My team has been using SVN for a few years. We now have the option of switching to Perforce.

What would be the benefits (and pitfalls) of making such a switch?

like image 312
Ferruccio Avatar asked Oct 01 '08 12:10

Ferruccio


People also ask

Is perforce a Subversion?

Perforce can be classified as a tool in the "Code Collaboration & Version Control" category, while SVN (Subversion) is grouped under "Version Control System".

Is Perforce Git or SVN?

Perforce version control — Helix Core — has better access control and auditability than both Git and SVN. It delivers better architecture performance, binary file management, and usability than SVN. And it offers a better way to branch and merge (Perforce Streams) than Git.

What is the difference between Perforce and Git?

One of the key differences between these two systems is that Git is based on a distributed, decentralised model, while Perforce is centralised. Both have their advantages, of course, but with a centralised system, there's no way to decentralise it later. A distributed VCS, on the other hand, can be centralised.

What is the difference between Subversion and Git?

The difference between Git and SVN version control systems is that Git is a distributed version control system, whereas SVN is a centralized version control system. Git uses multiple repositories including a centralized repository and server, as well as some local repositories.


2 Answers

  • P4 keeps track of your working copy on the server. This means that
    1. Large working copies are processed much faster. I used to have a large SVN project and a simple update took 15 minutes because it had to create a tree of the local working copy (thousands of folders). File access is slow. P4 stores the information about the working copy in the database, so any operations were always near-instantaneous.
    2. If you mess around with your files and do not tell the server, you are in trouble! You cannot just delete a file - you have to delete a file with the P4 client so the server knows. Note that if you locally delete a file, it will not be downloaded again on successive updates because the server thinks you already have it! When lots of this happened and I ended up wildly out of sync, I usually had to resort to cleaning out my local copy and downloading it again, which could be time-consuming. You must be careful about this.
  • The Explorer shell extension client (think TortoiseSVN) sucks and is completely unusable.
  • There are two GUI client applications which offer the best functionality: P4Win and P4V, of which P4V is newer and more easy to use but not as feature-rich.
  • There are Visual Studio and Eclipse plug-ins, which work relatively well, although they do not have many advanced features.
  • Generally speaking, P4 offers much less features than SVN and is sometimes downright confusing.
  • Working copy definitions were nice and flexible. I believe P4 is superior to SVN here: you can define masks for working copy folders and create all sorts of bizarre trees, so you download only what you want to exactly where you want, without having to manually futz with multiple checkouts. This came in very handy when I had gigabytes of stuff on the server and only wanted a specific subset of it. I used SVN in a similar situation with much more hassle.
  • Branching under P4 is... odd. Branchsets and different kinds of branches and confusing UI. I do not remember much details about this, unfortunately.

Other than that, it's pretty standard.

I recommend you keep SVN unless you deal with huge codebases or hate the .svn folders littering up your filesystem. SVN+TortoiseSVN is far more confortable for most situations.

like image 62
Sander Avatar answered Sep 20 '22 20:09

Sander


I currently use both on different projects.

  • The perforce branching mechanism is superior.
  • The perforce conflict resolve tool is better.
  • I really like perforce's strong notion of a changelist.
  • Perforce seems faster.
  • It's easier to set up and get running.
  • Some of our members really like the MS Office plugin for perforce, I'm on a Mac so I can't use it.

But

  • The SVN clients are better, especially the eclipse plugin.
  • Perforce is more expensive.

These are merely opinions, so perhaps this is a poor answer :)

If I was already using one or the other, I'd be very hard pressed to switch since neither seems to offer really significant benefits over the other, but the disruption in switching could be large.

Update: Since writing this, I've completely switched to using GIT for both personal and commercial purposes. I would pick it over either SVN or Perforce any day.

like image 35
Marc Hughes Avatar answered Sep 20 '22 20:09

Marc Hughes