Subversion hoidla kasutamisest
Subversion ning apache ja dav
Näiteks on masinas suurem hulk kasutajaid kas sooviksid kasutada subversioni samas soovides ligipääsu failidela apache abil mugavalt.
Why Apache 2?
If you're a system administrator, it's very likely that you're already running the Apache web server and have some prior experience with it. At the time of writing, Apache 1.3 is by far the most popular version of Apache. The world has been somewhat slow to upgrade to the Apache 2.X series for various reasons: some people fear change, especially changing something as critical as a web server. Other people depend on plug-in modules that only work against the Apache 1.3 API, and are waiting for a 2.X port. Whatever the reason, many people begin to worry when they first discover that Subversion's Apache module is written specifically for the Apache 2 API.
The proper response to this problem is: don't worry about it. It's easy to run Apache 1.3 and Apache 2 side-by-side; simply install them to separate places, and use Apache 2 as a dedicated Subversion server that runs on a port other than 80. Clients can access the repository by placing the port number into the URL:
$ svn checkout http://host.example.com:7382/repos/project
Can I view older revisions?
With an ordinary web browser? In one word: nope. At least, not with mod_dav_svn as your only tool.
Your web browser only speaks ordinary HTTP. That means it only knows how to GET public URLs, which represent the latest versions of files and directories. According to the WebDAV/DeltaV spec, each server defines a private URL syntax for older versions of resources, and that syntax is opaque to clients. To find an older version of a file, a client must follow a specific procedure to “discover” the proper URL; the procedure involves issuing a series of WebDAV PROPFIND requests and understanding DeltaV concepts. This is something your web browser simply can't do.
So to answer the question, one obvious way to see older revisions of files and directories is by passing the --revision argument to the svn list and svn cat commands. To browse old revisions with your web browser, however, you can use third-party software. A good example of this is ViewCVS (http://viewcvs.sourceforge.net/). ViewCVS was originally written to display CVS repositories through the web, and the latest bleeding-edge versions (at the time of writing) are able to understand Subversion repositories as well.
The repository uses a standard layout of:
https://svn.apache.org/repos/asf/xerces/c/ | | - branches/ | | - tags/ \ - trunk/
For example, to check out the trunk (the place where the main development is taking place), execute:
svn co https://svn.apache.org/repos/asf/xerces/c/trunk
To check out the code in the xerces-2.7 branch, execute:
svn co https://svn.apache.org/repos/asf/xerces/c/branches/xerces-2.7
To check out the code tagged xerces-2.8.0_rc1, execute:
svn co https://svn.apache.org/repos/asf/xerces/c/tags/xerces-2.8.0_rc1
install freebsd'l
cd /usr/ports/devel/subversion && make WITH_PERL=YES WITH_MOD_DAV_SVN=YES WITHOUT_BDB=YES install clean
httpd.conf vajalikud read
LoadModule dav_module libexec/apache2/mod_dav.so LoadModule dav_svn_module libexec/apache2/mod_dav_svn.so LoadModule authz_svn_module libexec/apache2/mod_authz_svn.so
Kasutaja vhost failis peab tööks olema osa
< Location /svn > DAV svn SVNParentPath /home/kasutaja/svn AuthzSVNAccessFile /home/kasutaja/svn.acl.repo Require valid-user AuthType Basic AuthName "Subversion repository" AuthUserFile /home/kasutaja/svn.acl.www < /Location >
järgnevad käsud tuleb käivitada kasutajana kes cvs'i kasutama hakkab.
mkdir -p svn cd svn
htpasswd -c svn.acl.www kasutaja
Saadud parooli lisame faili
svn.acl.www
kasutaja:KC9zQCMSI3dDM
svn.acl.repo
[test:/] kasutaja = rw
svnadmin create test find . -type d | xargs -n 1 setfacl -m user:www:rwx find . -type f | xargs -n 1 setfacl -m user:www:rw-
teevad need kasutajale ~/svn/test 'i svnadmin'ga
siis seab apachele permissionid paika topib siis htaccess failid ka ning loob yhe kasutaja:test konto
exploreri add-on http://tortoisesvn.tigris.org/
Kodukataloogi, kus svn looma hakkab cli klienti, kasutame muidugi seda, mida saab kodulehelt, näiteks juurkataloogi cvn kausta ning siis oleks soovitav /svn/bin paht'i ka, et saaks kasutada käske normaalselt.
Näide kuidas kasutada: et luua kettale kaust SVN ja seal siis teha checkout, tirime alla kataloogi test, sinna kataloogi test võib tekitada failid ja seejärel scn add failinimi ning selleks, et uploadiks scn commit -message
http://minginimi.server.ee/svn/test