3
我已經搜索了一段時間,並沒有看到任何東西。這可能意味着,它不應該被完成,或者它不能完成。水銀:如何添加拉鉤
我看了一眼mercurial的鉤子列表,我似乎無法找到(或得到一個工作),執行一個腳本後,你給了hg pull命令。
謝謝
我已經搜索了一段時間,並沒有看到任何東西。這可能意味着,它不應該被完成,或者它不能完成。水銀:如何添加拉鉤
我看了一眼mercurial的鉤子列表,我似乎無法找到(或得到一個工作),執行一個腳本後,你給了hg pull命令。
謝謝
從hgrc docs section on "hooks" -
"incoming"
Run after a changeset has been pulled, pushed, or unbundled into the
local repository. The ID of the newly arrived changeset is in
"$HG_NODE". URL that was source of changes came is in "$HG_URL".
或...
"post-<command>"
Run after successful invocations of the associated command. The contents
of the command line are passed as "$HG_ARGS" and the result code in
"$HG_RESULT". Parsed command line arguments are passed as "$HG_PATS" and
"$HG_OPTS". These contain string representations of the python data
internally passed to <command>. "$HG_OPTS" is a dictionary of options
(with unspecified options set to their defaults). "$HG_PATS" is a list
of arguments. Hook failure is ignored.
(該文檔還介紹了有關哪些配置其實應該看起來像,以及如何掛鉤詳細腳本被稱爲。)
還有'pretxnchangegroup'這是在變更集被拉出之後運行,但在它們在本地回購庫中永久化之前運行。如果您需要在接受變更集之前對其進行驗證,這非常有用。 – 2013-04-11 16:02:30
我確實有機會閱讀此內容,但只有在找到新的更改集時纔會拉取。如果我想每次執行hg pull時運行一個鉤子,該怎麼辦?即使在發生沒有發現變化的情況下 – Muradin007 2013-04-11 16:54:23
後做了我正在尋找的東西,但我沒有立即意識到它。 –
Muradin007
2013-04-11 19:23:22