Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

« Newer Snippets
Older Snippets »
3 total  XML / RSS feed 

export certain revision of file from svn

Easier to just cat the revision you want and copy it over rather than try to check out a certain revision.

svn cat -r [REV] mydir/myfile > mydir/myfile

Start Subversion Repository with Initial Import

// description of your code here

On the server (cannot be done remotely)
svnadmin create /var/svn/repository_name


On the client with the files to check in
svn import svn+ssh://myserver.com/var/svn/repository_name

You MUST use full path if using svn+ssh. If using HTTP, full path is not necessary.

Then erase the entire directory, and checkout the files from Subversion in order to make the current directory a working copy. Be careful and copy the directory to a backup directory before deleting all files and checking out a working copy.
cd ..
mkdir bak_directory
cp -R my_directory bak_directory
cd my_directory
rm -rf *
svn co svn+ssh://myserver.com/var/svn/repository_name .

Don't forget that period at the end of the checkout (co) statement. It will create the directory if you forget the . (current directory) optional parameter which will result in my_directory/my_directory/[your files]

Syncing Subversion

When there are directories and files that are in a subversion respository, but don't need to be under source control, you must delete them both in the repository and locally.

To delete it locally:

svn delete <dir> --force


To delete it at repository:
svn delete http://cru.textdriven.com/svn/<project_dir>/ -m ""


Then perform your commit as per normal:
svn commit -m ""
« Newer Snippets
Older Snippets »
3 total  XML / RSS feed