Go Back   SitePoint Forums > Forum Index > Program Your Site > PHP > PHP Application Design
Newsletter FAQ Members List Calendar Mark Forums Read

New to SitePoint Forums? Register here for free!

SitePoint Sponsor
 
Reply
 
Thread Tools Display Modes
Old Sep 12, 2004, 15:20   #1
McGruff
simple tester
 
McGruff's Avatar
 
Join Date: Sep 2003
Location: Glasgow
Posts: 1,685
CVS v SVN

I help maintain another php forum and I'm about to start a project to refactor/rewrite the (phpBB) forum code into OOP & unit tests (probably using php5). I guess phpBB is a good program from the point of view of allowing budding php-ers to easily create their own mods but (despite this warning) I'm not keen to have to work with something lacking OOP & tests, particularly in a team environment.

At the moment we're just drafting The Plan and I'm wondering whether to recommend subversion rather than CVS. Hassle-free renaming & moving files sounds like a big plus. I'd expect a lot of that until some kind of stable architecture evolves.

I'd be interested to hear of your experiences of CVS v Subversion. Have you found that CVS can hinder a flexible design process in this way?

The site Berlios offer free open source project hosting with subversion and look like an interesting alternative to sourceforge. Anyone had any experience of them?
McGruff is offline   Reply With Quote
Old Sep 13, 2004, 02:53   #2
pachanga
SitePoint Addict
 
pachanga's Avatar
 
Join Date: Mar 2004
Location: Russia, Penza
Posts: 274
Quote:
Originally Posted by McGruff
The site Berlios offer free open source project hosting with subversion and look like an interesting alternative to sourceforge. Anyone had any experience of them?
We use berlios.de for LIMB source hosting and at the moment the only good thing i can say about berlios is that it's free The repository used to get wedged very often, however the support crew does its best to fix these errors. And it seems these repository errors are gradually getting fixed, in the past month we had the repo wedged only for couple times...

Guys at tigris.org promise to launch svn support soon, i think you should check 'em out also...
pachanga is offline   Reply With Quote
Old Sep 13, 2004, 03:17   #3
McGruff
simple tester
 
McGruff's Avatar
 
Join Date: Sep 2003
Location: Glasgow
Posts: 1,685
Thanks for the info. Not sure what you mean by wedged - but it sure doesn't sound good. Did you lose any files or versioning info?
McGruff is offline   Reply With Quote
Old Sep 13, 2004, 04:17   #4
pachanga
SitePoint Addict
 
pachanga's Avatar
 
Join Date: Mar 2004
Location: Russia, Penza
Posts: 274
Quote:
Originally Posted by McGruff
Thanks for the info. Not sure what you mean by wedged - but it sure doesn't sound good. Did you lose any files or versioning info?
...quote from the subversion documentation:
Quote:
In the course of using your Subversion repository, fatal errors (such as running out of disk space or available memory) or interruptions can prevent a process from having the chance to remove the locks it has placed in the database. The result is that the back-end database system gets “wedged”. When this happens, any attempts to access the repository hang indefinitely (since each new accessor is waiting for a lock to go away—which isn't going to happen).
Once registered at berlios.de they give you shell access and usually i “unwedge” the repo myself, the following command does the job:

svnadmin recover /svnroot/repos/limb

Believe me this one will be your most used one at berlios.de

Lucky we are we never lost any information...
pachanga is offline   Reply With Quote
Old Sep 13, 2004, 13:25   #5
McGruff
simple tester
 
McGruff's Avatar
 
Join Date: Sep 2003
Location: Glasgow
Posts: 1,685
Thanks for the advice. If it's no more than an occasional nuisance, and they're making progress to sort it out, I could probably put up with that.

I find I change directory structures a lot in the beginning of a project (later on it settles down) so I'm keen to try out subversion.
McGruff is offline   Reply With Quote
Old Sep 13, 2004, 15:15   #6
dodga
SitePoint Enthusiast
 
dodga's Avatar
 
Join Date: Apr 2004
Location: Germany
Posts: 90
I used CVS quite some time, though never in big projects. I also set up some CVS repositories for other people.
My conclusion: it is okay, but lacks essential features.

So I tried Subversion for a software engineering project at the university with 2 friends.
It installed easily (at least on my Debian server ) and a repository was created very quick (with authentication, of course) using svnserve via inetd as server.
As we moved and renamed files often (bad design ), I was more than grateful that Subversion handled that very fine.
I did not have any trouble at all in that project (at least none with Subversion ).

Recently I switched to mod_svn with Apache 2 because it supports multiple repositories, (more or less) good access control. You can also browse your repositories with a web-browser, but that is pretty spartanic (you might want to use Chora or ViewCVS if you need a more sophisticated webclient).

But Subversion has its flaws, too.
All files have the same global revision number and the repository is a single Berkeley DB file (see here and do some google'ing about that) and other implementations are AFAIK not yet in the release branch.

Anyways, be sure to read Version Control with Subversion and give SVN a chance
dodga is offline   Reply With Quote
Old Sep 13, 2004, 19:31   #7
sry_not4sale
SitePoint Member
 
sry_not4sale's Avatar
 
Join Date: Sep 2004
Location: New Zealand
Posts: 13
Quote:
But Subversion has its flaws, too.
All files have the same global revision number and the repository is a single Berkeley DB file (see here and do some google'ing about that) and other implementations are AFAIK not yet in the release branch.
Another downside to subversion is that it has alot less tools that support it compared to CVS - which may be an important factor when choosing between the two (especially if you have a favourite IDE and you don't want to lose that extra functionality)
sry_not4sale is offline   Reply With Quote
Old Sep 14, 2004, 04:58   #8
sike
SitePoint Zealot
 
sike's Avatar
 
Join Date: Oct 2002
Posts: 174
Quote:
Originally Posted by McGruff
I help maintain another php forum and I'm about to start a project to refactor/rewrite the (phpBB) forum code into OOP & unit tests (probably using php5). I guess phpBB is a good program from the point of view of allowing budding php-ers to easily create their own mods but (despite this warning) I'm not keen to have to work with something lacking OOP & tests, particularly in a team environment.
hi,

speaking out of some experience with phpBB : its such an awfull peace of software. can't count the times banging my head on some walls while trying to incooperate phpBB in a community site. the whole phpBB code looks like crap so i think "refactoring" becomes more like a complete rewrite but im interested if you are willing to share your results (=

Sike
sike is offline   Reply With Quote
Old Sep 14, 2004, 11:05   #9
McGruff
simple tester
 
McGruff's Avatar
 
Join Date: Sep 2003
Location: Glasgow
Posts: 1,685
It'll be the usual sourceforge (or similar) open source project.

There's some talk about using web services to solve a problem with logging in members on multiple sub-domains as well as other things like allowing forum content (etc) to be distributed across other sites so there could be a great deal of scope for "sharing".

Since we're (devnetwork.net) all about learning php I'm thinking about having the whole development conversation as open discussion. Might be educational as an example of how to work together as a team, tools & methodologies to use, design and so on. (Or possibly an example of how NOT to do it... !). I don't know. Might be better to write something up later.

I expect it to be a slow, long-term project though. If we had something deployable by next summer I'd be more than happy.
McGruff is offline   Reply With Quote
Old Sep 14, 2004, 11:16   #10
ghurtado
SitePoint Guru
 
ghurtado's Avatar
 
Join Date: Sep 2003
Location: Wixom, Michigan
Posts: 619
Just a side note: if your problem is cross-subdomain authentication, cookies can be set for a domain so that they will be sent back to all its subdomains.
ghurtado is offline   Reply With Quote
Old Sep 14, 2004, 12:19   #11
sleepeasy
SitePoint Zealot
 
sleepeasy's Avatar
 
Join Date: Sep 2003
Location: Bristol, UK
Posts: 153
Quote:
Originally Posted by pachanga
svnadmin recover /svnroot/repos/limb
svnadmin recover is your best friend

Don't think too badly of berlios becuse your repository gets wedged from time to time. I have complete administrative control over my local repository (and I'm the only one who uses it). I too have to do svnadmin recover every now and again.

So assuming I have Subversion set up properly it's clear that the problems you've had are no fault of berlios, but something you have to deal with once in a while if you use Subversion.
sleepeasy is offline   Reply With Quote
Old Sep 15, 2004, 00:59   #12
pachanga
SitePoint Addict
 
pachanga's Avatar
 
Join Date: Mar 2004
Location: Russia, Penza
Posts: 274
Quote:
Originally Posted by sleepeasy
Don't think too badly of berlios becuse your repository gets wedged from time to time. I have complete administrative control over my local repository (and I'm the only one who uses it). I too have to do svnadmin recover every now and again.
Actually i don't Anyway it's free and the berlios team does its best to fix the errors. Still recovering the repo 6 times a day is no fun at all

Quote:
So assuming I have Subversion set up properly it's clear that the problems you've had are no fault of berlios, but something you have to deal with once in a while if you use Subversion.
I chatted with subversion devs at #svn channel the other day and they told me that berlios messed up permission policy in some way(i've no idea what it means), that's why the repo gets wedged from time to time....

Last edited by pachanga; Sep 15, 2004 at 09:49.
pachanga is offline   Reply With Quote
Old Sep 15, 2004, 01:30   #13
pippo
FreeBSD The Power to Serve
silver trophy
 
pippo's Avatar
 
Join Date: Jul 2001
Location: Italy
Posts: 4,574
> All files have the same global revision number and the repository is a single Berkeley DB file
Yup hope the 1.1, that support a new non-database repository back-end, will be released soon, RC3 actually.

If you are working with binary files, such as images, CVS will store a whole copy of it when you make change.
Subversion uses a binary diff algorithm.

Never used CVS and Subversion, though



Andrea
pippo is offline   Reply With Quote
Old Sep 15, 2004, 08:51   #14
sleepeasy
SitePoint Zealot
 
sleepeasy's Avatar
 
Join Date: Sep 2003
Location: Bristol, UK
Posts: 153
Quote:
Originally Posted by pachanga
Actually i don't Anyway it's free and the berlios team does its best to fix the errors. Still i recovering the repo 6 times a day is no fun at all
Ok, even I don't have to do it 6 times a day - maybe 6 times a fortnight, but that may be down to the fact that I'm the only one using the repository.

Quote:
I chatted with subversion devs at #svn channel the other day and they told me that berlios messed up permission policy in some way(i've no idea what it means), that's why the repo gets wedged from time to time...
Oo... I think I'll have to read up on permission policies...
sleepeasy is offline   Reply With Quote
Old Oct 1, 2004, 11:38   #15
hillsy
Yugo full of anvils
bronze trophy
 
hillsy's Avatar
 
Join Date: May 2001
Location: :noitacoL
Posts: 1,877
SVN is way better than CVS in my opinion. Mostly because it imposes a lot less constraints on you - like allowing directory renaming.

The new version of Subversion (1.1) is just out and supports a new fsfs backend that is not prone to wedging. Downside is that it's less tested than the BerkeleyDB backend at this point.
hillsy is offline   Reply With Quote
Old Oct 1, 2004, 12:55   #16
bmatheny
SitePoint Member
 
Join Date: Mar 2004
Location: Indiana
Posts: 23
If you are looking at only CVS vs. Subversion, it should be a no brainer. Subversion. Atomic commits are essential, particularly if you have an active development cycle. However, I recently started using GNU Arch, and I've ditched both CVS and Subversion in favor of it. My 2c.

-Blake
bmatheny is offline   Reply With Quote
Old Oct 1, 2004, 14:12   #17
arborint
SitePoint Wizard
 
Join Date: Aug 2004
Location: California
Posts: 1,672
On the other hand. If you are looking for something that is supported everywhere and just works then CVS is fine. For single user and small teams the features that Subversion and Arch add are not that necessary.
arborint is offline   Reply With Quote
Old Oct 2, 2004, 06:03   #18
hillsy
Yugo full of anvils
bronze trophy
 
hillsy's Avatar
 
Join Date: May 2001
Location: :noitacoL
Posts: 1,877
I don't really agree with that from the point of view of features. The ability to rename directories and the ability to do atomic commits are two really killer features of SVN over CVS, in my opinion. And they're features that are useful no matter how big your team is. I've already had a couple of occasions to be thankful for atomic commits, and I've only been using SVN for a couple of months.

On the other hand you are 100% correct when you say that CVS is more widely supported/deployed. Ultimately I don't think anyone would recommend not using CVS - it's a lot better than using nothing. However I do think that using SVN instead of CVS is a no-brainer, if both are available.
hillsy is offline   Reply With Quote
Old Oct 2, 2004, 06:09   #19
hillsy
Yugo full of anvils
bronze trophy
 
hillsy's Avatar
 
Join Date: May 2001
Location: :noitacoL
Posts: 1,877
Quote:
Originally Posted by bmatheny
If you are looking at only CVS vs. Subversion, it should be a no brainer. Subversion. Atomic commits are essential, particularly if you have an active development cycle. However, I recently started using GNU Arch, and I've ditched both CVS and Subversion in favor of it. My 2c.

-Blake
Arch does look pretty nice. I like the way you can apparently distribute your repositories, where in SVN you have to use a third-party tool.

We've just implemented SVN at work. We would have seriously considered Arch, except for the fact it's Unix only. Not that that's a problem, it's just we've got a lot of Windows servers and expertise so it made more sense to deploy on Windows if possible. Also most of the decent Arch client tools seemed to be Unix-based, and messing with Cygwin was not an option.
hillsy is offline   Reply With Quote
Old Oct 2, 2004, 18:06   #20
frezno
does not play well with others
 
frezno's Avatar
 
Join Date: Jan 2003
Location: Munich, Germany
Posts: 1,370
Tried to use SVN but what's confusing me is that it obviously doesn't support the 'headline' as known from CVS, eg
$Id: newsletter.php,v 1.10 2004/09/14 09:53:06 frezno Exp $
but handles it differently.
So how do i know, looking at the file, what version/state it is?
frezno is offline   Reply With Quote
Old Oct 2, 2004, 18:57   #21
sweatje
eschew sesquipedalians
silver trophy
 
sweatje's Avatar
 
Join Date: Jun 2003
Location: Iowa, USA
Posts: 3,779
Quote:
Originally Posted by frezno
Tried to use SVN but what's confusing me is that it obviously doesn't support the 'headline' as known from CVS, eg
$Id: newsletter.php,v 1.10 2004/09/14 09:53:06 frezno Exp $
but handles it differently.
So how do i know, looking at the file, what version/state it is?
It appears that svn does support it, but you need to enable the feature:
http://svnbook.red-bean.com/svnbook-...h-7-sect-2.3.4
sweatje is offline   Reply With Quote
Old Oct 3, 2004, 06:50   #22
frezno
does not play well with others
 
frezno's Avatar
 
Join Date: Jan 2003
Location: Munich, Germany
Posts: 1,370
Quote:
Originally Posted by sweatje
It appears that svn does support it, but you need to enable the feature:
http://svnbook.red-bean.com/svnbook-...h-7-sect-2.3.4
Heck, i have this (although an older revision) and searched through it like crazy without finding something...

There should be a lable at the beginning saying: "Best viewed with open eyes".

Thanks Jason
frezno is offline   Reply With Quote
Old Oct 3, 2004, 22:36   #23
Jonathan
SitePoint Enthusiast
 
Join Date: Oct 2000
Location: Atlanta
Posts: 96
Quote:
Originally Posted by sry_not4sale
Another downside to subversion is that it has alot less tools that support it compared to CVS - which may be an important factor when choosing between the two (especially if you have a favourite IDE and you don't
Some programs support the WebDav protocol such as Macromedia Dreamweaver, so you got the ability to publish your changes via a HTTP address. I personally love SVN as it's easier to get started than CVS. The class I'm taking right now at GA Tech that pushes forth team collaboration encourages CVS usage. However, next semester, they are turning towards Subversion.

If you can get Chora setup (requries bleeding edge copy of Horde and Chora from CVS), then you got a very nice web interface to the repository.

There was a nice tip above that I did not realize that Subversion could do which is document the versioning tags. Since I'm using phpDoc, works great
Jonathan is offline   Reply With Quote
Old Oct 4, 2004, 01:32   #24
hillsy
Yugo full of anvils
bronze trophy
 
hillsy's Avatar
 
Join Date: May 2001
Location: :noitacoL
Posts: 1,877
Quote:
Originally Posted by Jonathan
Some programs support the WebDav protocol such as Macromedia Dreamweaver, so you got the ability to publish your changes via a HTTP address.
Interesting.... Potential use for mapping an SVN repository directly into Windows using Web Folders or Webdrive.
hillsy is offline   Reply With Quote
Old Oct 4, 2004, 22:54   #25
inimino
SitePoint Member
 
Join Date: Oct 2004
Location: Colorado, US
Posts: 4
I have used CVS, svn, and Arch, and I must say that GNU Arch is vastly superior. I use it for all my development, and it's simply great.
inimino is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread | Next Thread »

Thread Tools
Display Modes

 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Sponsored Links
 
Forum Jump


All times are GMT -7. The time now is 08:15.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 1998-2009, SitePoint Pty Ltd. All Rights Reserved