Tuesday, April 24, 2018

Remembering how to use svn

I have been using git and GitHub for a while, but I still have some repos that are under svn. Of course, I don't remember the svn commands anymore.

List available repos with
svn list svn://server:port

To view all the folders in a particular repo
svn list svn://server:port | egrep "\$"

The folder layout should be
/trunk
/branch
/tag

I do not have any branches, just trunk and tag.

I work in NetBeans. I checked out the trunk into a local folder, not a NetBeans project. I used the built-in svn client in NetBeans.

I created a separate NetBeans project, outside the version controlled folder. I created a web app with existing sources.

To add an existing project to the repo, use the import command on the client. Use a root folder and a trunk subfolder.
svn import svn://server:port/root-dir/trunk

I also use the command line for checkout from the project_dir on the server to the local_dir
svn co svn://server:port/project_dir local_dir






Followers