Subversion Howto: Difference between revisions

From Edgar BV Wiki
Jump to navigation Jump to search
No edit summary
(subversion, svn, SVN, Subversion)
Line 2: Line 2:
[http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/index.html Nightly build of the manual] (especially chapter 5 + are interesting for using TortoiseSVN)
[http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/index.html Nightly build of the manual] (especially chapter 5 + are interesting for using TortoiseSVN)


Create a new repository:
 
 
'''Create a new repository:'''
 
----


In W:\websites\Admin\subs\ make a new directory with the project name (eg. test)
In W:\websites\Admin\subs\ make a new directory with the project name (eg. test)
Right click on test and choose 'create repository here'
Right click on test and choose 'create repository here'
This creates a directory with conf/, db/, hooks/, locks/, format and README.txt
This creates a directory with conf/, db/, hooks/, locks/, format and README.txt
You can then surf to http://wip.tripnet.int/svn/test/ to see the repo in the browser. (it will be empty)
You can then surf to http://wip.tripnet.int/svn/test/ to see the repo in the browser. (it will be empty).
 
 
The URL http://wip.tripnet.int/svn/test works because of a server side directive which specifies that Location.
 
 
Then import the standard structure. Find the directory '0 Naam van opdracht' and right click on it. Choose TortoiseSVN -> Import... and put in the url of the repository (http://wip.tripnet.int/svn/test/). This creates revision 1.
Then import the standard structure. Find the directory '0 Naam van opdracht' and right click on it. Choose TortoiseSVN -> Import... and put in the url of the repository (http://wip.tripnet.int/svn/test/). This creates revision 1.
To work with the repository you need to check out the repository to your working copy.
To work with the repository you need to check out the repository to your working copy.


Making a working copy:


make a directory wip on your local hd, eg. d:\wip\
 
'''Making a working copy:'''
 
----
 
make a directory wip on your local hd, eg. w:\websites\Admin\workingcopy
 
Inside that directory make a directory with the same name as the project you will check out into it, eg:
Inside that directory make a directory with the same name as the project you will check out into it, eg:
d:\wip\test
 
w:\websites\Admin\workingcopy
 
right click on the directory and choose 'SVN Checkout...'
right click on the directory and choose 'SVN Checkout...'


In the URL of repository put the location of the repository (http://wip.tripnet.int/svn/test/) and make sure it goes to the right destination URL.
In the URL of repository put the location of the repository (http://wip.tripnet.int/svn/test/) and make sure it goes to the right destination URL.


Then in d:\wip\test\ you will find the files and directories of '0 Naam van opdracht'. This is where you do all your work!
Then in d:\wip\test\ you will find the files and directories of '0 Naam van opdracht'. This is where you do all your work!


Adding files to the repository:
 
 
'''Adding files to the repository:'''
 
----


In the working copy, create a new file. Right click on the file, TortoiseSVN -> Add.
In the working copy, create a new file. Right click on the file, TortoiseSVN -> Add.
You can add files by copying them into the directory as well: either select all the files and right-click-drag them in and then choose 'SVN Add files to this WC', or normally drag them in, select them in the working copy and then right click, TortoiseSVN -> Add.
You can add files by copying them into the directory as well: either select all the files and right-click-drag them in and then choose 'SVN Add files to this WC', or normally drag them in, select them in the working copy and then right click, TortoiseSVN -> Add.


--------------------------------------------------------------
--------------------------------------------------------------
Server Side:
 
 
 
'''Server Side:'''
 
----
 


/etc/apache2/mods-enabled/dav_svn.conf
/etc/apache2/mods-enabled/dav_svn.conf


<pre>
<Location /svn>
<Location /svn>
   DAV svn
   DAV svn
   SVNParentPath /export/home/wip/websites/Admin/subs/
   SVNParentPath /export/home/wip/websites/Admin/subs/
</Location>
</Location>
</pre>


This will enable SVN on the server. Adding the following inside the <Location> tags above allows for PAM authentication using libapache-mod-auth-pam
This will enable SVN on the server. Adding the following inside the <Location> tags above allows for PAM authentication using libapache-mod-auth-pam

Revision as of 09:49, 4 December 2008

TortoiseSVN manual Nightly build of the manual (especially chapter 5 + are interesting for using TortoiseSVN)


Create a new repository:


In W:\websites\Admin\subs\ make a new directory with the project name (eg. test) Right click on test and choose 'create repository here'

This creates a directory with conf/, db/, hooks/, locks/, format and README.txt You can then surf to http://wip.tripnet.int/svn/test/ to see the repo in the browser. (it will be empty).


The URL http://wip.tripnet.int/svn/test works because of a server side directive which specifies that Location.


Then import the standard structure. Find the directory '0 Naam van opdracht' and right click on it. Choose TortoiseSVN -> Import... and put in the url of the repository (http://wip.tripnet.int/svn/test/). This creates revision 1.

To work with the repository you need to check out the repository to your working copy.


Making a working copy:


make a directory wip on your local hd, eg. w:\websites\Admin\workingcopy

Inside that directory make a directory with the same name as the project you will check out into it, eg:

w:\websites\Admin\workingcopy

right click on the directory and choose 'SVN Checkout...'


In the URL of repository put the location of the repository (http://wip.tripnet.int/svn/test/) and make sure it goes to the right destination URL.


Then in d:\wip\test\ you will find the files and directories of '0 Naam van opdracht'. This is where you do all your work!


Adding files to the repository:


In the working copy, create a new file. Right click on the file, TortoiseSVN -> Add.

You can add files by copying them into the directory as well: either select all the files and right-click-drag them in and then choose 'SVN Add files to this WC', or normally drag them in, select them in the working copy and then right click, TortoiseSVN -> Add.



Server Side:



/etc/apache2/mods-enabled/dav_svn.conf

<Location /svn>
  DAV svn
  SVNParentPath /export/home/wip/websites/Admin/subs/
</Location>

This will enable SVN on the server. Adding the following inside the <Location> tags above allows for PAM authentication using libapache-mod-auth-pam

 # Added for PAM authentication
 AuthType Basic
 # To silence error msg in /var/log/*error.log
 AuthUserFile /dev/null
 # AuthPAM_FallThrough off
 AuthName "SubversionRepository"
 AuthPAM_Enabled on
 require valid-user
 require group designers
 # Required to get mod_auth_pam working in apache > 2.0 
 AuthBasicAuthoritative off
 <LimitExcept GET PROPFIND OPTIONS REPORT>
 Satisfy all
 </LimitExcept>

You also need to add the user www-data to the group shadow: adduser www-data shadow

wiki source another source subversion FAQ

keywords: subversion, svn, SVN