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

Re: Subversion 1.6.5: segmentation fault on update

From: Stefan Sperling <stsp_at_elego.de>
Date: Tue, 29 Sep 2009 16:46:58 +0100

On Tue, Sep 29, 2009 at 03:17:23PM +0100, Stefan Sperling wrote:
> On Tue, Sep 29, 2009 at 03:51:38PM +0200, Alexander Kitaev wrote:
> > Hello,
> >
> > Attached script fails with Subversion 1.6.5. It performs update that
> > adds new file in place of a directory that is scheduled for addition and
> > missing.
>
> Thanks, I can reproduce with 1.6.x and will try to fix this.

You have found 2 bugs.

1) One is that we dereferenced fields which may legally be NULL
   without checking for NULL...

2) The other is that we do not check WC meta data for existing directories
   when adding files. We only check the disk.

With the patch below which fixes 1) (already committed to trunk in r39673)
I can get 1.6.x to exhibit the following behaviour after running your script.

svn: Failed to load properties from disk
svn: Directory 'wc/dir/file.txt' is missing
svn: Directory 'wc/dir/file.txt' is missing
$ svn st wc
! wc
! wc/dir
A wc/dir/file.txt
$ svn revert -R wc
Reverted 'wc/dir/file.txt'
$ svn st wc
! wc
! wc/dir
? wc/dir/file.txt
$ svn up wc
svn: Failed to add file 'wc/dir/file.txt': an unversioned file of the same name
already exists
$ svn st wc
! wc
! wc/dir
? wc/dir/file.txt
$ rm wc/dir/file.txt
$ svn up wc
A wc/dir/file.txt
Updated to revision 2.
$ svn st wc
$

We may want to tweak this further. Trunk has similar behaviour.

Stefan

Index: subversion/libsvn_wc/update_editor.c
===================================================================
--- subversion/libsvn_wc/update_editor.c (revision 39674)
+++ subversion/libsvn_wc/update_editor.c (working copy)
@@ -3518,7 +3518,7 @@
              "from a different repository"),
            svn_path_local_style(full_path, pool));
 
- if (!eb->switch_url
+ if (!eb->switch_url && fb->new_URL && entry->url
           && strcmp(fb->new_URL, entry->url) != 0)
         return svn_error_createf(
            SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2401684
Received on 2009-09-29 17:47:13 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.