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

Re: All breakage tests failing in svn_io_file_rename

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-11-08 02:10:19 CET

Brian Denny <brian@briandenny.net> writes:

> Okay...
>
> The offending call to svn_io_temp_dir() is in
> libsvn_client/repos_diff.c: create_empty_file()
>
> At the very least, this codepath is hit during certain "diff" operations
> (which succeed using HEAD) as well as the "merge" that's failing.
>
> If I understand issue #929 correctly (the issue that the svn_io_temp_dir
> function was intended to fix), the problem was that read-only operations
> were failing if the user didn't have write permissions in the working
> directory...
>
> And yep, the patch below (representing the naive solution) breaks those
> certain diff operations when run in a directory without write permissions.
>
> Suggestions?

One option would be to make a decision based on whether we are using a
read-only access baton or a read-write access baton.

   if (b->edit_baton->access_baton
       && svn_wc_adm_locked (b->edit_baton->access_baton))
     {
        /* We have a write-lock so we should use ".svn/tmp" or "." */
     }
    else
     {
        /* Read-only so use svn_io_temp_dir() */
     }
    

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Nov 8 02:11:15 2003

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.