[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Next Steps: CVS Import Bug - Please Respond

From: Larry Jones
Subject: Re: Next Steps: CVS Import Bug - Please Respond
Date: Thu, 11 Aug 2005 16:52:58 -0400 (EDT)

Derek Price writes:
> It shouldn't be too hard to fix.  In the import function in import.c,
> the import_descend and import_descend_dir need to be split into two
> passes.  The first pass should construct the directory strucure in the
> repository and save a list of the directory names.  It's mostly going to
> fit right into what those functions currently do in client mode, though
> the global repository variable may need to be deglobalized.  The list of
> files and directories to be imported could be cached at the same time,
> avoiding some of the overhead of the extra pass, but that's not necessary.
> Then, the directory list needs to be used as an argument to Write_Lock
> (or lock_list_promotably for feature) when not on the client, just
> before the import data is traversed for the second time and actually
> imported.
> During the second pass, as each directory is visited, the write lock
> will need to be grabbed on feature.  On both feature and stable the
> write lock will need to be released when each directory is finished with.

I don't know that there's any need to lock the entire directory tree for
import like we do for commit, directory-at-a-time locking like we do for
tag should suffice and be simpler to implement.  (The main reason commit
needs a tree lock is that it reads all the RCS files and caches the data
before starting to do any writes, so you have to have locks in place for
the entire operation.)

-Larry Jones

Life's a lot more fun when you're not responsible for your actions. -- Calvin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]