[PATCH] move lock_read() into "bzr log"
John Arbash Meinel
john at arbash-meinel.com
Sat Jun 17 01:02:11 BST 2006
Robert Widhopf-Fenk wrote:
> Also with the earlier changes in the revspec date: the
> current code still reads the knit (index) twice.
>
> The attached patch removes the two lock_read() calls and adds
> a single lock_read() earlier in the call stack.
>
>
>
Locks are re-entrant, so I would leave the lower level locks, in case
some other code is calling them directly.
We probably should factor out all of the 'if revision is None' stuff
into a helper function, since I think it gets done repeatedly. And now
all the other functions need to do the same thing (any time we parse a
date stamp).
Maybe something like:
def convert_revision_spec_to_revnos(branch, revision_spec):
And then we would also want
def convert_revision_spec_to_revision_ids(branch, revision_spec):
At the very least -1 on removing the existing locks. It is fine to add
one earlier, though.
John
=:->
More information about the bazaar
mailing list