subversion
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
subversion [2021/03/17 20:36] – [Importing A Directory] fixed to be svn peteyboy | subversion [2021/03/18 17:36] (current) – [Subversion] added RCS link peteyboy | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Subversion ====== | ||
+ | |||
+ | This tutorial is not about using a version control system, or about using Subversion, but about how to get started with Subversion on SDF. Other source control tools available for looking into are [[hosted git repos - gitea on sdf | SDF-hosted git]] (newer, distributed version control), [[CVS]] (older technology than SVN) and [[RCS]] (the granddaddy) | ||
+ | |||
+ | |||
+ | There are graphical tools such as TortoiseSVN, | ||
+ | |||
+ | Subversion is normally intended to be hosted on a server, so working with it locally with an SDF user account is a little awkward, requiring the use of '' | ||
+ | |||
+ | ===== Creating A Repository ===== | ||
+ | |||
+ | To create your own svn repository (place to store projects under source control) run the commands to setup a repository named " | ||
+ | |||
+ | |||
+ | $ mkdir .svn_repos | ||
+ | $ svnadmin create .svn_repos/ | ||
+ | |||
+ | |||
+ | You can then checkout your new repository into a working directory. | ||
+ | |||
+ | Make a directory for the working copies of your projects, say: | ||
+ | |||
+ | mkdir ~/ | ||
+ | |||
+ | In this local setup where we are using ''< | ||
+ | |||
+ | cd; pwd | ||
+ | |||
+ | In the rest of this document you will need to replace '/ | ||
+ | |||
+ | Then we can (locally) check out our project like so: | ||
+ | |||
+ | svn co file:// | ||
+ | |||
+ | ===== Importing A Directory ===== | ||
+ | |||
+ | If you want to add an existing folder to your repository: | ||
+ | |||
+ | Let's import our website into our repository! :!: Note that after the import is finished, the original local directory //does not become a working copy//. To begin working on that data in a versioned fashion, you still need to create a fresh working copy of that tree. | ||
+ | |||
+ | cd html | ||
+ | svn import -m " | ||
+ | |||
+ | |||
+ | In this command | ||
+ | |||
+ | * ' | ||
+ | * '-m " | ||
+ | * '< | ||
+ | |||
+ | You can modify the message, the module name and the tags to your liking, just keep in mind that in the rest of this tutorial we will use ' | ||
+ | |||
+ | ===== Checking It Out ===== | ||
+ | |||
+ | cd ~/ | ||
+ | svn co file:// | ||
+ | |||
+ | To verify that you've checked out a working copy of just the //html// directory, first, do an '' | ||
+ | < | ||
+ | $ svn info html | ||
+ | Path: html | ||
+ | Working Copy Root Path: / | ||
+ | URL: file:// | ||
+ | Relative URL: ^/html | ||
+ | Repository Root: file:// | ||
+ | Repository UUID: 6909fbfb-0895-7146-9482-bf1fd1033119 | ||
+ | Revision: 1 | ||
+ | Node Kind: directory | ||
+ | Schedule: normal | ||
+ | Last Changed Author: peteyboy | ||
+ | Last Changed Rev: 1 | ||
+ | Last Changed Date: 2021-03-17 20:56:14 +0000 (Wed, 17 Mar 2021) | ||
+ | </ | ||
+ | |||
+ | ===== Accessing It Remotely ===== | ||
+ | |||
+ | One way to easily set up access to your svn repo for remote use is to set up [[trac_on_sdf|Trac]] on SDF | ||
+ | |||
+ | Another is to run [[http:// | ||