[BUG] Pull command on Windows: we have 2 problems

Aaron Bentley aaron.bentley at utoronto.ca
Thu Oct 27 17:09:02 BST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> On Thu, 2005-10-27 at 11:47 -0400, Aaron Bentley wrote:
> 
>>-----BEGIN PGP SIGNED MESSAGE-----
>>Hash: SHA1
>>
>>Robert Collins wrote:
>>
>>>I think thats a really bad idea.
>>>
>>>It implies a process wide identity map for the separate lock at a
>>>minimum,
>>
>>This is what I meant by 'keeping a global dict of LocationLocks'
>>
>> and raises IMO hairy questions - for instance, if I open a
>>
>>>write lock in one instance, create a new branch instance and take a read
>>>lock, then close the first instances write lock and grab a new one -
>>>should it succeed or fail?
>>
>>Since that would succeed with a single branch, it should succeed with two.
> 
> 
> With a single branch the following would happen:
> write lock open
> lock++
> lock--
> lock++
> lock--
> write lock closed, transaction ends, data flushed to disk.

> I think its pretty unexpected that separate branch objects should
> interact to do that.

I don't think it would be visible, so it wouldn't surprise.

> I'd *much* rather jump through whatever hoops are needed to make branch
> objects available where needed than have globals of any sort.

I'm not a big fan of globals, but I hate deadlocks more.  If an API
allows them to happen silently, and only on some platforms, I would
consider it a hostile API.

It would be okay with me if, instead of locking on *nix, and deadlocking
on windows, it threw an exception on both.  That's a sort of minimum
standard, in my view.  Achieving that would also require a global map.
And with such a global map, we could emulate the *nix behaviour on
windows, instead.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDYPud0F+nu1YWqI0RAjndAKCBkNHBAF+Q3D8+vwSrsHvT+7GIFwCdGn+V
Bh4FQWVSpsP7DY9cWKFe3dk=
=FBoS
-----END PGP SIGNATURE-----




More information about the bazaar mailing list