Gavin Wye

Lying Awake Dreaming

Setting up a SVN repository and working copy

I have just started to use subversion for version control. It’s been pretty problematic to start with but I think I have cracked it now. I haven’t read the manual properly, I just dipped in now and then when I needed to. So here for future reference is how to create a repository and working copy.

  1. shh in to the server with SVN on it.
  2. go to the directory where SVN resides in my case /mnt/bigdisk/subversion.
  3. use the command svnadmin create project_name, so that I know that this is a repository I always name the directory like this svn_projectname.
  4. once you have the repository set up you need to do a SVN import like this; svn import path/to/project/files file:///repository_name/project -m “First Import”.
  5. You will now see the terminal spin whilst importing all of the files.
  6. Then go to you SVN client and do a SVN checkout.
  7. you now have a working copy to play with change files and add them when you have a fixed bit of the site.

Note: I’m not using branches trunk and tags in simple things like this as there aren’t likley to be many branches to a small sites.

Powered by ScribeFire.

Advertisements

Filed under: Blog

One Response

  1. gavinwye says:

    You need to chown the repository to be that same user as the user that owns the in this case

    $chown -R david.david svn_project

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: