[email protected] (Trent W. Buck) writes:

> Petr Rockai <[email protected]> writes:
>
>> [...] the only thing I can think of is endianity, so the binary index
>> is platform independent (although it should be pretty safe either way,
>> since the index would automatically fix itself on first use).
>
> What happens in the following situation?
>
>   /srv/vcs/foo is a Darcs repository stored on NFS.
>
>   Alice uses Debian/i386 to access foo with Darcs 2.3.
>   She runs "darcs whatsnew".
>
>   Bob uses Debian/PPC to access fo with Darcs 2.4.
>   He also runs "darcs whatsnew" -- at the same time as Alice.

The worst case should be that the timestamp and size data will be corrupt
throughout the index, which will fix itself with further index
operations. Nevertheless, I'll add the few endianness conversions on
read/write, so that this becomes a non-issue (all darcs instances will write
the same bytes at same offsets, so the resulting file should be consistent no
matter the interleaving -- unless mmap semantics are somewhat wild, that is).

As for different darcs versions, either they'll use identical index format, or
they'll use different file for the index (index_0 vs index_1, eg.), so no
collisions should happen there.

Yours,
   Petr.

-- 
Peter Rockai | me()mornfall!net | prockai()redhat!com
 http://blog.mornfall.net | http://web.mornfall.net

"In My Egotistical Opinion, most people's C programs should be
 indented six feet downward and covered with dirt."
     -- Blair P. Houghton on the subject of C program indentation
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to