The Apache Subversion (SVN) open source version control system is out with its 1.8 release today. The new release follows the prior SVN 1.7 releaseby some 20 months and introduces a host of new features for developers.
The SVN 1.8 release also helps to further Subversion project answer the question of why to use SVN instead of Git.
One of the biggest changes in the SVN 1.7 release was the introduction of WC-NG (working copy next generation). In the SVN 1.8 release, WC-NG serves as the basis for new functionality. Greg Stein, VP of the Apache Subversion Project and Vice Chairman, Director, and ex-Chairman of the Apache Software Foundation explained to Developer.comthat WC-NG was built as a platform for new work/improvements/features.
Stein noted that prior to WC-NG the code that handled the “working copy” (your local files, checked out from the server) was a decade in the making. WC-NG rebuilt that decade of work into a clean, modern library .
“While SVN 1.8 doesn’t necessarily expand on WC-NG itself, the code has been streamlined further in many ways,” Stein said. “Its performance and robustness has been improved.”
One of the area where robustness has been improved is in the storage of metadata. SVN now tracks the moves of working copy items. Stein noted that the harder part is getting the rest of the system to recognize the moves, and that work is ongoing. He explained that from a historical perspective, SVN didn’t “move” items per se. Instead, the item was copied to its new location, and deleted from the old.
“This is problematic (for example) because if an edit comes in from the server for that deleted item, then we don’t know what to do with it,” Stein said. “For a moved item, then we know the edit should probably be applied to wherever the thing was moved.”
Git vs. SVN
In recent years, the Git version control system has gained in popularity. When it comes to comparing the open source Git version control system to SVN, one of the biggest topics of conversation is about forking and merging. In the SVN 1.8 release, Stein noted that lots of work has been done on simplifying the merging features.
“We used to expose all the knobs, but most people want just the obvious, direct case,” Stein said. “We’ve made that much more accessible (ref: automatic reintegration merge).”
He added that conflict resolution has also been improved, with better detection of more kinds of tree conflicts. Overall Stein argued that SVN 1.8 is very robust at handing tree conflicts. A tree conflict is where two users change the arrangement of files/directories in a conflicting way.
“Git only knows about files, and it makes guesses about where a file may have moved to, it doesn’t really track directory structure,” Stein said. ” It can make some good guesses, but guessing isn’t always a Good Idea when you’re trying to be methodical and deterministic when developing software.”
With the SVN 1.8 release, the project has now fully embraced the flat-file repository storage backend (FSFS) over its legacy BerkelyDB NoSQL database. Stein explained that FSFS is specifically tuned for the Subversion workload and can handle massive repositories on a single server.
“We don’t need the horizontal scaling capability of NoSQL,” Stein said. “We have yet to hear a case where a repository became too big for svn to handle.”
The use of FSFS also gives SVN comparison point with Git in that Git repositories are typically limited in size. The reason why Git repos are typically limited is because sysadmins don’t want every developer in a company mirroring a 200G repository over the LAN down to their desktop.
“With Subversion, you can have a 1T repository and check out just a small portion of it, The developers don’t need full copies,” Stein explained. “Git shops typically have many, smaller repositories, while svn shops typically have a single repository, which eases administration, backup, etc.”
While SVN 1.8 has some capabilities not present in Git, the reverse is also true. One of those features is the git-stash commandwhich will ‘stash’ changes in a working directory.
“The WC-NG work makes it possible for us to build that feature, and we just need somebody to spend their time on it,” Stein said.
The SVN project is also working to implement a form of offline commits, which is also something that Git currently has. Stein noted that the SVN project is working on a similar feature called “checkpoints” which is also enabled by WC-NG.
“Git is still a very fast tool, we’ve made some great improvements, but I don’t think we’ll ever be as fast,” Stein said. “Git’s underlying model of whole-repository has some very helpful repercussions. It simplifies a lot of things, and enables Git to keep that speed.”
Looking forward to the next release, a key topic in the SVN project is the release cycle itself.
“We’re looking at our release timeframes, and discussing how to reach nine month schedules, or thereabouts, rather than the 20 months for 1.8,” Stein said.
Sean Michael Kerner is a senior editor at Developer.com and InternetNews.com. Follow him on Twitter @TechJournalist.