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

Re: svn commit: rev 5814 - in trunk/subversion: libsvn_wc tests/clients/cmdline

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-05-06 01:05:03 CEST

bdenny@tigris.org writes:

> Author: bdenny
> Date: Mon May 5 16:40:25 2003
> New Revision: 5814
> Modified:
> trunk/subversion/libsvn_wc/adm_ops.c
> trunk/subversion/libsvn_wc/adm_ops.h
> trunk/subversion/libsvn_wc/log.c
> trunk/subversion/libsvn_wc/update_editor.c
> trunk/subversion/tests/clients/cmdline/update_tests.py
> Log:
> Fix issue #1075 - 'update receiving delete for missing directory'.
> Thanks to Mike Pilato and Ben Collins-Sussman for their suggestions.
> * libsvn_wc/log.c
> (log_do_delete_entry): Don't try to recurse on a missing directory;
> just delete the entry in the parent directory.
> * libsvn_wc/adm_ops.c
> (recursively_tweak_entries): Accept a notification function and baton.
> If remove_missing_dirs is set, remove the entry in the parent directory
> for any missing directory, and notify the client of the deletion.
> (svn_wc__do_update_cleanup): Accept a notification function and baton,
> and a flag 'remove_missing_dirs'. Pass these to
> recursively_tweak_entries.
> (svn_wc_add): Pass NULL to svn_wc__do_update_cleanup for the
> notification function and baton. Pass FALSE for remove_missing_dirs.
> (svn_wc_remove_from_revision_control): Don't try to recurse on a
> missing directory; just delete the entry in the parent directory.
> * libsvn_wc/adm_ops.h
> (svn_wc__do_update_cleanup): Accept a notification function and baton,
> and a flag 'remove_missing_dirs'. Comment accordingly.
> * libsvn_wc/update_editor.c
> (close_edit): Pass our notification function and baton to
> svn_wc__do_update_cleanup. Pass TRUE for remove_missing_dirs.

There is a problem here. There are two changes to be made to the
parent directory of the missing directory: the revision number is
changed and the missing directory's entry is removed. Making the
changes separately and holding state in memory means that the update
process is vulnerable, if it gets interrupted before
svn_wc__do_update_cleanup runs then the revision number will be
changed but the entry for the missing directory will still be present.
Further attempts to update are likely to fail as the working copy now
has an entry for an item that does not exist.

I still think the correct approach is to make the repository send the
delete for the missing subdirectory. Update reports the missing
directory to the repository, see the reporter->delete_path calls in
libsvn_wc/adm_crawler.c:report_revisions. The repository delta
generator should make better use of this information.

Philip Martin
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 6 01:05:59 2003

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.