How to make files in working tree RO automatically
mbp at canonical.com
Thu Dec 17 04:10:37 GMT 2009
2009/12/15 Simon Kersey <simon.kersey at ipl.com>:
> I'm trying to automatically make certain files in a working tree RO when it is
> created. I can do this for heavyweight branches and checkouts using a branch
> open hook. However for lightweight checkouts the branch does not correspond to
> the working tree. I have tried using the bzrdir pre-open hook but this does
> not seem to be called with a transport that reflects the working tree when
> performing a lightweight checkout.
> Is there a better hook to use or better way to do this?
> Any suggestions would be much appreciated.
I think we probably want to add a pre_transform and post_transform
hook to MutableTree. You could hook into the second one and change
the files from there. If you would like to try adding this, you can
probably do it fairly easily by looking at how other hooks are
inserted and tested, and we will mentor you through getting a patch
It might technically work to use LockReleased but that would be a bit dodgy.
More information about the bazaar