Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
bzr post-commitプライベート バグトラッカー用のフックを書こうとしていますが、
bzr post-commit
post_commit(local, master, old_revno, old_revid, new_revno, mew_revid)
bzrlibinを使用して、これからブランチのコミット メッセージを抽出するにはどうすればよいPythonですか?
bzrlib
Python
答えは次のようになります。
def check_commit_msg(local, master, old_revno, old_revid, new_revno, new_revid): branch = local or master revision = branch.repository.get_revision(new_revid) print revision.message
local と master は Branch オブジェクトであるため、リビジョンがあれば、メッセージを簡単に抽出できます。