0
我想用automatic_tag_name掛鉤,而不需要手動鍵入義賣會自動標記
我試圖把它寫這樣它自動創建標籤名稱:automatic_tag_name(分支名,10)=「GIL」
- 這是正確的語法嗎? (我發現文檔中的小信息)
- 是否可以從文件創建標籤名稱?此文件將只包含標記名
我想用automatic_tag_name掛鉤,而不需要手動鍵入義賣會自動標記
我試圖把它寫這樣它自動創建標籤名稱:automatic_tag_name(分支名,10)=「GIL」
見這個例子pahe這裏: http://doc.bazaar.canonical.com/latest/en/user-guide/hooks.html
SO正確的調用應該是:
def post_push_autotag(push_result):
automatic_tag_name(push_result.new_revno)
branch.Branch.hooks.install_named_hook('post_push_autotag', post_push_autotag, 'My autotag')
感謝@TridenT。我並不知道我必須編寫插件才能使用auto_tag鉤子。對於我的問題#2,我可以在插件中解決它? –
是的,您可以讀取文件,獲取標籤名稱並在automatic_tag_name()函數中使用它。 – TridenT