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

Subversion basic commands Part I (See related posts)

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

You need to create an account or log in to post comments to this site.


Click here to browse all 5140 code snippets

Related Posts