[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: Brian Denny <brian_at_briandenny.net>
Date: 2003-11-08 00:02:44 CET

On Fri, Nov 07, 2003 at 10:23:09AM -0600, kfogel@collab.net wrote:
> Brian Denny <brian@briandenny.net> writes:
> > I want to scope it out a little more, but this looks like it could be a
> > good task for me.
> >
> > OTOH if people are annoyed at the breakage and want this fixed Right
> > This Minute... then I'm probably not your man.
> Scope it out and post with thoughts. It may turn out to be easier
> than you think...


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

And yep, the patch below (representing the naive solution) breaks those
certain diff operations when run in a directory without write permissions.



Index: subversion/libsvn_client/repos_diff.c
--- subversion/libsvn_client/repos_diff.c (revision 7659)
+++ subversion/libsvn_client/repos_diff.c (working copy)
@@ -366,11 +366,8 @@
   apr_status_t status;
   apr_file_t *file;
- const char *temp_dir;
- SVN_ERR (svn_io_temp_dir (&temp_dir, pool));
- SVN_ERR (svn_io_open_unique_file (&file, empty_file,
- svn_path_join (temp_dir, "tmp", pool),
+ SVN_ERR (svn_io_open_unique_file (&file, empty_file, "tmp",
                                     "", FALSE, pool));
   status = apr_file_close (file);

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Nov 7 23:53:24 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.