Jump to content

Apache Subversion

From Wikipedia, the free encyclopedia
(Redirected from Mod dav svn)
Apache Subversion
Original author(s)CollabNet
Developer(s)Apache Software Foundation
Initial release20 October 2000; 24 years ago (2000-10-20)
Stable release(s)
1.14.5 / 8 December 2024; 5 months ago (2024-12-08)
Repository
Written inC
Operating system
TypeRevision control
LicenseApache-2.0[note 1]
Websitesubversion.apache.org

Apache Subversion (often abbreviated SVN, after its command name svn) is a free and open-source version control system distributed under the Apache License.[1] Software developers use Subversion to maintain current and historical versions of files such as source code, web pages, and documentation. Its goal is to be a mostly compatible successor to the widely used Concurrent Versions System (CVS).[2]

The open source community has used Subversion widely in projects such as Apache Software Foundation, FreeBSD, SourceForge, and from 2006 to 2019, GCC.[3] CodePlex was previously a common host for Subversion repositories.[4]

Subversion was created by CollabNet Inc. in 2000 and is now a top-level Apache project being built and used by a global community of contributors.[5]

History

[edit]

CollabNet founded the Subversion project in 2000 as an effort to write an open-source version-control system which operated much like CVS but which fixed the bugs and supplied some features missing in CVS.[2] By 2001, Subversion had advanced sufficiently to host its own source code,[2] and in February 2004, version 1.0 was released.[6]

In November 2009, Subversion was accepted into Apache Incubator: this marked the beginning of the process to become a standard top-level Apache project.[7] It became a top-level Apache project on February 17, 2010.[8]

Version history

[edit]
Major Subversion releases[9]
Version Release date Latest update Status Notes
1.0 2004-02-23[10] 1.0.9 (2004-10-13) End of Life First stable release
1.1 2004-09-29[11] 1.1.4 (2005-04-01) End of Life FSFS backend, symlinks
1.2 2005-05-21[12] 1.2.3 (2005-08-19) End of Life Peg revisions, DAV autoversioning
1.3 2005-12-30[13] 1.3.2 (2006-05-23) End of Life Performance improvements
1.4 2006-09-10[14] 1.4.6 (2007-12-21) End of Life Working copy performance
1.5 2008-06-19[15] 1.5.9 (2010-12-06) End of Life Merge tracking, sparse checkouts
1.6 2009-03-20[16] 1.6.23 (2013-05-30) End of Life Tree conflicts, FSFS packing
1.7 2011-10-11[17] 1.7.22 (2015-08-12) End of Life Centralized metadata, HTTPv2
1.8 2013-06-18[18] 1.8.19 (2017-08-10) End of Life Automatic merging, move tracking
1.9 2015-08-05[19] 1.9.12 (2019-07-24) End of Life FSFS format 7, FSX experimental
1.10 LTS 2018-04-13[20] 1.10.8 (2022-04-12) End of Life[21] Previous LTS release
1.11 2018-10-30[22] 1.11.1 (2019-01-11) End of Life Shelving, checkpointing
1.12 2019-04-24[23] 1.12.2 (2019-07-24) End of Life Improvements to shelving
1.13 2019-10-30[24] 1.13.0 (2019-10-30) End of Life Last non-LTS release
1.14 LTS 2020-05-27[25] 1.14.5 (2024-12-08)[26] Currently Supported Current LTS release
1.15 TBD In Development Next release

Release support policy

[edit]

Subversion follows a support policy where:[27][28]

  • Regular releases are supported for six months from initial release
  • LTS releases are supported for four years from initial release and until three months after the next LTS release
  • The current LTS release (1.14) is supported until at least 2024

Features

[edit]

Core features

[edit]
  • Atomic commits: Unlike CVS, interrupted commit operations do not cause repository inconsistency or corruption[29]
  • Directory versioning: The system maintains versioning for directories and file metadata[29]
  • Efficient branching: Branching is implemented as a cheap copy operation (O(1)), independent of file size[30]
  • Binary file support: Native support with space-efficient binary-diff storage[31]
  • Symbolic link versioning: Full versioning support for symbolic links[32]
  • Multiple network protocols: Supports HTTP/HTTPS via WebDAV, custom SVN protocol, and local file access[33]

Advanced features

[edit]
  • Merge tracking: Automatic tracking of merges between branches (since version 1.5)[34]
  • File locking: Support for unmergeable files through "reserved checkouts"[35]
  • Path-based authorization: Fine-grained access control at the directory and file level[36]
  • Properties system: Versioned metadata stored as name=value pairs[37]
  • Language bindings: APIs available for C#, PHP, Python, Perl, Ruby, and Java[38]
  • Internationalization: Fully internationalized program messages[39]
  • Shelving (experimental): Temporarily set aside changes without committing (since 1.10)[40]
  • Changelists: Organize working copy changes into logical groups[41]

Architecture

[edit]
Subversion's two-dimensional filesystem model

Subversion uses a layered library design with clear separation of concerns:[42]

Fs (Filesystem)
The lowest level; implements the versioned filesystem which stores the user data
Repos (Repository)
Manages the repository built around the filesystem, handles hooks and helper functions
mod_dav_svn
Provides WebDAV/Delta-V access through Apache 2
Ra (Repository Access)
Handles both local and remote repository access using URLs
Client/Wc (Working Copy)
The highest level; manages local working copies and provides client operations

The Subversion filesystem can be viewed as "two-dimensional", with coordinates of:[43]

  • Path: Regular filesystem path
  • Revision: A specific point in the repository's history

Repository storage

[edit]

FSFS (default)

[edit]

In 2004, a new storage subsystem called FSFS (FileSystem atop the FileSystem) was developed.[44] It became the default data store for new repositories starting with Subversion 1.2.[45] FSFS stores its contents directly within the operating system's filesystem and offers several advantages:

  • Better performance with directories containing many files
  • More efficient disk usage due to less logging[44]
  • No risk of repository corruption from interrupted operations

Berkeley DB (deprecated)

[edit]

The original development of Subversion used the Berkeley DB package.[44] This backend had limitations when programs accessing the database crashed or terminated forcibly. While no data loss occurred, the repository would remain offline during journal replay and lock cleanup. The safest way to use Subversion with a Berkeley DB repository involved a single server-process running as one user.[44] The Berkeley DB backend was deprecated in version 1.8.[46]

FSX (experimental)

[edit]

A new filesystem called FSX is under development to address some limitations of FSFS. As of version 1.9, it was not considered production-ready.[47]

Repository access

[edit]

Subversion repositories can be accessed through three methods:[33]

  1. Local filesystem: Using the file:///path access scheme[note 2]
  2. WebDAV/Delta-V: Over HTTP or HTTPS using the mod_dav_svn module for Apache 2
    • http://host/path for standard access
    • https://host/path for secure SSL connections
  3. SVN protocol: Custom protocol (default port 3690)
    • svn://host/path for unencrypted transport
    • svn+ssh://host/path for SSH tunneling

All three methods can access both FSFS and Berkeley DB repositories. Any 1.x version of a client can work with any 1.x server, with newer versions providing additional features while maintaining backward compatibility.[48]

Properties

[edit]

Subversion's properties system provides versioned metadata as simple name=value pairs of text. Properties can be set on files, directories, or revisions.[37]

File and directory properties

[edit]
svn:executable
Makes a file executable on Unix-like systems[32]
svn:mime-type
Stores the Internet media type of a file, affecting diff and merge operations[49]
svn:ignore
Lists filename patterns to ignore in a directory (similar to CVS's .cvsignore)[50]
svn:keywords
Enables keyword substitution ($Author$, $Date$, $Revision$, etc.)[51]
svn:eol-style
Controls end-of-line character conversion (native, CRLF, LF, CR)[52]
svn:externals
Defines external repository dependencies[53]
svn:needs-lock
Indicates files that should be locked before editing[54]
svn:special
Used internally for symbolic links (not meant for direct user modification)[32]
svn:mergeinfo
Tracks merge history (automatically maintained since version 1.5)[55]

Revision properties

[edit]

Unlike file properties, revision properties are not versioned and can be modified after commit (if allowed by repository hooks):[56]

svn:date
Timestamp of the revision
svn:author
Name of the user who committed the revision
svn:log
Commit message

Branching and tagging

[edit]
Visualization of a Subversion project showing trunk, branches, and tags

Subversion uses the inter-file branching model from Perforce[57] to implement branches and tags. Both are created using the svn copy command, which creates a cheap copy that preserves history while using minimal repository space.[58]

A typical repository layout follows this convention:[59]

/project
  /trunk      # Main development line
  /branches   # Feature and release branches
  /tags       # Release tags and milestones

The key difference between branches and tags is convention: branches are intended for ongoing development, while tags represent fixed points in history.

Security

[edit]

Recent security fixes

[edit]

The latest release (1.14.5) includes a fix for CVE-2024-46901, addressing a denial-of-service vulnerability in mod_dav_svn via control characters in paths.[60][61]

Previous security fixes in the 1.14.x series include:

  • CVE-2024-45720 (fixed in 1.14.4)[62]
  • CVE-2021-28544 and CVE-2022-24070 (fixed in 1.14.2)[63][64]
  • CVE-2020-17525 (fixed in 1.14.1)[65]

These security issues primarily affect Subversion servers (mod_dav_svn and svnserve) rather than clients.[66]

Limitations

[edit]

Technical limitations

[edit]
  • Rename operations: Implemented as copy+delete rather than true renames, which can cause merge conflicts[67][68]
  • No obliterate feature: Cannot permanently remove data from repository history[69]
  • Working copy overhead: Stores pristine copies of all files locally (addressed in version 1.7 with centralized metadata)[70]
  • No modification times: Files receive current timestamp on checkout[71]
  • Centralized model: Requires repository access for most operations[72]

Platform-specific issues

[edit]

Design decisions

[edit]

The centralized model has been both praised and criticized. Ben Collins-Sussman, one of Subversion's designers, argued it helps prevent "insecure programmers" from hiding their work.[74] Critics like Linus Torvalds have argued for the superiority of distributed version control systems.[72]

Subversion tags are implemented as directory copies rather than lightweight references, which differs from other version control systems and has been a source of ongoing discussion in the community.[75][76]

Development

[edit]

Project governance

[edit]

Subversion is maintained by the Apache Software Foundation as a top-level project.[77] The development community includes:

  • Core committers from various organizations[78]
  • Corporate sponsors including CollabNet and WANdisco (now Cirata)[79]
  • Open source contributors worldwide

In October 2009, WANdisco announced significant investment in Subversion development, hiring core committers including Hyrum Wright, who served as president of the Subversion Corporation and release manager.[80]

Integration and tools

[edit]

The Subversion project does not provide an official GUI, but numerous third-party tools are available:[81]

See also

[edit]

Notes

[edit]
  1. ^ Apache-2.0 since 2009-07-07.
  2. ^ Berkeley DB relies on file locking and thus should not be used on (network) filesystems which do not implement them

References

[edit]
  1. ^ "Subversion". directory.fsf.org. Free Software Directory. 2020. Retrieved 3 October 2023.
  2. ^ a b c Collins-Sussman, Ben; Brian W. Fitzpatrick; C. Michael Pilato (2011). "What is Subversion? > Subversion's History". Version Control with Subversion (for Subversion 1.7). Retrieved 15 March 2012.
  3. ^ "GCC SVN to Git Conversion". GCC Wiki. Retrieved 2025-05-28.
  4. ^ Brian Harry (2017-03-31). "A new home for CodePlex". Microsoft. Retrieved 2025-05-28.
  5. ^ "The Apache Software Foundation Announces 20th Anniversary of Apache Subversion". GlobeNewswire News Room (Press release). 2020-02-27. Retrieved 2023-01-29.
  6. ^ Benjamin Zeiss (2004). "subversion 1.0 is released". Linux Weekly News. Retrieved 30 March 2014.
  7. ^ Rubinstein, David (4 November 2009). "Subversion joins forces with Apache". SD Times. Archived from the original on 2009-11-11. Retrieved 15 March 2012.
  8. ^ "Subversion is now Apache Subversion". 18 February 2010. Archived from the original on 12 May 2011. Retrieved 15 March 2012.
  9. ^ "Subversion Release History". Apache Software Foundation. Retrieved 2025-05-28.
  10. ^ "Subversion 1.0.0 CHANGES". Apache Software Foundation. Retrieved 2025-05-28.
  11. ^ "Subversion 1.1 Release Notes". Apache Software Foundation. Retrieved 2015-09-21.
  12. ^ "Subversion 1.2 Release Notes". Apache Software Foundation. Retrieved 2015-09-21.
  13. ^ "Subversion 1.3 Release Notes". Apache Software Foundation. Retrieved 2015-09-21.
  14. ^ "Subversion 1.4 Release Notes". Apache Software Foundation. Retrieved 2015-09-21.
  15. ^ "Subversion 1.5 Release Notes". Apache Software Foundation. Retrieved 2015-09-21.
  16. ^ "Apache Subversion 1.6 Release Notes". Apache Software Foundation. Retrieved 2015-09-21.
  17. ^ "Apache Subversion 1.7 Release Notes". Apache Software Foundation. Retrieved 2015-09-21.
  18. ^ "Apache Subversion 1.8 Release Notes". Apache Software Foundation. Retrieved 2015-09-21.
  19. ^ "Apache Subversion 1.9 Release Notes". Apache Software Foundation. Retrieved 2015-09-21.
  20. ^ "Apache Subversion 1.10 Release Notes". Apache Software Foundation. Retrieved 2018-04-17.
  21. ^ "Subversion 1.10.x line is end of life (EOL)". Apache Software Foundation. 2022-04-12. Retrieved 2025-05-28.
  22. ^ "Apache Subversion 1.11 Release Notes". Apache Software Foundation. Retrieved 2018-10-31.
  23. ^ "Apache Subversion 1.12 Release Notes". Apache Software Foundation. Retrieved 2019-05-01.
  24. ^ "Apache Subversion 1.13 Release Notes". Apache Software Foundation. Retrieved 2025-05-28.
  25. ^ "Apache Subversion 1.14 LTS Release Notes". subversion.apache.org. Retrieved 2020-06-02.
  26. ^ Daniel Sahlberg (2024-12-08). "[SECURITY][ANNOUNCE] Apache Subversion 1.14.5 released". Apache Software Foundation. Retrieved 2025-05-28.
  27. ^ "How We Plan Releases". Apache Software Foundation. Retrieved 2025-05-28.
  28. ^ "Apache Subversion End-of-life Date". endoflife.date. Retrieved 2025-05-28.
  29. ^ a b Ben Collins-Sussman; Brian W. Fitzpatrick; C. Michael Pilato (2011). "Fundamental Concepts". Version Control with Subversion. O'Reilly.
  30. ^ "Branching and Merging". Version Control with Subversion. Retrieved 2025-05-28.
  31. ^ "Subversion FAQ: How does Subversion handle binary files?". Apache Software Foundation. Retrieved 2025-05-28.
  32. ^ a b c "Special Properties". Version Control with Subversion. Retrieved 2025-05-28.
  33. ^ a b "Server Configuration". Version Control with Subversion. Retrieved 2025-05-28.
  34. ^ "Merge Tracking (foundational)". Subversion 1.5 Release Notes. Apache Software Foundation. Retrieved 2025-05-28.
  35. ^ "Locking". Version Control with Subversion. Retrieved 2025-05-28.
  36. ^ "Path-Based Authorization". Version Control with Subversion. Retrieved 2025-05-28.
  37. ^ a b "Properties". Version Control with Subversion. Retrieved 2025-05-28.
  38. ^ "API Documentation". Apache Software Foundation. Retrieved 2025-05-28.
  39. ^ "Subversion FAQ: Localization/Internationalization". Apache Software Foundation. Retrieved 2025-05-28.
  40. ^ "Shelving (experimental)". Subversion 1.10 Release Notes. Apache Software Foundation. Retrieved 2025-05-28.
  41. ^ "Changelists". Version Control with Subversion. Retrieved 2025-05-28.
  42. ^ "Embedding Subversion". Version Control with Subversion. Retrieved 2025-05-28.
  43. ^ "Basic Merging". Version Control with Subversion. Retrieved 2025-05-28.
  44. ^ a b c d e Ben Collins-Sussman; Brian W. Fitzpatrick; C. Michael Pilato (2011). "Chapter 5: Strategies for Repository Deployment". Version Control with Subversion: For Subversion 1.7. O'Reilly.
  45. ^ "FSFS is now the default repository backend". Subversion 1.2 Release Notes. Apache Software Foundation. Retrieved 2025-05-28.
  46. ^ "Berkeley DB backend deprecation". Apache Subversion 1.8 Release Notes. Apache Software Foundation. Retrieved 5 May 2020.
  47. ^ "Experimental FSX filesystem backend (server)". Apache Subversion 1.9 Release Notes. Apache Software Foundation. Retrieved 2025-05-28.
  48. ^ "Compatibility Concerns". Subversion 1.5 Release Notes. Apache Software Foundation. Retrieved 2025-05-28.
  49. ^ "File Content Type". Version Control with Subversion. Retrieved 2025-05-28.
  50. ^ "Ignoring Unversioned Items". Version Control with Subversion. Retrieved 2025-05-28.
  51. ^ "Keyword Substitution". Version Control with Subversion. Retrieved 2025-05-28.
  52. ^ "End-of-Line Character Sequences". Version Control with Subversion. Retrieved 2025-05-28.
  53. ^ "Externals Definitions". Version Control with Subversion. Retrieved 2025-05-28.
  54. ^ "Lock Communication". Version Control with Subversion. Retrieved 2025-05-28.
  55. ^ "Subversion Properties". Version Control with Subversion. Retrieved 2025-05-28.
  56. ^ "pre-revprop-change". Version Control with Subversion. Retrieved 2025-05-28.
  57. ^ "Inter-File Branching: A Practical Method for Representing Variants". Archived from the original on 2007-07-14. Retrieved 2025-05-28.
  58. ^ "Branching / Tagging — TortoiseSVN". Retrieved 2025-05-28.
  59. ^ "Repository Layout". Version Control with Subversion. Retrieved 2025-05-28.
  60. ^ "Apache Subversion CVE-2024-46901 Advisory". Apache Software Foundation. 2024-12-08. Retrieved 2025-05-28.
  61. ^ "CVE-2024-46901 Detail". National Vulnerability Database. Retrieved 2025-05-28.
  62. ^ "CVE-2024-45720 Detail". National Vulnerability Database. Retrieved 2025-05-28.
  63. ^ "Apache Subversion CVE-2021-28544 Advisory". Apache Software Foundation. Retrieved 2025-05-28.
  64. ^ "Apache Subversion CVE-2022-24070 Advisory". Apache Software Foundation. Retrieved 2025-05-28.
  65. ^ "CVE-2020-17525 Detail". National Vulnerability Database. Retrieved 2025-05-28.
  66. ^ "Apache Subversion Security". Apache Software Foundation. Retrieved 2025-05-28.
  67. ^ "Implement true renames". Apache Software Foundation. Archived from the original on 2002-12-01. Retrieved 2023-09-04.
  68. ^ "Advanced Merging". Version Control with Subversion. Retrieved 2025-05-28.
  69. ^ "[SVN-516] svn obliterate". Apache Software Foundation. Retrieved 2023-09-04.
  70. ^ "Working Copy Metadata Storage Improvements (client)". Subversion 1.7 Release Notes. Apache Software Foundation. Retrieved 2025-05-28.
  71. ^ "[SVN-1256] Ability to preserve last modification time (mtime) of files under version control". Apache Software Foundation. Retrieved 2023-09-04.
  72. ^ a b Linus Torvalds (2007-05-03). Tech Talk: Linus Torvalds on git. Google Tech Talks. Google. Retrieved 2025-05-28.
  73. ^ "[SVN-2464] Canonicalize / stringprep UTF-8 filenames to handle composed / decomposed differences shown by e.g. Mac OS X HFS+". Apache Software Foundation. Retrieved 2023-09-04.
  74. ^ Ben Collins-Sussman (2007-12-20). "Programmer Insecurity". Retrieved 2025-05-28.
  75. ^ Weintraub, David (23 May 2005). "Subversion 'labels' vs. 'tags'". SVN Dev (Mailing list). Retrieved 5 May 2020.
  76. ^ "Apache Subversion Roadmap". Apache Software Foundation. Retrieved 5 May 2020.
  77. ^ "The Apache Software Foundation Announces Apache Subversion as a Top-Level Project". Apache Software Foundation. 2010-03-01. Retrieved 2025-05-28.
  78. ^ "Committer Access". Subversion Community Guide. Apache Software Foundation. Retrieved 2025-05-28.
  79. ^ "WANdisco is now Cirata". Cirata. 2023-11-13. Retrieved 2025-05-28.
  80. ^ WANdisco (January 7, 2010). "WANdisco Names Hyrum Wright to Lead Subversion Open Source Efforts". News release. Open Source magazine. Archived from the original on 2012-01-18. Retrieved October 29, 2011.
  81. ^ "Apache Subversion Binary Packages". Official project website. Apache Software Foundation. Retrieved October 29, 2011.
  82. ^ "TortoiseSVN". Retrieved 2025-05-28.
  83. ^ "Subversion Links: Clients". Apache Software Foundation. Retrieved 2025-05-28.
  84. ^ "SVNKit". Retrieved 2025-05-28.

Further reading

[edit]
[edit]