/path/to/svnroot
.
Create the database (repository). You can select database type by --fs-type [fsfs|bdb] option, but I just use default.
% svnadmin create /path/to/svnroot % (cvs -d /path/to/cvsroot init)
% svn help % (cvs --help-options (global), cvs -H [command] (command local))
% cp -rp /my/cvs/repository /cvs/copydir/ # make working dierctory for cvs2svn % mkdir /svn/workdir/ # move to the workiing directory % cd /svn/workdir/ # convert (--use-cvs is for safety) % cvs2svn --use-cvs --dump-only /cvs/copydir # import converted data to svn repository % svnadmin load /path/to/svnroot < cvs2svn-dumpAfter that you can delete the backup copy.
% svn import myproj file:///path/to/svnroot/myproj -m "Initial import" % (cvs import (position in the repository) vender-tag release-tag) (Ex.: % cvs import myproj hitoshi SNAP19980610)For branching, it is recommended to have a trunk directory under myproj. Like myproj/trunk.
% svn checkout (the position of top directory in the repository) Ex. svn checkout file:///path/to/svnroot/myproj/trunk % (cvs checkout (the position of top directory in the repository))After file: three '/'s (///) are necessary.
~/.subversion/config
(Unix),
%APPDATA%/Subversion/config
(Windows, not checked by
myself).# global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#*
.DS_Store
. You can write like that. In the case of cvs,
~/.cvsignore
is used for global ignore.
svn propedit svn:ignore directory_name
Then youe editor runs. Put the ignore patteren (similar to
cvsignore). For example,
*.png *.epsto ignore the *.png and *.eps files under the directory_name.
% svn add filename % (cvs add filename) and % svn commit % (cvs commit)
% svn revert filename % (svn revert --recursive directory)
% svn status % (cvs status, # but cvs status is not so helpful, some people use cvs -n update) # If you want to know what is ignored, % svn status --no-ignore
% svn commit % (cvs commit)
% svn delete file % (rm file; cvs remove file)
If you haven't rm file-a, cvs complains it, but subversion does not.
% svn move src dst % (mv src dst; cvs remove src; cvs add dst)
svn propset svn:keywords "Id Date" your_file
svnlook youngest /path/to/svnroot => revision number
# # Dump the repository contents on the old machine # svnadmin dump /path/to/svnroot > svnrepository.dump # # create new repository on the new machine # svnadmin create /path/to/new/svnrepository svnadmin load /path/to/new/svnrepository < svnrepository.dump
# # run the svnserve at the server machine. # svnserve options # -d daemon mode # -r relative directory (Only show under this directory.) # svnserve -d -r /home/hitoshi/tmp/testrepos svn ls svn://localhost/trunk
svn ls svn+ssh://localhost/path/to/new/svnroot/trunkNote, svn+ssh runs svnserve locally, it does not matter svnserve runs already or not (maybe to be for secure reason). Therefore, you need the full path of the repository in this case.