[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: Danil Shopyrin <danil.shopyrin_at_gmail.com>
Date: Fri, 22 Aug 2008 23:20:37 +0400

Daniel,

thanks for a good patch review!

It takes some time to deal with your precise remarks and now I'm ready
to provide the new version of the patch. I've decided firstly fix
issue #2505 and then fix other problems that (maybe) are present in
the existing code.

To your remarks:

> Nits: s/it//, and (symbol_name)s should be indented two spaces, not one.

I'm not sure that I understand this notation properly, but I've tried
to make log message formatted just like examples in the hacking.html.
I've found indenting errors, but I'm not sure that I've found all of
them.

> s/tollerate/tolerate/

The same.

>> - return svn_error_createf
>> - (SVN_ERR_WC_OBSTRUCTED_UPDATE, tmp_err,
>
> (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.

> * 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.

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.

-- 
With best regards,
Danil Shopyrin
VisualSVN Team


---------------------------------------------------------------------
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-23 01:10:00 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.