跳到主要內容

Subversion同時使用兩個Repository

Subversion應該沒有支援Dual Repository的機制,由於平時偷懶把自己寫的幾支程式都放在同一個Repository,需要分享時就很麻煩。原本想利用Apache的虛擬目錄 Alias 的方式達成,但目前看來不可行;再使用mod_proxy的方式也有權限問題,無法達成目標。

所以我利用 Subversion 1.3版開始非正式支援SVN_ASP_DOT_NET_HACK變數,就可以在同一個目錄下有兩個不同的Repository。
The "_svn" hack is now officially supported: since some versions of ASP.NET don't allow directories beginning with dot (e.g., ".svn", the standard Subversion working copy administrative directory), the svn command line client and svnversion now treat the environment variable SVN_ASP_DOT_NET_HACK specially on Windows. If this variable is set (to any value), they will use "_svn" instead of ".svn". We recommend that all Subversion clients running on Windows take advantage of this behaviour. Note that once the environment variable is set, working copies with standard ".svn" directories will stop working, and will need to be re-checked-out to get "_svn" instead.
雖然麻煩一點,但就是在命令列切換:
C:\MyAp>set SVN_ASP_DOT_NET_HACK=1
C:\MyAp>svn commit
C:\MyAp>set SVN_ASP_DOT_NET_HACK=
C:\MyAp>svn commit
或者做成批次檔切換變數。

請注意:此特性只有在Win32平台有效,在source如main.c有特別定義:
#if defined(WIN32) || defined(__CYGWIN__)
/* Set the working copy administrative directory name. */
if (getenv("SVN_ASP_DOT_NET_HACK"))
{
err = svn_wc_set_adm_dir("_svn", pool);
if (err)
return svn_cmdline_handle_exit_error(err, pool, "svn: ");
}
#endif
所以若要在其他平台有此功能,必須修改source code再自行編譯。剛才確認在1.4.2版共11個檔案要修改。

留言

這個網誌中的熱門文章

自然人憑證讀卡機驅動程式

鳥毅用的是第一代的自然人憑證讀卡機,EZ100PU(後來有同事買EZmini可以讀SIM卡似乎更好),每年報稅時用一次。 本來只是要申請些政府業務,一時之間找不到光碟,沒想到在 驅動程式下載 居然看到Linux和Mac的驅動程式,剩下的就是政府單位的網頁和程式應該改版了吧!!!

在Windows Server設定L2TP over IPSec VPN

簡單地說,macOS Sierra與iOS 10發表後,大家忽然發現Apple不再支援PPTP,所以一定得設定其他的VPN型態。若不要另外裝client,用L2TP是最方便的,SSL VPN雖然好,但若沒有安裝Agent要連線到任一電腦或是非網頁服務還是挺麻煩的。

DBeaver 介面語言

DBeaver是我個人頗常用的一套跨平台Database管理工具,最近升級後發現Windows版本居然變成簡體中文,而且無法切換為英文。