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

Re: Removed dir in repos with local modifications result in strange behavior.

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2004-03-07 16:20:03 CET

Philip Martin wrote:
> Josef Wolf <jw@raven.inka.de> writes:
>
>> jw@raven:~/sandbox/misc> svn up
>> U notice
>> subversion/libsvn_wc/update_editor.c:780: (apr_err=155000)
>> svn: Won't delete locally modified directory ''
>> subversion/libsvn_wc/adm_ops.c:1669: (apr_err=155012)
>> svn: File 'boot.txt' has local modifications
>>
>>OK, I forgot about the local modifications and it is a good thing that
>>svn reminds me. But how come that the locally modified directory don't
>>have a name?
>
> It's a poor message, it means
>
> Won't delete locally modified sub-directory within directory '.'

I had a look to see if there is a quick fix; I couldn't see exactly what is going on but I did make two observations that don't fix it: a tidy-up and an observation that errors are leaking:

Index: subversion/libsvn_wc/update_editor.c
===================================================================
--- subversion/libsvn_wc/update_editor.c (revision 8897)
+++ subversion/libsvn_wc/update_editor.c (working copy)
@@ -773,13 +773,12 @@
   if (tmp_err)
     {
       /* Remove the LOGFILE (and eat up errors from this process). */
- svn_error_t *err2 = svn_io_remove_file (logfile, pool);
- if (err2)
- svn_error_clear (err2);
+ svn_error_clear (svn_io_remove_file (logfile, pool));

       return svn_error_createf
         (SVN_ERR_WC_OBSTRUCTED_UPDATE, tmp_err,
          "Won't delete locally modified directory '%s'", path);
+ /* ### ... leaking any errors that were above tmp_err in the chain. */
     }

   return err;

I'm not going to commit that; I'm just pointing it out so that if somebody goes to that code to try to improve the error message they might also have a go at fixing the leak and/or tidying the error_clear.

> I do think we should consider changing update: when a locally modified
> item is encountered during delete, update should unversion, warn, and
> continue. There should only be an error if the unversioned item left
> behind causes an obstruction to a later add.

It's probably worth repeating that thought in a thread of its own.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Mar 7 16:19:21 2004

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.