Take a read lock on the branch rather than the repository
Take a read lock on the branch rather than the repository
Locking the branch will lock the underlying repository anyway.
This causes Bazaar to cache, which makes the memoization in the head_revision_id property unnecessary.