顯示具有 SVN 標籤的文章。 顯示所有文章
顯示具有 SVN 標籤的文章。 顯示所有文章

2014年2月16日 星期日

Convert Project From Subversion To Git Using git2svn

從 SVM 匯入專案到 Git
可手動用 git svn 或是用 git2svn。
而 git2svn 也是 GitHub 推薦的移轉方式

GitHub:https://github.com/nirvdrum/svn2git


用法可參考 README 的說明,不同格式的 svn 配置方式會需要不同的參數。
一般來說用第一個就可以,不過也有例外。

例如這次要將 AChartEngine 做一份 Git Mirror。
由於 AChartEngine 只有 trunk 一個目錄(見上方連結),因此用了第三個方式:

svn2git http://svn.example.com/path/to/repo --trunk trunk --nobranches --notags

2011年7月27日 星期三

SVN Editor Setting

SVN Editor未設定時,會出現下面訊息。

svn: Commit failed (details follow):
svn: Could not use external editor to fetch log message; consider setting the $SVN_EDITOR environment variable or using the --message (-m) or --file (-F) options
svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR is set, and no 'editor-cmd' run-time configuration option was found

解決方法:
在 Shell 的 Config 中設定編輯器。
  • zsh:編輯 ~/.zshrc
  • bash:編輯 ~/.bash_profile
加上 export SVN_EDITOR="/usr/bin/vim"

2011年6月14日 星期二

Recursively delete .svn directories

找出此資料夾下所有.svn資料夾
find . -type d -name .svn

rm -rf `find . -type d -name .svn`
刪除所有 .svn 資料夾

2011年5月24日 星期二

SVN Export Only Changed File

參考網址:http://www.electrictoolbox.com/subversion-export-changed-files-cli-v2/

  1. 將網頁中的 script 存下來命名為svnexport (隨你高興)
  2. 可依照個人喜好放到/usr/local/bin下或哪邊方便使用
  3. 用法為PATH_TO_svnexport REPOS_PATH TARGET_PATH REVERSION_FROM,例如

    svnexport http://code.mycompany.tw/repos/myproject ./ 9527

    則會把從 reversion 9257開始,有更新的檔案整個目錄結構拉下來