[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: CVS update: MODIFIED: libsvn_wc ...

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2001-08-30 20:26:47 CEST

Greg Stein <gstein@lyra.org> writes:

> On Wed, Aug 29, 2001 at 05:18:58PM -0000, cmpilato@tigris.org wrote:
> > User: cmpilato
> > Date: 01/08/29 10:18:58
> >
> > Modified: subversion/libsvn_wc adm_crawler.c
> > Log:
> > "Working copy locked" bug...be gone.
> >
> > * adm_crawler.c
> >
> > (do_lock): Don't try to lock a directory we've locked in the past.
> >...
>
> Why would we try to lock a directory twice? I had thought our algorithm was
> very strict about how it visited items, so there shouldn't be a visit to the
> same directory twice. Assuming that is true, then this patch would be
> covering up a more fundamental and deeper bug.

In olden days, the commit-crawler could only commit a single directory
target. So it would crawl over any necessary subdirs *once* apiece,
calling replace_dir() and generating dir_batons as it needed. Every
time it did this, it would lock the directory (and save the lock in a
hash.)

Nowadays, the commit-crawler has multiple targets. It backs up over
directories it has seen, and re-uses dir_batons. The error was being
caused by the (still naive) attempt to lock any directory upon
entering it -- except that now it's possible that we've already
previously visited the directory. Thus Mike's change was simple:
check the lock hash and see if we've already locked the directory. If
the lock is there already, fine. If not, lock. If unable to lock,
then some other client process is intefering with our commit, and we
should bail.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:37 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.