有時候必須使用 命令列 方式 來 commit files
但經常有很多散在各個子目錄裡的新增檔案
若用 svn add 一個一個來新增 實在費時費工
後來在這裡找到一個好方法:
-
svn status | grep “^?” | awk ‘{print $2}’ | xargs svn add
這樣就可一次將新增檔案加入
不過要小心不要加到垃圾檔了….
有時候必須使用 命令列 方式 來 commit files
但經常有很多散在各個子目錄裡的新增檔案
若用 svn add 一個一個來新增 實在費時費工
後來在這裡找到一個好方法:
這樣就可一次將新增檔案加入
不過要小心不要加到垃圾檔了….
自從買了新的 2012 Late Mac Mini 之後
就開始將舊的 資料 搬到 新機器上
不過發現無法啟動 SVN server on apache2 web server
後來發現 原來是 Mac OS X 10.8 把 mod_dav_svn.so 給拿掉了… 很奇怪耶?
只好自己 compile 再補回去 …
首先,先確認 Mac OS X 10.8 內建的 SVN 版本
$ svn --version svn, version 1.6.18 (r1303927) compiled Nov 2 2012, 23:47:41 Copyright (C) 2000-2009 CollabNet. Subversion is open source software, see http://subversion.apache.org/ This product includes software developed by CollabNet (http://www.Collab.Net/). The following repository access (RA) modules are available: * ra_neon : Module for accessing a repository via WebDAV protocol using Neon. - handles 'http' scheme - handles 'https' scheme * ra_svn : Module for accessing a repository using the svn network protocol. - handles 'svn' scheme * ra_local : Module for accessing a repository on local disk. - handles 'file' scheme
接下來要下載 相同版本的 SVN source code,並重新 Compile 後
將所缺少的 module 補回去
$ cd ~/Download $ wget http://archive.apache.org/dist/subversion/subversion-1.6.18.tar.bz2 $ tar -jxvf subversion-1.6.18.tar.bz2 $ cd subversion-1.6.18 $ ./configure $ make $ sudo cp subversion/mod_dav_svn/.libs/mod_dav_svn.so /usr/libexec/apache2/ $ sudo cp subversion/mod_authz_svn/.libs/mod_authz_svn.so /usr/libexec/apache2/
接下來,建立 /etc/apache2/other/svn.conf
$ vi /etc/apache2/other/svn.conf
LoadModule dav_svn_module /usr/libexec/apache2/mod_dav_svn.so LoadModule authz_svn_module /usr/libexec/apache2/mod_authz_svn.so <Location /svn>; DAV svn SVNParentPath /PATH-TO-SVN-REPOSITORY SVNListParentPath on AuthType Basic AuthName "Subversion repository" AuthUserFile /etc/apache2/svn-auth-file Require valid-user </Location>;
記得變更 svn repository 的 權限
$ chown -R www:www /PATH-TO-SVN-REPOSITORY
重新啟動 Apache
$ sudo apachectl restart
Step.1 Install OpenSUSE 11.2
Step.2 Network
Step.3 NIS Client
Step.4 Add Software Repository
Step.5 Install Nvidia Driver
Step.6 Software Install by using yast2
Step.7 Enable Network Service
Step.8 SVN Repository
#mkdir /srv/svn/projects
#mkdir /srv/svn/users
# chown -R wwwrun /srv/svn
# chgrp -R www /srv/svn
# sudo -u wwwrun svnadmin create /srv/svn/projects
# sudo -u wwwrun svnadmin create /srv/svn/users
Step.9 Apache + NIS Auth
# tar -zxvf pwauth-2.3.8.tar.gz
# cd pwauth-2.3.8
# vi config.h
change
#define SERVER_UIDS 72 /* user "nobody" */
to
#define SERVER_UIDS 30 /* user "wwwrun" */
# make
# cp ./pwauth /usr/bin
# chmod 4755 /usr/bin/pwauth
# tar -zxvf checkpassword-pam-0.99.tar.gz
# cd checkpassword-pam-0.99
# ./configure
# make
# make install
auth include common-auth
account include common-account
password include common-password
session include common-session
AddExternalAuth pwauth /usr/bin/pwauth
AddExternalAuth checkpassword-pam "/usr/local/bin/checkpassword-pam -H --noenv --debug --stdout -s httpd -- /bin/true"
SetExternalAuthMethod checkpassword-pam checkpassword
AddExternalGroup unixgroup /usr/bin/unixgroup
SetExternalGroupMethod unixgroup environment
DAV svn
SVNParentPath /home/srv/svn
SVNListParentPath on
# Limit write permission to list of valid users.
# Require SSL connection for password protection.
# SSLRequireSSL
AuthType Basic
AuthName "Subversion Server"
AuthExternal checkpassword-pam
AuthBasicProvider external
Require valid-user
AuthzSVNAccessFile /srv/svnaccess.conf
# a2enmod authnz_external
# a2enmod dav
# a2enmod dav_svn
# a2enmod authz_svn
# a2enmod perl
# rcapache2 restart
Step.10 Setup FreeNX