On Tue, Jan 09, 2007 at 10:59:53AM +0100, Marc Haesen wrote:
> I did some debugging and if I apply the following patch, the problem disappears. It seems that the code is trying to create a temporary file twice.
> The patch file is generated on windows (so it contains cr/lf)
> > When I checkout a directory containing a symbolic link on windows with a
> > client build from trunk (last revision I tried was 22811), I get the
> > following error message:
> > svn: REPORT request failed on '/svnrepos/repos/!svn/vcc/default'
> > svn: In directory 'xxxx'
> > svn: Can't open file 'xxxx\.svn\tmp\file.ext.tmp.tmp': The file exists.
> Index: subversion/libsvn_subr/subst.c
> --- subversion/libsvn_subr/subst.c (revision 22939)
> +++ subversion/libsvn_subr/subst.c (working copy)
> @@ -1610,7 +1610,6 @@
> /* Fall back to just copying the text-base. */
> SVN_ERR(svn_io_open_unique_file2(NULL, &dst_tmp, dst, ".tmp",
> svn_io_file_del_none, pool));
> - SVN_ERR(svn_io_file_create(dst_tmp, src->data, pool));
> return err;
That'll work in the sense that it won't give you an error, but it won't
populate the new contents of the new file (which should contain the
internal representation of the linke, it seems).
The problem is that svn_io_file_create() is failing because the
temporary file exists. Something like the attached should work, though
I can't test it.
Annoyingly, we don't have any symlink tests on Windows (because we can't
create symlinks there). We should fix that.
--- subversion/libsvn_subr/subst.c (revision 22938)
+++ subversion/libsvn_subr/subst.c (working copy)
@@ -1606,11 +1606,18 @@
if (err->apr_err == SVN_ERR_UNSUPPORTED_FEATURE)
+ apr_file_t *dst_tmp_file;
+ apr_size_t written;
/* Fall back to just copying the text-base. */
- SVN_ERR(svn_io_open_unique_file2(NULL, &dst_tmp, dst, ".tmp",
- svn_io_file_del_none, pool));
- SVN_ERR(svn_io_file_create(dst_tmp, src->data, pool));
+ SVN_ERR(svn_io_open_unique_file2(&dst_tmp_file, &dst_tmp,
+ dst, ".tmp", svn_io_file_del_none,
+ SVN_ERR(svn_io_file_write_full(dst_tmp_file, src->data, src->len,
+ &written, pool));
+ SVN_ERR(svn_io_file_close(dst_tmp_file, pool));
Received on Tue Jan 9 14:29:54 2007
- application/pgp-signature attachment: stored