post commit hook question
Stephen Auyeung
stephen at ck12.org
Tue Nov 29 21:08:15 UTC 2011
Thanks for the reply, Andrew.
After loading the plugins, the post commit hook is working now. However, for
some reason, if I added a new directory (could be the same for a file, just
have not tried it) and then call workingTree.commit(), the directory
disappear from the machine where I perform the commit but is committed to
the remote repository. Before the post commit hook was working, I believe
the directory was there. I also tried workingTree.branch.update() after the
commit and still did not get it back; but manually "bzr update" worked. Any
clue?
FYI, the post commit hook was to run a remote command using pssh asking
other bzr clients to perform a "bzr update".
Thanks,
Stephen
-----Original Message-----
From: Andrew Bennetts [mailto:andrew at bemusement.org]
Sent: Monday, November 28, 2011 2:37 PM
To: Stephen Au-Yeung
Cc: bazaar at lists.canonical.com
Subject: Re: post commit hook question
On Mon, Nov 28, 2011 at 01:58:30PM -0800, Stephen Au-Yeung wrote:
> Hi,
>
> I've installed a post commit hook that works when I do "bzr commit ...".
> However, when I use the bzrlib's WorkingTree to commit, the hook was
> not executed. What else do I need to do in order for this to work?
Are you loading plugins in your code that calls bzrlib?
from bzrlib.plugin import load_plugins
load_plugins()
-Andrew.
More information about the bazaar
mailing list