Thursday, October 18, 2007

svn notes

Creating your repository
$ svnadmin create --fs-type fsfs /path/to/repos
$ svnadmin create --fs-type bdb /path/to/other/repos

Knowing the latest version of your repository
$ svnlook youngest /path/to/repos

svnadmin dump will output a range of repository revisions that are formatted using Subversion's custom filesystem
dump format. The dump format is printed to the standard output stream, while informative messages are printed to
the standard error stream. This allows you to redirect the output stream to a file while watching the status output in
your terminal window.
$ svnadmin dump myrepos > dumpfile

svnadmin load, parses the standard input stream as a Subversion repository
dump file, and effectively replays those dumped revisions into the target repository for that operation. It also gives
informative feedback, this time using the standard output stream:
$ svnadmin load newrepos < dumpfile

svnadmin dump outputs a range of revisions. Use the --revision option to specify
a single revision to dump, or a range of revisions. If you omit this option, all the existing repository revisions will
be dumped.
$ svnadmin dump myrepos --revision 23 > rev-23.dumpfile
$ svnadmin dump myrepos --revision 100:200 > revs-100-200.dumpfile

Importing your initial data to repository
$ svn import . file:///path/to/repos --message 'Initial repository layout'

you can use svn update and svn checkout with the --revision switch
to take an entire working copy "back in time”
$ svn checkout --revision 1729 # Checks out a new working copy at r1729
$ svn update --revision 1729 # Updates an existing working copy to r1729

To checkout:
$ svn checkout file:///path/to/repos

To know the version which you currently have
$ svn info

Adding a file to your repository
$ svn add newfile

Commiting Changes to your repository
$ svn commit -F log_msg.txt (for txt message files)
$ svn commit -m "put your message here"

No comments: