On Monday, the Subversion project is scheduled to release version 1.0 of their version control system, under development for several years now. Subversion was intended from its inception as the CVS replacement and it comes with many important features previously found only on commercial VCS like Perforce. It was designed for better remote performance, and it is multi-platform with a GUI/CLI front-end.Features:
* Directories, renames, and file meta-data are versioned.
* Commits are truly atomic.
* Apache as network server, WebDAV/DeltaV for protocol (separate standalone server also available)
* Branching and tagging are cheap (constant time) operations
* Natively client/server, layered library design
* Client/server protocol sends diffs in both directions
* Costs are proportional to change size, not data size
* Efficient handling of binary files
* Parseable output
Features to come post-1.0:
* Support for symbolic links
* Better merge support (currently same as CVS’)
* Broader WebDAV compatibility
* Support for plug-in client side diff programs
Interesting PowerPoint presentations explaining the features and the goals of Subversion: 1, 2.
More features and comparisons at the big VCS shootout.
Quick Tutorial:
Create a new svn repository, e.g.
$ cd /home/eugenia
$ svnadmin create svn
Populate your new repository by using an existing folder with your source code:
$ svn mkdir file:///home/eugenia/svn/tetris-sharp -m ‘Create Tetris project’
$ svn import file:///home/eugenia/svn /home/eugenia/tetris-sharp tetris-sharp/trunk \
-m ‘Initial Import of Tetris project’
The text accompanying the -m knob is added to the log.
To start working with your code you will need to checkout some files.
$ svn checkout file:///home/eugenia/svn/tetris-sharp ~/tetris-src
To commit a file just use one of the following. Please note that Subversion requires log entries each time you commit something.
$ svn commit *.cs -m “commit all .cs files”
or
$ svn commit *.cs data \
-m “save all .cs files in the current directory and everything in the tetris-src/data directory”
or
$ svn commit -m “commit all files that have changed since my last commit”
There are much more to explore in the very detailed Subversion Book.
“it comes with many important features previously found only on commercial VCS like Perforce. The VCS is multi-platform and as well as its GUI front-end.”
not meant as a troll but does she mean “CVS” instead of “VCS”? or is this perhaps just another acronym that I haven’t heard of before? Such as googling “VCS” returned “Visualization and Computation System” which I guess could make sense… Really, this a problem with acronyms because a small typo can change a lot of meaning. For example there is a difference between being “DOA” and “EOA” (though I must admit from where I’m from there isn’t much one!) but it’s only one key away on your standard QWERTY.
Subversion is great! I use it more than half year. It’s much more intuitive.
But unfortunately it seems that much disk space in wasted in client — at least 3 times the amount of the source. I know that SVN keeps the original content of all the files, but why it’s still much more than 2 times?
VCS: Version Control System
CVS: Concurrent Versions System
The first one is the generic name for all version control systems and the second is simply the name of CVS.
Can you run the Subversion server on Windows and use Active Directory for user permissions and login?
looks more complicated than cvs. pass.
I’ve been using Subversion successfully for about a month (http://svn.pdtp.org). Unlike CVS, Subversion is actually sane. You can *gasp* delete directories from the repository! You can rename/move files within the repository without losing versioning (possible but highly cumbersome in CVS). Branching makes sense. It still lacks some of the features of Perforce/BitKeeper but overall quite nice.
Subversion is very similar in use to cvs, but a lot more powerful. If you develop on Windows, there is a great set of programs that integrate Subversion right into the Explorer shell. It is so easy to use that way you will wonder why you have not been keeping everything in a VCS!
Windows Integration:
http://tortoisesvn.tigris.org/
Subversion Commands Overview/Tutorial (SingleUser):
http://www.onlamp.com/pub/a/onlamp/2002/10/31/subversion.html
Subversion Commands Overview/Tutorial (MultiUser):
http://www.onlamp.com/pub/a/apache/2002/12/19/svn2.html
Jamie.
Can you run the Subversion server on Windows and use Active Directory for user permissions and login?
All Subversion tools are built on top of the Apache Portable Runtime, so you should have no trouble with them on Windows. As for auth agaist an Active Directory server, I believe you should be able to do this using the mod_authz_ldap module for Apache when using Subversion WebDAV access, though I’ve never tried it myself.
Users of Visual Studio .NET should also check out http://ankhsvn.tigris.org/
We moved from CVS to Subversion at work (running on Solaris boxes).
CVS’es problems in my opinion are bad merging and conflicts. Moving to svn was really good move, no bad problems in general.
Commands are also pretty equal to CVS so moving to SVN was quite simple process.
Yes and no.
You can configure apache to authenticate to ADS, using e.g. mod_krb5,or pam with pam_krb5.(you don’t need to run it on windows for this..)
However you cannot (yet) make the client use kerberos, which is the ADS authentication method.
So, basically what you can do is use the 2 standard http authentication methods from the clients, and perhaps use SSL.
The server does the authentication. The apache server authenticates with ADS.
This somewhat beats the purpose of kerberos though, I’m looking foreward to GSSAPI(kerberos) support in client just
like CVS has.I guess it’s the neon library that needs this.
I don’t understand one thing, why are they using a Database to store files. The best thing i like about CVS is that its repository has same hierarchy as a checked out project and it is so easy to manipulate. You can easily move files around in repository, rename them or do anything without ever worrying that you will lose versioning. Also because all repository files are stored as normal files, you can manipulate them using any existing file system tool.
Why SubVersion is using a DB to store repository? It seems stupid to me.
You point out the flaws in CVS you have to edit, hand move files in the repository for doing what you say. That is nothing but horrible., it doesn’t version the renames or moves. And why would one ever need to fiddle with those files ? With CVS you do need it, cause it has a few shortcomings.
SVN already have directory versioning, atomic commits of several files, you can rename and move files and directories.
From the client, and it’s versioned.
Using a DB helps speed on large repositories, you automatically get concurrency, hot backup features, atomic commits/checkouts.
I suggest you read a bit on the subversion.tigris.org, and perhaps also the Subversion book.
“The best thing i like about CVS … . You can easily move files around in repository, rename them or do anything”
Well you can do that, yes, if you have root access to the repository on the box where it is running (or an insecure CVS). Whilst that might be acceptable for a single person project it isn’t for a networked collaberative project.
Result is that on most distributed CVS projects someone gets appointed as delegate repository hacker and spends many happy hours correcting other people’s sloppy mistakes by moving directories around, renaming files, removing locks etc.
The problem with CVS is that you _have_ to hack the repository in the way you describe above to perform simple refactoring on a code base, since the command set doesn’t support any other way (without loosing metadata).
Since most programmers now consider refactoring a design a normal and essential development activity, CVS is a cumbersome tool for current devopment methods – not an unworkable tool clearly, but a cumbersome one.
As for the database issue – why does it seem stupid to you? Only because you are used to working another way.
The repository is a Berkley ISAM file not some massive RDBMS. Why use it? Because implementing atomic multi-file commits on a filesystem based repository is crummy.
Besides, CVS needs the cvs commands + the repository filesystem commands to deliver a workable functionality. In SubVersion the goal is to build a secure/workable functionality from the command set itself. If you don’t need to hack the repository at filesystem level why not use a record locking, rollback supporting indexed file for more efficient concurrent access?
Of course the flakey legacy of pre-NT Windows/DOS and the UNIX everything is a char stream idea makes many programmers insecure about persisting any data in formats that are not character level readable.
VMS and MVS programmers on the other hand see ISAM files as just another file type. Which systems have the better reputation for data security?
A
Without better merge support (ie remembering what has already been merged) there is really no incentive to migrate to SVN if CVS works for you.
The architecture is saner but for the time it took to develop it is quite underwhelming :/
For a really great and full of features VCS take a look at Arch (gnuarch.org). I just begun using it but i’m already convinced
What it really misses is a good GUI like TortoiseCVS/SVN for windows …
I may have missed it, but I haven’t seen anything that says that there is a GUI Frontend to it?
Unless Eugenia is talking about TortoiseSVN. Which doesn’t help me, because, AFAIK its Windows only.
http://rapidsvn.tigris.org/
Subversion is nice, but gnu arch is definately better. You really should check it out and not get sucked into the hype around subversion.
Hello,
From an industry perspective I would rather have the file layout of cvs. I know from personal experience about DB and source control and it was just bad. The product was continus and It used informix. Well there was no direct support for manageing the DB. In fact the vendor and “local experts” said there was no reason to “worry about” the database. 3 days later the drive filed up by a developer and a runaway and the databse crashed.
At least with files I could get tape backups easily.
Also CVS supports the RCS $ ID $ etc tags. These are
(IMNSHO) required for solid code. can Subversion do
this?
Donaldson
hello,
I wanted to try running svn server on my w9x workstation but the berkeleydb doesn’t work on w9x.
Is it possible to run svn server on such machine?
thanks a lot,
a.
@Donaldson:
“Hello,
From an industry perspective I would rather have the file layout of cvs.
Well from my industry perspective I would rather have the berkley DB. Because it’s a DB, subversion is *FAR* more efficient and faster than the average traditional filesystem based VCS systems.
[quote]I know from personal experience about DB and source control and it was just bad. The product was continus and It used informix. Well there was no direct support for manageing the DB. In fact the vendor and “local experts” said there was no reason to “worry about” the database. 3 days later the drive filed up by a developer and a runaway and the databse crashed.”[/i]
The difference is, they probably used a proprietary database. Subversion does not. Subversion provides an easy way to dump the contents of the database for “replay” later. Provides administrative tools to recover the databsae, and additionally since it’s a berkley database the tools needed to manipulate it or extract data (including subversion itself) are completely open source.
So, *if* for whatever reason you did have a problem:
1) Being in an “industry” or “professional” environment, you’re going to have a backup of some kind of the (relatively small, most SVN db’s are a few hundred MB or less) database
2) It’s very easy to restore or rebuild a repository
So your arguments really don’t hold water. Subversion has proven itself fairly reliable to host extremely large projects such as GtkRadiant (http://www.qeradiant.com/) which has gigabytes of data in it’s code repositories
The company I work for has used it for the past year or so and we’ve had very few problems with it, and we’ve used it since it was in Alpha quality
I think the real problem is you’re just afraid you’ve lost control without the good ole’ comfort of CVS style source management. Get over it.
I’m looking for a CVS like server (NOT Visual Source Safe) that the server can run on Windows, intergrate with IIS and use Active Directory for authentication. Does anyone know of a product that would for in this scenario?
Thx
You really should check GNU arch (www.gnuarch.org)
It doesn’t require any such things as a database other that a file system with ling path support, it allows exchanges (commit, get, mirror, etc) over any standard file transfer protocol (sftp, ftp, http, and cp )
It also supports md5 and signatures on each patch. It has pretty powerful branches and merges capabilities.
And it was literally designed for distributed developpement. It doesn’t require a central server or anything, thus you can always commit, even when away from the internet, merging your changes with the rest of the world when you get back online without losing revision control.
As was mentionned it mostly lacks a good graphical interface. Another drawback is that it requires a change in your habits, there is quite a difference in how it works compared to cvs
Check out the following site which dispells some of the Subversion FUD that I see reproduced in this thread:
http://www.red-bean.com/sussman/svn-anti-fud.html
The page was written by one of the developers, Ben Collins-Sussman. It’s a good read.
RE Shawn:
#1. I never felt like I lost control, I’m an informinx and Oracle DBA and I knew exactly where ALL of my source was.
The Issue I have is people complain that with file based systems you have to manage the files, aka move directories,
move files etc. Wel going to a DB system means you have to
manage the DB. The question Managers need to ask.
Q: Do I have the resources to manage an DB?
The answer to this can vary widely, In an engineering based company file management is easier to understand while in a computer scientist company the DB management may be easier.
I was relateing an event that had occured. This event shows that DB systems are not a cure all but bring about A new set of issues and problems.
Next Question about the DB system is what happens when there is an error in the DB? ( And yes DB software has errors). For simple projects the risks of a DB may be to great.
My 2 cents.
Donaldson
Note: Sorry about speelling errors.
@donaldson:
Q: Do I have the resources to manage an DB?
The answer to this can vary widely, In an engineering based company file management is easier to understand while in a computer scientist company the DB management may be easier.
But the point is with subversion, the “DB” is merely a databse *FILE*. There is no database to manage! Subversion handles all of it. In fact, any subversion database operations you have to perform are done through svnadmin, and it would be very rare that you would have to do this. Renaming files, moving directories, etc. are all handled during commits by developers. No administration is needed. There is no additional database software needed. Just a fairly standard database library that’s included with almost every Linux distribution.
[quote]I was relateing an event that had occured. This event shows that DB systems are not a cure all but bring about A new set of issues and problems.
Next Question about the DB system is what happens when there is an error in the DB? ( And yes DB software has errors). For simple projects the risks of a DB may be to great.[/quote]
I never said DB systems were a cure all, I merely implied that it was better in this case. Using subversion’s system is no more risky than a filesystem based one when it comes to version control systems. Especially in a “professional” environment. Since:
1) There is no database to manage, there is a database “file” and it is managed by subversion
2) All major functions such as moving, renaming, deleting, etc. are handled through the subversion client by whomever is committing changes to the repository
3) Just about any administrative functions that would have to be performed are again done by subversion (svnadmin or the client)
4) Since any professional sane company would have a daily backup of some sort of their code repositories, in the worst case scenario you may have to use your backup. If not, you can always use svnadmin recover /path/to/repository
So I really don’t see how you can see it’s “more risky.”
I’ve been using Subversion both at work and on my personal server for several months now, and will never look back at CVS again. Atomic commits are a big plus, as is the ability to rename files while keeping the versioning.
Another key advantage: it runs just as well under Windows as Linux/UNIX operating systems. Yeah, you can run CVS under Windows, but CVS was really designed with UNIX file systems in mind. And the TortoiseSVN client for Windows Explorer just rocks.
Has anyone compared Subversion to Monotone and GNU arch? I’ve been using GNU arch for a while. It is a bit crude, but it’s getting there.
What if the DB got corrupt? There is high chance that you will lose everything but its not the same in files. Also the best thing with file is, all existing tools work on it. You can chose your favourite editor or favourite front end to manipulate files in your repository.
When i moved from windows based Version controls like Source safe to CVS and i saw that CVS maintains repository in file system itself, it was a breeze of cool air, i loved the idea so much and now subversion which says will kill CVS is using a database…others may like it..but i don’t like it.
Due to this DB thing, i don’t think i will ever switch to subversion. I agree that for distributed projects, it may be helpful but even though i am admin of distributed project, i like to have full control. I can easily manage my CVS repository through shell scripts and i have much better control.
For example i can easily print a file in repository and analyze who has done what changes when…i bet it won’t be so easy with SVN. I can ftp individual files…treat them the way i want without worrying about DataBase at all.
I did some speed tests a few weeks ago comparing Subversion and Microsoft Visual SourceSafe over a VPN. Adding a set of files and subdirectories to the repository took 1 minute 30 seconds (averaged over three runs) in Subversion, while VSS took 49:07 (only one run because it took so long).
Getting those same set of files took 0:30 in Subversion, but 7:25 in VSS.
I read somewhere that there are ways to speed up VSS so it works better over slow connections (aside from using something like SourceOffSite), but these tests were performed on a base system without any optimizations.
RE: Shawn
1) It’s just a file.
A) Still a DB, Oracle can be just a file but it’s still a DB in the file.
2) All major functions such as moving, renaming, deleting, etc. are handled through the subversion client by whomever is committing changes to the repository
A) Never Argued this, it’s an advantage of the DB.
3) Just about any administrative functions that would have to be performed are again done by subversion.
A) Maybe maybe not. If the DB file becomes corrupted the SA has to fix this. (Allow me to remind readers of the DB bug with RPM’s. For a long time rpm –rebuilddb was a popular command.)
4) Daily Backups.
A) If the SA’s actually back the DB up correctly then this works well but you cannot just save the DB file to tape. You have to insure the file aka DB is shut down before writing to tape. OR use DB tools to dave the deltas OR aquire locks on items before saving. With the file system you have the same issue but an open file on;y effects one source file.
Also if the FDb file gets corrupt it may wipe out ALL of the source files. (And yes this has happen to me)
All systems have risk, the more layers and complexity the greater the risk. Subversion is a nice upgrade to CVS but it’s not the end all. At a point projects may need to move to change control systems like PVCS.
> Subversion has proven itself fairly reliable to host
> extremely large projects such as GtkRadiant
> (http://www.qeradiant.com/) which has gigabytes of data
> in it’s code repositories
So They have 1 DB4 file that is multiple gigabytes in size. This is a risk That is one multiple gigabyte DB that needs to be manage correctly. And I will say this without proff but feel it’s more than likely true… Subversion is the wrong solution to their source control needs. I would imagine the need a full blow change management system like PVCS by now.
Note: For the record PVCS does run on top of Oracle.
Note: I’m not saying a DB is a bad thing but it has more
risk to it. I can show examples of large scale
projects run with an excel spreadsheet. The
underlying risk I’m talking about is the new layers
of code andthe fact there is a DB that should
, shall, or may, need to managed as a DB not
a lack box that will never fail.
Donaldson
Subversion’s DB can be dumped into a flat file which is similar in taste to RCS files. There are example checkin scripts which automatically dump incrementally into flat ascii files.
So don’t worry about the non-regular files used. It’s not a problem.
I’ve been using SVN for over a year now with a FreeBSD/apache server, and checking out onto a Windows, FreeBSD, and Mac OSX. I’m a very happy camper.
I went the Apache 2+WebDav plugin route because the Subversion site conveniently pointed to the RPMs, but it took me absolutely ages to realise I’d made a common setup mistake – I’d put DocumentRoot for normal Apache Web requests as a parent of the Subversion repositories (e.g. /usr/local/svn for DocumentRoot vs. an SVNPath of, say, /usr/local/svn/test). The install documentation does not say anything about this and the “fix” is buried in the FAQ (question 48 out of 55 !).
Also, the Subversion team have been tardy keeping their rapidsvn RPMs up to date (6+ months old in most cases, the one for Red Hat 8.0 is impossible to install [neon dependency doesn’t match the neon RPM] and there isn’t an RPM for Fedora Core 1 !!), so I had to build it from source. When I did, I ran it, but couldn’t find a way to run an editor on a selected file (you could rename, delete etc., but clearly you’d really want to edit the file and have its status change when you exit the edit). Maybe that’s a build option I missed (couldn’t see any configure options to turn it on) – rapidsvn isn’t much use without the ability to edit files really…
I then looked for documentation for rapidsvn and, er, I couldn’t find any ! Does anyone out there know of any because if there isn’t, this is a serious shortcoming of the project. I just wanted to see if my source-built version of rapidsvn was supposed to allow you to edit a file or not and hopefully the docs would have told me…
BTW, I’ve also been looking at Eclipse and it looks promising and I thought I’d be able to integrate Subversion support into it, but if you go to the “Subclipse” site at http://subclipse.tigris.org/ they’ve amazingly only provided a Subclipse plug-in for Windows Eclipse+Subversion users (and I bet I can count them on the fingers of one hand !) with Linux support to come at some unspecified time in the future.
I’ll give Subversion a “B” at the moment – the lack of warning in the install docs about DocumentRoot not clashing with repositories in an Apache install is a poor omission, no rapidsvn documentation, out-of-date/non-working RPMs for rapidsvn and a lack of Linux integration with Eclipse need to be fixed before I can improve its grade. It does show promise though and, as others have noticed, the TortoiseSVN client on Windows looks good (I wonder if the same thing can be done in GNOME or KDE’s file managers ?).
Subversion, what a great name!
Visual SourceUnsafe is a piece of shit. I’m pretty sure Microsoft doesn’t use it internally. It may work okay for small projects, but it has caused numerous headaches for our development team over the past couple of years. I have been trying to get them to move to perforce, but alas management refuses to spend money on such “non-critical” things as a Source control tool.
Just wish there was a good subversion plugin for Eclipse. There is one but it seams to be dated and is currently windows only.
Subversion seems not provide this feature. Is it true???
Subversion is the wrong solution to their source control needs. I would imagine the need a full blow change management system like PVCS by now.
Ironically in our company we are contemplating moving away from PVCS because as far as the developers are concerned it is even worse than RCS.
Re; lars
In all truth is it the developers find pvcs dosen’t satisfy there needs are the developers hate being under full chsnge control?
Yes, SVN can do $Id$ et al.
Subversion might not compare to some of the more advanced VCS suites out there, but sure as hell it beats CVS hands down.
(And if you think CVS repos are more reliable due to their file layout… oh man, rethink your backup strategy…)
Unless you’re using Apache 2, you can’t use the better features of Subversion. It’s internal svnserver is just about the same as CVS, perhaps with a few perks. And yes, there are places where you can’t use Apache 2 nor deploy one just for the sake of Subversion.
Bull. What “better features” are you talking about?
The Apache 2 module gives you three things:
* automatic, if base, online browsing of your repository (latest revision only);
* repository access using http:// (port 80) instead of svn://;
* user authentication using Apache.
*All* other SVN features are readily available with the internal svnserve. You can set up ViewCVS for the online browsing, and the user authentication with svnserve is easy enough (basically a file listing user = password pairs, and whether authorized / unauthorized users have no access, read access, or read / write access. If you can’t set up an Apache 2 and can’t open the SVN port in your firewall, that’s a good sign that you aren’t supposed to run a repository on the machine in question.
Surprising how many people dismiss a software without really knowing what they’re talking about. For a time, I thought this is limited to the usual Windows – Linux, Linux – Windows hubris, but obviously the problem is a deeper one… 🙁
The subclipse project provides prebuilts for Windows, but the code works just fine on Linux. I demonstrated it at EclipseCon a couple weeks ago in my Subversion talk, from my Linux laptop.
btw, re: RapidSVN: that isn’t part of the Subversion project. If they’re behind, then well… sucks. But don’t blame SVN 🙂