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

2013年7月18日 星期四

git revert without change-id

We can use git revert to revert a commit. But if you need a change-id, you will find git revert won't invoke commit-msg hooks. And you won't get a change-id for this commit.
Here is a workaround.

git revert -n <<commit-id>>
git commit

refer to git-revert,
-n
--no-commit
Usually the command automatically creates some commits with commit log messages stating which commits were reverted. This flag applies the changes necessary to revert the named commits to your working tree and the index, but does not make the commits. In addition, when this option is used, your index does not have to match the HEAD commit. The revert is done against the beginning state of your index.
This is useful when reverting more than one commits' effect to your index in a row.

2013年7月15日 星期一

how to add an existing git repo. to gerrit project.

1. Create new project in gerrit. command as below.
ssh -p 29418 user@gerrit.server gerrit create-project --name gerrit_project_name

2. Push existing git repo. to gerrit server as below.
git push ssh://user@gerrit.server:29418/gerrit_project_name HEAD:refs/heads/master

2008年12月17日 星期三

WinCVS / CVSNT 用 pserver

本篇文章將簡介 CVSNT 的安裝跟 WinCVS 的安裝,直到操作完成!

1. Download CVS 套件,本套件包含了 WinCVS & CVSNT.

2. Download Python <== 注意 python 的版本和 wincvs 會有相容性問題。 -我用的版本是 wincvs: 2.0.2.4, python: 2.6 目前這樣搭起來沒問題。

3. 安裝 CVSNT.
3.1. 直接 double click "cvsnt_setup.exe" 就可以安裝到結束。
3.2. 設定 CVSNT.
3.2.1. 開啟 CVSNT control panel. 在 Repository page 先加一個 repository.如下圖:
3.2.2. 建立 cvsnt account. cvsnt account 必須是一個在 "安裝 cvsnt' pc上的 account. 所以請先建立一個 account, 如:cvs_test_user. 或是不用建立直接使用內建的Administrator即可。
3.2.3. 將 cvsnt 的設定檔 update 到 local 端,為的是要修改一些設定資料(此步驟可以不做)。步驟如下:
================================================
md c:\sandbox
cd c:\sandbox
cvs -d :local:c:\sandbox checkout CVSROOT
然後用檔案總管進入 c:\sandbox 編輯 config 檔,將 #SystemAuth=no 前方的 # 拿掉。
cvs -d :local:c:\sandbox commit
================================================
3.2.4. 進入 c:\FIRSTCVS\CVSROOT, 新增兩個檔案 admin & passwd. (請勿給附檔名)
3.2.5. 將 'cvs_test_user' 加入這兩個檔案中。 此時 cvs_test_user 已經有最大權限可以新增其他user了。

4. 安裝 WinCVS.
4.1. 基本上在 download #1 的套件之後,裡面的 setup 裝一裝就可以了。
4.2. 要注意的是,安裝完 Python 後,在啟動 winCVS 時還是有可能會找不到 Python. 這時請到 [Admin]\[Preference]裡面的 winCVS page 中將 Python 指向到 c:\windows\system32 裡面的 pythonxx.dll. 其中 xx 是 Python 的版本。所以有可能是 Python26.dll 這樣。

5. 安裝 Python. 這個比較沒技巧,只要一直按下一步就可以了。

參考文件如下:
- http://freefall.csie.isu.edu.tw/wincvs/wincvs.html
- http://www.devguy.com/fp/cfgmgmt/cvs/cvs_admin_nt.htm 裡面的 How do I set up pserver?