On Thu, Feb 24, 2011 at 05:15:28PM -0500, W. Trevor King wrote: > On Thu, Feb 24, 2011 at 04:12:59PM -0600, John Arbash Meinel wrote: > > 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?
On Thu, Feb 24, 2011 at 04:17:29PM -0600, John Arbash Meinel wrote:
> The only reason it wasn't working for 'cmd_add' was because you were
> specifying the location 2 times. One as a read source, and one as a
> write source.
Ah, so it's:
1) I'm adding files from an explicit (external) repository (at
`file_ids_from`), let's get a read lock there.
2) I'm adding files to the current repository ('.'), let's get a
write lock there. *crash*
If so, that's troublesome. My intention in using `file_ids_from` was
to set the donor repository, not the acceptor. I suppose that the
acceptor is assumed from the current working directory? How would you
add a new file stored in repository B's directory while working from
repository A's directory? Or do you need to explicitly change
directories before the call?
--
This email may be signed or encrypted with GPG (http://www.gnupg.org).
The GPG signature (if present) will be attached as 'signature.asc'.
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
My public key is at http://www.physics.drexel.edu/~wking/pubkey.txt
pgpSYrkEt9xLU.pgp
Description: PGP signature
_______________________________________________ Be-devel mailing list [email protected] http://void.printf.net/cgi-bin/mailman/listinfo/be-devel
