[merge][ping] Wait on locks

John Arbash Meinel john at arbash-meinel.com
Mon Sep 25 22:33:18 BST 2006


Robert Collins wrote:
> On Mon, 2006-09-25 at 15:52 -0500, John Arbash Meinel wrote:
>> The attached patch changes bzr so that when attempting to get a
>> write-lock it will wait up to 1 hour, and give better information to the
>> user about what is going on.
>>
>> It seems to have gotten favorable reviews from users, but I haven't
>> heard anything from Robert, Martin or Aaron.
>>
>> This is a fix for both bugs #43521 and #49556. The branch is available from:
>> http://bzr.arbash-meinel.com/branches/bzr/0.11-working/wait-on-lock
>>
>> The initial work has been sitting around since 10/14 (almost 2 weeks
>> now), so I'd like to put it to rest.
> 
> I think having a longer default is good but maybe 1 hour is excessive? 

I think 1 hour is excessive as well, just that seemed to be a moderate
tradeoff between people that wanted infinity.

I had put it down to 5 minutes. The only reason I did it was the case of
pushing a lot of changes over a slow link, which may take >5min for the
push to finish. It probably isn't a common case, though.

If you prefer 5 min, I'm fine with changing it (or 10min, or whatever,
it really is fairly arbitrary).

> 
> I really dont like the idiom that seems to be turning up of:
> 
> +    def test_format_delta(self):
> +        t = time.time()
> +
> +        def check(expected, delta):
> +            actual = osutils.format_delta(delta)
> +            self.assertEqual(expected, actual)
> +
> +        check('0 seconds ago', 0)
> +        check('1 second ago', 1)
> +        check('10 seconds ago', 10)
> +        check('59 seconds ago', 59)
> 
> 'check' in the body is really uninformative. Something like 
> self.assertIntervalFormatting('0 seconds ago', 0)
> 
> would be much clearer.

Well, a lot of these changes were created at the same time, and this is
the first that you have reviewed them since. I'm avoiding this idiom
since you commented that you don't like it. I had just already done it.

I'll clean up the tests, but you didn't really give much feedback about
the rest. Do you like it, not like it? What length of time are you
comfortable with, etc.

John
=:->


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060925/47d5273e/attachment.pgp 


More information about the bazaar mailing list