4

I currently use Perforce locally on my computer at home and on my computer at work, and I am very happy with it. But I want to share the SCM Love with my co-workers, and we are about to (maybe) add a third developer. With the inclusion of a third person, we can't continue to use the free version of Perforce. I am not adverse to paying, but $900 a seat is too steep for the company I am working at.

Now, I know there is a strong following for SVN here on StackOverflow, and I respect that. But when I looked into it previously, I did not care for certain aspects. For instance in Perforce, if I try to check in a file that needs to be synched or merged, it will prompt me to do so before checking in, and I get a visual tool to control the merging. IIRC, in SVN, when you check in files it will automatically merge for you which may not have quite the same consequences that you are expecting. I freely admit I may be remembering this incorrectly, though.

Also, I seem to recall that SVN is folder-based and not file-based? This could be really scary in my current work environment where I have inherited some apps with no folder structure.

And, of course, it absolutely has to plugin to Visual Studio 2008.

Given those requirements, would you still recommend SVN or would you recommend another product?

Conspicuous Compiler
  • 6,403
  • 1
  • 40
  • 52
Peter Lange
  • 2,786
  • 2
  • 26
  • 40

9 Answers9

8

In Subversion you don't merge locally when you commit - you merge locally when you update. (There's a server-side merge when you commit, but that's not the same thing.) However, you have to be up-to-date before you can commit. It's a subtle but important distinction.

Subversion will merge for you when it feels confident in the change, but will leave appropriate conflicts alone to be merged manually. I haven't seen many bad merges performed automatically.

And yes, I'd still recommend Subversion if you need VS support (for which I'd recommend VisualSVN, personally - not free, but very cheap). I like Git, but it doesn't have good VS integration that I'm aware of.

Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
  • Hey Jon, to clarify then, in SVN if you are out of synch, you would update locally, forcing a merge on your system. Then (saying you do not need to re-edit the files to tweak the merge output) you would commit the files to the repository? – Peter Lange Jun 01 '09 at 17:00
  • Precisely. SVN will tell you which files it's merging, and it's up to you to make sure the changes are OK (as it would be in any VCS). – David Thornley Jun 01 '09 at 17:01
  • I use ankhsvn at home and it is free. http://ankhsvn.open.collab.net/ – David Basarab Jun 01 '09 at 17:04
  • I used to usew AnkhSvn but tried VisualSvn and prefer it. Just slightly simpler. – Jon Skeet Jun 01 '09 at 17:07
  • I looked at VisualSvn but I decided that $49 was something I wasn't willing to spend for at home development. – David Basarab Jun 01 '09 at 17:10
  • Another downside to VisualSVN is it needs TortoiseSVN for some features, and i don't want Tortoise on all my context menus on my hope pc. To that end Ankh wins for home dev for me. The Free bit is nice too. – Pondidum Sep 11 '09 at 14:08
  • Actually you merge when you commit and when you update. During a commit if there's any change to a node that your commit is changing then that counts as a conflict and you get an out of date error. If there are only changes to nodes you aren't changing with your commit then your changes are merged into the tree on the server and the commit completes. If you got an out of date error you'll need to run update which will pull in the changes, the conflict handling on the client side is less strict and some changes may merge without conflicts even in the same file. – Ben Reser Jan 30 '14 at 06:42
  • @BenReser: So are you saying that effectively there's a server-side merge on commit, and a client-side merge on update? (It's been too long since I've used Subversion in anger to remember all the details now...) – Jon Skeet Jan 30 '14 at 12:26
  • @JonSkeet That's correct. With DAV the HTTP method to finalize the commit after creating the transaction is actually MERGE. Technically update and commit are roughly the same. Commit just reverses the direction of the report and applies the changes to the repo vs an update which applies them to your working copy. – Ben Reser Jan 30 '14 at 16:34
  • @BenReser: Okay, I didn't really follow that - but I'll edit my post with what I put previously :) – Jon Skeet Jan 30 '14 at 16:36
2

I'm a long-time Perforce user and absolutely love it, but I can appreciate that the licensing fees might be a bit too much for a small company.

As I see it, the main reasons for using Perforce are:

  • Mature merge tracking. SVN isn't quite there yet.
  • Superb support team (I seem to always get replies within the hour or so)
  • Speed.

Having said that, I think that SVN would be the easy way to go if you are willing to lessen your expectations a bit in the above areas, at least for the time being. I'll probably get flamed because of that statement, but so be it. You'll just have to decide what you are willing to pay in terms of time vs money - if you are a heavy user of branching and merging it just might be that the Perforce branch/merge capabilities will pay off.

Another thing to consider if you are developing OSS is that Perforce actually offers free licensing for Open Source development.

rjnilsson
  • 2,343
  • 15
  • 20
  • Speed? It took me one hour of downloading to create projects from a trunk with 24.308 files in 4787 folders (890 MB) connected via a line with 75 Mbps (according to http://www.speedtest.net/) with the Perforce Eclipse plugin. Compared to the raw download of appx. 890 MB / 7.5 MBps ≈ 120 sec... Of course, it also depends on the server's upload speed, but 30 times longer? – Gerold Broser Sep 09 '15 at 15:01
  • Try to populate the workspace from the command-line initially; I'm not sure about the P4Eclipse's performance. You could also try if the `--parallel` option of the `p4 sync` command might help. As a side note, Perforce now also has built-in DVCS functionality. – rjnilsson Sep 10 '15 at 13:40
  • If you populate the workspace from P4V the Perforce Eclipse plugin doesn't display the revision info to the right of the files. Is this different with the cmd line tool? I have a copy of said trunk in a dev branch. I changed nothing on this branch. I merged/integrated to get the latest revisions from the trunk. I took a shower in the meantime so I don't know exactly how long it took. However, there was a changelist containing 160 entries. It took 40 secs to submit this changelist. And all this happened just on the server. I'm sorry but you're not going to convince me. – Gerold Broser Sep 16 '15 at 12:19
  • I prefer a _real distributed_ VCS with _real_ branching that's additionally available for free: Git or Mercurial, for instance. – Gerold Broser Sep 16 '15 at 12:23
  • Let's not get into a "my VCS is better than yours" discussion. I'm not trying to convince you of anything, just providing facts and trying to help. I would suggest that you post a separate question for your problem or contact Perforce support; they would be happy to help you whether you use the free 20/20 license, the free open source license, or the commercial license. If it takes 40 seconds to submit a changelist of that size and it doesn't contain huge amounts of data (i.e. being affected by network performance) you have a real problem. – rjnilsson Sep 17 '15 at 05:30
1

Also, I seem to recall that SVN is folder based and not file based?

svn stores a .svn repository for each folder but you can add individual files within a folder. It also has good rules for automatically finding/ignoring files based on extension.

Ankhsvn does visual studio integration, personaly I prefer tortoiseSVN integration with explorer but that just depends on how you work.

ps. On the server side you can have SVN store changes in individual files or in a BSD type database, checks the docs for which is best for you, but this doesn't effect the client side.

Community
  • 1
  • 1
Martin Beckett
  • 94,801
  • 28
  • 188
  • 263
1

see prior thread for discussion of git + visual studio: Using Git with Visual Studio

Community
  • 1
  • 1
klochner
  • 8,077
  • 1
  • 33
  • 45
1

I currently use Perforce locally on my computer at home and on my computer at work and I am very happy with it

Looks like DVCS to me (Distributed Version Control). Git or Mercurial could definitively help, in that they would scale nicely with the number of developers. Just define a central repository. Git actually can work with VisualStudio

in Perforce, if I try to check in a file that needs to be synched or merged, it will prompt me to do so before checking in

It is so when working on the same file on the same branch. With DVCS tools, you would create your local branch and control whenever you want to merge other works in your current branch (rebase) or just merge your work to a common branch (merge).

So I would recommend a DVCS tool rather than a central repository tool in this instance.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
1

We are a development shop and used MS sourcesafe for a long time before giving up on it because of a lot of problems when you get beyond a certain size.

Now we are using svn exclusively. I am yet to see too many incorrect automatic merges, but it detects conflict if same part of the file is changed in both places and lets you merge manually. I am interested to know if you can stop automated merge and have full control.

The merge resolution window is really good and it will allow you to merge manually in no time.

We use Ankhsvn on vs 2008 and sometimes tortoise svn. We tested the visual svn but found that Ankhsvn is good enough (although I am not sure it supports file renaming and merging history yet!)

Samuel
  • 1,949
  • 4
  • 18
  • 30
0

Re-Perfoce vs SVN : Mercurial looks quite good if you want to have the Merge Tracking capabilities from Perforce, and everything else from Subversion.

Big
  • 9
  • 6
0

SourceGear Vault integrates perfectly with VS 2008, and does everything you ask for.

$249 per seat (volume discounts available), and it'll prompt you if files need merging. Plus, it's got a great Diff/Merge tool.

It's free for a single user, so give it a shot and see if it meets your requirements.

Chris Doggett
  • 19,959
  • 4
  • 61
  • 86
0

I agree with Jon Skeet. (doesn't everyone?!) - ;-)

SVN is still a great choice for you. You can use a visual tool like TortoiseSVN to handle your interaction with SVN and including a repository web client like ViewVC is a good option if you want to access/browse the repos from your browsers.

There is a pile of extensibility built into SVN as well. You can add all sorts of custom actions to any pre-commit or post-commit events (and many more).

Visual SVN as Jon mentioned or Ankh SVN are both viable solutions for Visual Studio integration.

Mat Nadrofsky
  • 8,289
  • 8
  • 49
  • 73