I'm trying to work around <a href="https://bugs.launchpad.net/bzr/+bug/997933">a problem</a> (997933) in Bazaar (bzrlib 2.5.0). The defect causes Bazaar to trample on inherited file permissions on files in Win7-64, so that when anyone in the team changes anything, everyone else gets "file permission" errors on that changed file. That defect report is not the subject of this post, the work-around is.<br>

<br>My problem working around that defect is how to create a "post transform hook", which <a href="https://code.launchpad.net/%7Ejelmer/bzr/transform-hooks/+merge/89007" target="_blank">as far as I can see</a> is present in 2.5 of the bzr library (I'm using 2.5.0).<br>

<br>Syntax-wise I have this in my hook file:<br><br><div style="margin-left:40px"><span style="font-family:courier new,monospace">from bzrlib import branch</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">def post_transform_hook():</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">   print "post_transform_hook"</span><br style="font-family:courier new,monospace">

<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">branch.Branch.hooks.install_named_hook('post_transform', post_transform_hook, 'My post_transform hook')</span><br>

</div><br>Running that garners me the message: "<span style="font-family:courier new,monospace">The BranchHooks hook 'post_transform' is unknown in this version of bzrlib.</span>"<br><br>Does anyone know what the problem is? I've no real idea of how this stuff works, so I may have the wrong "import" or something like that, for all I know, although similar syntax to the above works ok for push and pull. Does anyone have an example of a post_transform hook I can crib from?<br>
<br>Once I have the hook working without error, I'll need a list of the files which have changed (been "transformed" I guess) - can anyone tell me where I can find anything to tell me what parameters may be available to get that list and iterate it? All I'm going to do is set the "include inheritable permissions from this object's parent" flag for each file changed, which solves our problem.<br>