From MattWiki
(Redirected from SVN)
Jump to: navigation, search
  • To download an older version from SVN
svn co -r12360
  • To add a new project to your svn directory
svn --username <YourSvnUsername> import <LocalDirectoryToImport><NewProject> -m "Initial Import"
  • To Switch Subversion Servers for a project
svn switch --relocate \ \
  • To view the log from revision 2 threw revision 5
svn log -r2:5

  • To install Subversion Server
yum install httpd subversion mod_dav_svn


One important feature of the Subversion filesystem is properties: simple name=value pairs of text. Properties occur in two different places in the Subversion filesystem. The first is on filesystem entries (i.e., files and directories). These are versioned just like other changes to the filesystem. Users can add any property they wish, and the Subversion client uses a set of properties, which it prefixes with 'svn:'.

Makes files on Unix-hosted working copies executable.
Stores the Internet media type ("MIME type") of a file. Affects the handling of diffs and merging.
A list of filename patterns to ignore in a directory. Similar to CVS's .cvsignore file.
A list of keywords to substitute into a file when changes are made. The file itself must also reference the keywords as $keyword$ or $keyword:...$. This is used to maintain certain information (e.g., author, date of last change, revision number) in a file without human intervention.
The keyword substitution mechanism originates from rcs[1] and from cvs.
Makes the client convert end-of-line characters in text files. Used when the working copy is needed with a specific EOL style. "native" is commonly used, so that EOLs match the user's OS EOL style. Repositories may require this property on all files to prevent inconsistent line endings, which can cause a problem in itself.
Allows parts of other repositories to be automatically checked-out into a sub-directory.
Specifies that a file is to be checked out with file permissions set to read-only. This is designed for use with the locking mechanism. The read-only permission reminds one to obtain a lock before modifying the file: obtaining a lock makes the file writable, and releasing the lock makes it read-only again. Locks are only enforced during a commit operation. Locks can be used without setting this property. However, that is not recommended, because it introduces the risk of someone modifying a locked file; they will only discover it has been locked when their commit fails.
This property is not meant to be set or modified directly by users. As of 2010 only used for having symbolic links in the repository. When a symbolic link is added to the repository, a file containing the link target is created with this property set. When a Unix-like system checks out this file, the client converts it to a symbolic link.
Used to track merge data (revision numbers) in Subversion 1.5 (or later). This property is automatically maintained by the merge command, and it is not recommended to change its value manually.[2]

Subversion also uses properties on revisions themselves. Like the above properties on filesystem entries the names are completely arbitrary, with the Subversion client using certain properties prefixed with 'svn:'. However, these properties are not versioned and can be changed later.

the date and time stamp of a revision
the name of the user that submitted the change(s)
the user-supplied description of the change(s);