Skip to content



rcs2svn convert tree of simple RCS files to SVN.


rcs2svn [-fghmvpn] [-[crs] cmd] [-u svn-url] [-d dir] [rcs-files]


The rcs2svn command converts a tree of simple RCS (Revision Control System) files to SVN (Subversion).

The script is not very clean and may be error prone. You may consider running rcs2cvs and cvs2svn or others instead.

SVN commits are performed for every revision of every file, in the same global order as the RCS checkins were performed. RCS informations are stored as properties in SVN:

  • rcs:date

    RCS checkin date.

  • rcs:author

    RCS checkin author, also put as SVN commit author.

  • rcs:rev

    RCS revision numbers, such as '1.28'.

  • rcs:state

    RCS revision status, such as 'Exp', 'Rel'...

  • rcs:lines

    RCS lines differences, such as '+15 -8'.


  • --help or -h

    show help about command usage.

  • --man or -m

    show full manual page.

  • --version or -V

    show script revision.

  • --verbose or -v.

    be verbose. Repeat for more.

  • --quiet or -q

    no interactive stuff.

  • --go or -g

    do it! Otherwise, nothing is done.

  • --no-user or -n

    do not issue SVN username on commits. Useful for HTTP repositories, where the username is authenticated.

  • --pdel or -p

    remove all "rcs:*" SVN properties in a last commit. Otherwise they are kept indefinitely.

  • --co cmd or -c cmd

    RCS checkout command, default to "co".

  • --rlog cmd or -r cmd

    RCS log command, default to "rlog".

  • --svn cmd or -s cmd

    SVN client command, default to "svn".

  • --url svn-url or -u svn-url

    specify destination repository and possible subdirectory. default to none, that it assume that the target directory is an svn working copy.

  • --directory path or -d path

    directory to convert. default is '.'.

  • --find or -f

    look for RCS files in directory hierarchy. Quite advisable.

  • --filter-message cmd or --fm cmd

    run filter on RCS checkin messages.

  • --temporary dir or --tmp dir

    temporary directory to be used. default is '/tmp'.

  • --time or -t

    use RCS checkin time as SVN commit time. It is better to do so, but it requires to enable revision property edition. See SVN repository administration documentation.

    If you want to add an RCS project as a subdirectory in an existing SVN repository, you may consider first converting to a new repository, and then to merge the repositories so as to keep an overall date order, but at the price of loosing the initial revision numbers.


RCS files to convert. Use simpler --find option if possible.


A project added as a directory in an existing repository:

sh> rcs2svn -d /to/project -u file:///to/repos/proj -f -v -n -g

A new repository that stores the project into "trunk":

# administration
sh> svnadmin create /to/repos
# enable revision property changes:
sh> echo -e "#! /bin/sh\nexit 0" > /to/repos/hooks/pre-revprop-change
sh> chmod +x /to/repos/hooks/pre-revprop-change
sh> svn mkdir -m 'initial setup' file:///to/repos/{trunk,branches,tags}

# conversion
sh> cd /to/rcs/project/hierarchy/copy
sh> svn co file:///to/repos/trunk .
sh> rcs2svn -f -v -p -t -g



(c) 2005-2010 Fabien Coelho <rcs2svn at coelho dot net>

This is free software, both inexpensive and available with sources. The GNU General Public License v3 or more applies (GPLv3+). The brief summary is: You get as much as you paid for, and I am not responsible for anything. See for details.


Beware! Run at your own risks. This software may destroy all your data. You might lose your hairs or your friends because of it. Think again.

Converting a significant projet requires a lot of shell (process forks) and file activity. Doing so with a remote (http, svn, file+nfs) repository is not a good idea. Consider doing that with a local temporary repository, for instance in "/tmp", and then to move the stuff later, possibly with svnadmin dump/load.

There are many reasons why the conversion may fail. Thus consider that it WILL fail, and act accordingly. Perform your operations on a copy of your directory structure and on a temporary repository.


Here is a subset of the great bugs provided freely with this software:

  • the --url option does not work if there is no subdirectory to create in the repository.
  • RCS branches are not handled.
  • SVN stops on unexpected string encoding in commit messages. Fix the message file, relaunch the commit manually, and continue.
  • The converted directories are left in a mess, with .svn and RCS sub-directories everywhere, and files checked out in strange states.
  • "rlog" output parsing is fuzzy and may fail in some case.
  • SVN username cannot be issued directly on HTTP repositories.
  • "rcs:*" properties are kept forever or deleted, although they would be best removed on the first SVN update.
  • Instead of doing all the processing in the target directory, the program should copy all RCS files to some temporary directory hierarchy.
  • Maybe all initial revisions (file creations) should be performed together at the first revision? Or it could be offered as an option?


The latest version of the perl script is available at

This additionnal script may be useful to handle iso-8859-1 encoded RCS comments:


Subversion site at


This documentation is about $Revision: 661 $ of the script.