I (Julian Foad) wrote:

> I noticed that svn_wc_copy3() and svn_wc__move2() didn't check that they 
> have been called with the write lock(s) required by their doc strings.  Some 
> other WC functions do -- e.g. svn_wc_delete4() for example.
> 
> So I added corresponding checks in svn_wc_copy3() and svn_wc__move2(), and 
> fixed 
> the ensuing test failures where we weren't acquiring a lock, in r1410044.  
> Something like:
> 
>   SVN_ERR(svn_wc__write_check(db, parent_path, pool));
> 
> Then I noticed there are still more WC APIs that say they require a lock but 
> don't check.  For example, svn_wc__internal_remove_from_revision_control().  
> And this one has a "real" caller that's broken: 
> svn_client_copy6().

(Oops, svn_client_copy6() isn't broken, I noticed a failure because I 
implemented the test wrongly.  svn_wc_remove_from_revision_control2()'s doc 
string just said "must hold a write lock" and I checked for a lock on the 
parent, but in fact it should check for a lock on LOCAL_ABSPATH itself if it's 
a WC root, else on the parent.)

> Can we do something more rigorous to ensure that we check for having a write 
> lock in the functions where it is logically required?  Any ideas?

This question still holds.

- Julian

Reply via email to