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

Re: [PATCH] tolerate locally modified dirs on switch

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Thu, 28 Aug 2008 11:32:10 +0300 (Jerusalem Daylight Time)

Okay, I finally did the historical digging I wanted to do before
committing. (Sorry for not getting to it sooner.) More below...

Danil Shopyrin wrote on Fri, 22 Aug 2008 at 23:20 +0400:
> >> - return svn_error_createf
> >
> > (not related to the patch)
> > Doesn't this code leak the parent error of tmp_err?
> Looks like that. This can be fixed by the new patch.


> > This has two differences from the previous code:
> >
> > * This code removes the logfile when the error is *not*
> > SVN_ERR_WC_LEFT_LOCAL_MOD, the existing code removes the logfile when
> > the error *is* SVN_ERR_WC_LEFT_LOCAL_MOD.
> I think that the existing code should delete logfile in both cases. In
> the case of error different from SVN_ERR_WC_LEFT_LOCAL_MOD the whole
> operation is aborted (in the existing code) and logfile should be
> deleted.

Your patch does something different -- it just ignores the logfile
completely -- and IMO is right doing so, since it also stops throwing
the LEFT_LOCAL_MOD error back to the caller.

> > * The existing code checks for SVN_ERR_WC_LEFT_LOCAL_MOD anywhere in the
> > error chain, not just as the top-most error.
> This change is avoided in the new patch.

Okay. (Since both versions of the check worked, I guess LEFT_LOCAL_MOD
is always the top-most error. Which explains why the "potential error
leak" above hasn't been caught yet: in this case, it isn't a leak.)

> The new log message is as follows:
> [[[
> Fix issue #2505: make switch continue after deleting locally modified
> directories, as it update and merge do.
> * subversion/libsvn_wc/update_editor:
> (leftmod_error_chain): tolerate SVN_ERR_WC_LEFT_LOCAL_MOD. The
> whole error is cleared and SVN_NO_ERROR is returned if
> SVN_ERR_WC_LEFT_LOCAL_MOD error is found in the error chain. And
> we don't delete logfile in that case.
> (do_entry_deletion): svn_wc_remove_from_revision_control() is called
> with instant_error = FALSE.
> * subversion/tests/cmdline/switch_tests.py:
> (tolerate_local_mods): New test.
> (test_list): Run the new test.
> ]]]
> The new patch is attached.

Okay. My 'make check' (on Windows) seems broken; once I fix it (or boot
a Linux), I'll commit the patch.


To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-08-28 10:32:27 CEST

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.