Windows file locking with bzr 2.2.3
John Arbash Meinel
john at arbash-meinel.com
Thu Feb 24 22:19:46 UTC 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2/24/2011 4:15 PM, W. Trevor King wrote:
> On Thu, Feb 24, 2011 at 04:12:59PM -0600, John Arbash Meinel wrote:
>>> I don't really understand how stricter locking ties into explicitly
>>> listing a root directory, but I suppose that doesn't really matter to
>>> me ;).
>>
>> We use a read lock while reading the list of files, to ensure that
>> things don't change in the middle. (Otherwise you might see a file, but
>> not the containing directory, for example.)
>>
>> We use a write lock while updating the tree, to ensure that the data
>> structure stays consistent. (Otherwise process 1 might try to add foo,
>> and process 2 might add bar, and one of them would ignore the others
>> changes, etc.)
>
> But why both of them for cmd_add with an explicitly given file list?
> Wouldn't you just need a write lock?
>
You specified "file_ids_from" which states "look in this tree for the
file-ids to use for the files I'm adding". But that doesn't make sense
to use the target tree, since it (by definition) doesn't contain the
files you are adding.
As such, we haven't tried to do any sort of "if these are the same tree,
treat it as X", because passing in the same tree doesn't do anything.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk1m2YIACgkQJdeBCYSNAAOZGACgy1zo3ddqYAs+AXEfTN/cOAHI
yJMAoKmNxPx2PTxhN4iGL11m2pAsPzBr
=DUmU
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list