Julian Foad wrote:
> Richard Brady wrote:
>> svn delete wc/a
>> svn ci wc -m ""
>> svn switch --relocate file://`pwd`/repo file://`pwd`/repo wc
> svn: Working copy 'wc/a' is missing or not locked
The reason is that "relocate" tries to recurse into a directory marked as
"deleted". The following patch fixes it. But, is this patch entirely correct?
Fix a bug whereby "switch --relocate" failed on a deleted directory
whose parent was not up to date.
(svn_wc_relocate): Don't try to recurse into a deleted or absent
--- subversion/libsvn_wc/relocate.c (revision 16658)
+++ subversion/libsvn_wc/relocate.c (working copy)
@@ -153,7 +153,10 @@ svn_wc_relocate (const char *path,
if (strcmp (key, SVN_WC_ENTRY_THIS_DIR) == 0)
- if (recurse && (entry->kind == svn_node_dir))
+ if (recurse && (entry->kind == svn_node_dir)
+ && ((! entry->deleted && ! entry->absent)
+ || (entry->schedule == svn_wc_schedule_add)
+ || (entry->schedule == svn_wc_schedule_replace)))
const char *subdir = svn_path_join (path, key, pool);
I'm rather unsure of the exact meanings and combinations of "absent" and
"deleted" and "schedule", and am worried by other bits of code using different
tests such as the following:
> /* Remove any deleted or missing entries. */
> for (hi = apr_hash_first (pool, entries); hi; hi = apr_hash_next (hi))
> /* Any entry still marked as deleted (and not schedule add) can now
> be removed -- if it wasn't undeleted by the update, then it
> shouldn't stay in the updated working set. Schedule add items
> should remain.
> if (current_entry->deleted)
> if (current_entry->schedule != svn_wc_schedule_add)
> svn_wc__entry_remove (entries, name);
Can someone explain why that doesn't consider "replace"? If it's a bug, can we
construct a test for it?
Richard Brady wrote:
> Julian Foad wrote:
>> (I don't think this is your actual reproduction recipe because "svn
>> delete" doesn't accept a log message. But, if we change that to "svn
>> delete wc/a"...)
> Oops, OK. But it is my actual recipe. svn delete doesn't complain about
> the extra parameters, so that's why I never picked it up.
Oh, OK, it must have been changed recently because it does complain for me on
~/tmp> svn delete wc/a -m "";
svn: Local, non-commit operations do not take a log message
(and fails to do it, and exits with code 1).
Sorry for assuming it was your mistake.
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Wed Oct 12 00:55:19 2005