差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

兩邊的前次修訂版 前次修改
tech:svnswitch [2008/08/01 01:54] jonathantech:svnswitch [2009/03/03 00:58] (目前版本) jonathan
行 1: 行 1:
 +====== SVN 主機搬移後 Client 端的處理方式 (relocate) ======
 +當 svn 主機 IP 更動,或者更換網址,底下 Client 端的工作版本就無法依據之前的 Check out 網址更新,以下針對在 Windows 的 TortoisesSVN 以及 Linux 底下的 svn 分別說明實際處理方式.
  
 +===== - Windows 的 TortoisesSVN =====
 +這部份很簡單,直接選用 TortoisesSVN 選單內的 Relocate 來更改,如下圖所示:
 +
 +|  {{tech:svn-relocate_1.png|}}  |
 +|  {{tech:svn-relocate_2.png|}}  |
 +
 +===== - Linux 的 svn =====
 +如果使用 Linux 的 svn 命令列方式,則採用 svn switch 命令語法
 +<file>
 +switch --relocate FROM TO [PATH...]
 +</file>
 +
 +例如: /home/trybox/trybox_source 內原本 Check Out 的 SVN 來源是 http://61.67.71.95/repos/trybox/Source 希望更改成正確的 SVN 網址 http://tryboxap1.ichiayi.com/repos/trybox/Source 以下是實際執行程序
 +<code sh>
 +cd /home/trybox/trybox_source
 +svn cleanup
 +svn switch --relocate http://61.67.71.95/repos/trybox/Source http://tryboxap1.ichiayi.com/repos/trybox/Source .
 +</code>
 +
 +
 +===== 參考資料 =====
 +  * http://svnbook.red-bean.com/en/1.1/re27.html
 +
 +{{tag>svn subversion tortoisessvn 密技}}
  • tech/svnswitch.txt
  • 上一次變更: 2009/03/03 00:58
  • jonathan