[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-13 20:40:40 CEST

Brian Denny <brian@briandenny.net> writes:

> Followup to r5814 (Issue #1075 - update receiving delete for missing
> directory). Make sure to clean up missing directories any time we bump
> a revision number.
>
> * update_editor.c
> (maybe_bump_dir_info): For each directory that we actually bump,
> remove any entries for missing or 'deleted' children.
>
>
> Index: subversion/libsvn_wc/update_editor.c
> ===================================================================
> --- subversion/libsvn_wc/update_editor.c (revision 5877)
> +++ subversion/libsvn_wc/update_editor.c (working copy)
[...]
> +
> + /* Clean up deleted/missing directories. */
> + SVN_ERR (svn_wc_adm_retrieve (&adm_access, eb->adm_access, bdi->path,
> + pool));
> + SVN_ERR (svn_wc_entries_read (&entries, adm_access, TRUE, pool));
> + SVN_ERR (svn_io_get_dirents (&dirents, bdi->path, pool));
> + for (hi = apr_hash_first (pool, entries); hi; hi = apr_hash_next (hi))
> + {
> + const void *key;
> + apr_ssize_t klen;
> + void *val;
> + const svn_wc_entry_t *current_entry;
> +
> + /* Get the next entry */
> + apr_hash_this (hi, &key, &klen, &val);
> + current_entry = val;
> +
> + /* Skip THIS_DIR. */
> + if (! strcmp (key, SVN_WC_ENTRY_THIS_DIR))
> + continue;
> +
> + /* If the item is a 'deleted' or missing dir, remove it. */
> + if (current_entry->kind == svn_node_dir
> + && (current_entry->deleted
> + || (! apr_hash_get (dirents, key, klen))))
> + {
> + svn_wc__entry_remove (entries, current_entry->name);
> + }

I am wary of this removal of missing directories, does it mean that
the sequence

   svn mkdir foo
   mv foo bar
   svn up

will remove the foo entry? If so, it would fall into the "I don't
expect that to happen" category.

-- 
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 13 20:41:56 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.