FAQ:

What's the difference between subversion and CVS?

Answer:

(from TWiki:Codev/SubversionChangesFromCVS) Subversion is designed as a drop-in replacement for CVS, so it's similar in many ways. However, there are a few changes:
  • Updates always add missing directories, as with the CVS -d flag.
  • Files and directories can be copied, moved, and renamed, all with full versioning and change history maintained back through all name changes.
  • Branches/tags aren't supported as a separate feature. Instead, they are created by simply making server-side versioned copies of the project into a different path. From a conceptual standpoint, if nobody ever commits to the copy, it's a tag. If someone does, it's a branch. Subversion doesn't care -- to it, a branch or tag is simply a new set of names for particular versions of existing files and directories. New commits don't affect other names, so they create a branch in the version history; both branches will show the common revisions toward the root in their logs.
  • Commits are atomic. If a commit fails at any point, all changes are rolled back.
  • Individual files don't have revision numbers. Instead, the entire repository has a single revision number that's incremented for every commit. As such, finding an entire atomic changeset is simply asking for the difference between any two adjacent revisions.
  • Subversion is binary-clean by default, and uses a binary diffing algorithm to maintain space-efficient versioning even on binary files.
  • Subversion has "properties", which are arbitrary versioned key-value pairs that can be attached to any file or directory. It reserves key names starting with "svn:" for special usage by the VCS. Some common keys are:
    • svn:ignore: Instead of using .cvsignore files, Subversion checks the contents of this property.
    • svn:keywords: Unlike CVS, Subversion does not replace $Keyword$ instances by default. This property can be set on a file to list which keywords should be substituted in the file on checkout. For example, Rev will provide the current repository revision.
    • svn:executable: This is actually a boolean setting. If present on a file, Subversion sets the execute permissions on checkout. This is obviously not applicable in a Windows environment.
    • svn:eol-style: Subversion also does not do any line-ending conversion by default. This property can be set to a variety of values to maintain any desired line-ending convention. The most common setting is native, which converts the file to the client platform's appropriate line-endings on checkout, and canonicalizes to LF on checkin.
    • svn:mime-type: Subversion can store the MIME type of a file. Unless set to something besides text/*, Subversion will assume files are human-readable and attempt to provide context diffs for the svn diff command.
  • Subversion has a client configuration file that can be used to set up "autoproperties," which derive appropriate settings for the above based on filename pattern matching.

More on SCM:

Back to: CodingFAQ

-- MichaelDaum -- 18 Mar 2005
Warning: Can't find topic Support.WebLeftBarExample

 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback