ViewCVS and Apache on Windows Setup Quick Reference | Subversionary

来源:百度文库 编辑:神马文学网 时间:2024/04/29 04:05:31
ViewCVS and Apache on Windows Setup Quick Reference
Get the SVN Python bindings from subversion.tigris.org Install theActivePython version that corresponds to those SVN python bindings (find it on ftp.activestate.com) (it normally installs in c:\PythonNN where NN is the version number - leave this directory name that way to avoid future problems) Copy the two directories "svn" and "libsvn" from the SVN Python bindings into C:\PythonNN\Lib\site-packages Check that the Python shell can load the SVN bindings: Launch C:\PythonNN\Python.exe enter "import svn.repos": it should not give any error message (- CTRL-Z and Enter to exit Python shell)
Get ViewCVS fromhttp://russ.hn.org/viewcvs and unpack it to a directory (because the version fromhttp://viewcvs.sourceforge.net apparently still has compatibility problems, but I may be wrong) From the ViewCVS directory, perform C:\PythonNN\Python.exe viewcvs-install (or simply add the extension .py to the viewcvs-install file and double-click on it) Edit the viewcvs.conf file to have no cvs_root and have the following lines
svn_roots = RepositoryDirName: c:/path/to/parent/RepositoryDirName root_parents = c:/path/to/parent : svn default_root = RepositoryDirName
(this sets up path/to/parent as being the root of all SVN
repositories, with RepositoryDirName as the default repository to open)
Make sure that %PATH% contains the \bin directory of your SVN installation Test: try to run standalone.py (or standalone.py -g if you want a GUI interface): it should allow you to browse your repository (no need to go further if this does not work!)
ViewCVS with Apache setup
Add the following line to your httpd.conf file
LoadModule python_module modules/mod_python.so Add also the following script alias and corresponding handler:
ScriptAlias /viewcvs "C:/path/to/viewcvs/install/www/mod_python/viewcvs.py" AddHandler python-program .py PythonPath "[r‘c:\\path\\to\\viewcvs\\install\\lib‘]+sys.path" PythonHandler apache PythonDebug On AddDefaultCharset UTF-8 Test: launch apache and try to access localhost/viewcvs!