Subversion Stuff

To establish a subversion repository anew:

svnadmin create /var/svn/myrepos
svn mkdir -m “creating the trunk dir” file:///var/svn/myrepos/repo1
svn import -m “Adding first directory” /var/www/vhosts/mydomain.com/wordpress file:///var/svn/myrepos/repo1
**Note that if you don’t specify a directory to copy, subversion is happy to add the one you are in to the repo.
svnadmin verify /var/svn/myrepos/

Subversion is not so forthcoming with the meaning of errors. If there is corruption in one of the revisions, it will just output the error when you do a

svnadmin verify repos/
[…]
* Verified revision 907.
* Verified revision 908.
* Verified revision 909.
svnadmin: Corrupt representation ‘907 21815 45 30922 158d3e72732f45bf6f02919b22fc899a’
svnadmin: Malformed representation header

This means that Revision 909 is good but Revision 910 is corrupted. The next step is to dump all the repos from 911 through the end of the repo which is in this case revision 947.

$ svnadmin dump –incremental -r 911:947 master/ > repo_name.svn_dump
* Dumped revision 911.
* Dumped revision 912.
* Dumped revision 913.
[…]
* Dumped revision 947.

svnadmin create /path/to/newrepo
svnadmin load /path/to/newrepoy < repo_name.svn_dump svnadmin verify repos/ * Verified revision 0. * Verified revision 1. * Verified revision 2. [...] * Verified revision 945. * Verified revision 946. * Verified revision 947.

About vicki

Welcome to the Sovereign Republic of Vickistan. I am the President here. Lucky me! No taxes or laws yet. Lucky you!
This entry was posted in Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *