Never been to DZone Snippets 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

About this user

James Robertson http://www.r0bertson.co.uk

« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS 

Subversion basic commands Part II

This code shows how to checkout, commit, and verify the changes to a project file in subversion. See also Subversion basic commands part 1 http://urltea.com/1urp . The Subversion Online book can be read here http://svnbook.red-bean.com/

# get the project to edit
svn checkout http://mysite.com/svn/my-repository/my-project

#add a new file to the project
svn add feed/changelog

# commit the changes to the repository
svn commit feed

# check to see that the actual changes have been committed.
svn cat 
http://mysite.com/svn/my-repository/my-project/trunk/gwd/feed/gwd.rb

#remove the local project files
rm my-project -Rf

#get the project files without version control
svn export http://mysite.com/my-repository/my-project/trunk/gwd

Subversion basic commands Part I

New users to SVN should be familiar with the following commands. Examples based on the code from Gentoo-wiki - HOWTO subversion SVN http://urltea.com/1urj .

#server side

# create the project directory structure outside of svn
mkdir -p ~/Documents/code/my-project/{trunk,tags,branches} 

# create the new repository
svnadmin create /var/svn/my-repository 

# add the new project
svn import my-project file:////var/svn/my-repository/my-project

# remove the project
rm -rf /var/svn/my-repository/my-project 


#client side

# list the contents of my-project
svn list --verbose http://my-site.com/svn/my-repository/my-project 


# *update 29-Oct-07*
# it's possible to import, or remove the project from the client-side

# add the new project
svn import my-project http://my-site.com/svn/my-repository/my-project 

# remove the project
svn delete http://my-site.com/svn/my-repository/my-project 



Note: To use http on the client side, it's necessary to have Apache configured using SVN and DAV. Refer to HOWTO Apache2 with subversion SVN and DAV. http://urltea.com/1uqg
« Newer Snippets
Older Snippets »
Showing 1-2 of 2 total  RSS