[darcs-devel] [darcs #278] crash when pulling when patch is being
unpulled from source repo
David Roundy
droundy at abridgegame.org
Fri Mar 18 05:22:16 PST 2005
On Mon, Mar 14, 2005 at 01:20:24PM -0500, zooko at zooko.com via RT wrote:
> I was doing an unpull on repo A at the same time as I pulled from A to B.
> The pull ended with an error message "Error applying patch to recorded!".
I think this falls in the category of "don't do that". It's just not safe
to unpull (or unrecord, or amend-record) while a pull is in progress. In
contrast, it *is* safe to record/apply/tag while a pull is in progress.
In theory pull during unpull could be made safe, if we either were to
implement read-locking (which is tricky, since the reader doesn't have
write access, so we'd need to implement a counter that gets incremented on
unsafe commands like unpull, or naming patch files based on their hashes
(which must then be stored in the inventory file)--which is my preferred
solution.
But for the moment, I'd say that if anything this is a documentation bug,
if the documentation for unpull doesn't make it clear that you shouldn't do
this if someone may be pulling or getting from your repository
simultaneously.
--
David Roundy
http://www.darcs.net
More information about the darcs-devel
mailing list