2010年7月20日星期二
trac + git
剛剛在trac裏安裝了gitplugin
如果只是一個project安裝plugin的話很簡單
首先把gitpuluin的source下載回來,裏面有幾個不同版本
我是trac 0.11所以進入0.11目錄裏
執行
在trac admin裏的plugins介面上傳安裝
之後修改trac.conf,因為是用同一部主機所以是用local repository
應該是HEAD和config所在的位置
這樣就完成了~
可以在trac看到有Browse Source
trac現在還可以由commit去修改ticket
用的是CommitTicketUpdater plugin
不過要設定一下git repository,編輯.git/hooks下面的post-receive
貼上以下內容:
這個script是在repository接收到object後執行的
例如push之後在remote server執行,用trac-admin去修改commit
這樣修改以後,可以用commit去修改ticket
例如commit message寫:
make the checkbox in menu non-clickable. Fixed #47.
#47 ticket就知變成closed狀態
如果只是一個project安裝plugin的話很簡單
首先把gitpuluin的source下載回來,裏面有幾個不同版本
我是trac 0.11所以進入0.11目錄裏
執行
python setup.py bdist_egg在dist目錄下面就會有一個*.egg的檔案
在trac admin裏的plugins介面上傳安裝
之後修改trac.conf,因為是用同一部主機所以是用local repository
repository_dir = /var/git/Test.gittype當然是git,dir就是git working tree裏的.git目錄
repository_type = git
應該是HEAD和config所在的位置
這樣就完成了~
可以在trac看到有Browse Source
trac現在還可以由commit去修改ticket
用的是CommitTicketUpdater plugin
不過要設定一下git repository,編輯.git/hooks下面的post-receive
貼上以下內容:
#!/usr/bin/env python
import sys
from subprocess import Popen, PIPE, call
GIT_PATH = '/usr/bin/git'
BRANCHES = ['master']
TRAC_ENV = '/srv/trac/myproj'
REPO_NAME = '(default)'
def call_git(command, args):
return Popen([GIT_PATH, command] + args, stdout=PIPE).communicate()[0]
def handle_ref(old, new, ref):
# If something else than the master branch (or whatever is contained by the
# constant BRANCHES) was pushed, skip this ref.
if not ref.startswith('refs/heads/') or ref[11:] not in BRANCHES:
return
# Get the list of hashs for commits in the changeset.
args = (old == '0' * 40) and [new] or [new, '^' + old]
pending_commits = call_git('rev-list', args).splitlines()[::-1]
call(["trac-admin", TRAC_ENV, "changeset", "added", REPO_NAME] + pending_commits)
if __name__ == '__main__':
for line in sys.stdin:
handle_ref(*line.split())
這個script是在repository接收到object後執行的
例如push之後在remote server執行,用trac-admin去修改commit
這樣修改以後,可以用commit去修改ticket
例如commit message寫:
make the checkbox in menu non-clickable. Fixed #47.
#47 ticket就知變成closed狀態
………………………………>更多更多~~>>
訂閱:
文章 (Atom)
熱門文章
-
顛峰收集 最新註冊碼大全! 日期:2004年4月1日 作者: 人氣:16686 查看:[大字體 中字體 小字體] 註冊碼【內容巨多,建議用Ctrl+F查找】 GetRight V5.011a完美版Code:01TU9A-D2JKL-OYTVX-Z2Q5F-89FQH Power...
-
上個月看PC3知道的 現在香港、澳門地區不能上youku看TVB垃圾劇集 限制只有內地才能觀看,應該是怕版權問題吧 但是現在有一招 首先上youku找出不能看的影片 例如TVB的新劇 怒火街頭 按第一集,播放器會說不能觀看 這時只要到 FLV下載 貼上第一集網頁的...
-
因為忘記了Windows7的登入密碼 所以記錄一下修復過程 首先用Windows7的安裝光碟開機,選擇修理工具 打開一個CMD 用net user命令來修改已存在的用戶密碼 例如有個用戶叫john net user john 12345 這樣john的密碼就變了12...
-
現在很流行cosplay AV 相信很多人都知道吧 超級出名的涼宮AV版 寒蟬、Fate也有 剛剛Death Note都有AV版啦~(不過沒甚麼劇情,只是拿着本筆記簿.........) 上面那張圖是打算推出的cosplay AV 沒錯!是舞乙Hime! 又多一部啦 它是An...
-
現在才寫游戲心得可能有點遲 因為我前幾天才爆機,而且是bad ending囧rz 其實Dead Rising 2難道不高,沒有修改器也能輕易過關 想要搞定所有隱藏要素才比較好玩 所以這篇是不用修改器的心得 先講講主線心得吧 其實主線的內容不多(相對支線來說) 時間分配得好的話好...
