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

Re: [patch] : sigsegv on diff of uncommitted file

From: <philip_at_codematters.co.uk>
Date: 2003-01-27 14:56:13 CET

David Kimdon dwhedon@debian.org writes:

 svnadmin create repo
 svn mkdir -m 'Commit revision 1' file://`pwd`/repo/trunk
 svn co file://`pwd`/repo/trunk wc
 echo line 1 wc/file
 svn add wc/file
 svn diff -r 1 wc/file
 
 * subversion/libsvn_client/diff.c (convert_to_url) : Fix buglet if a path
   has an entry associated with it but no url. This is the case for files
   that have been added but not yet committed.
 
 Index: subversion/libsvn_client/diff.c
 ===================================================================
 --- subversion/libsvn_client/diff.c (revision 4598)
 +++ subversion/libsvn_client/diff.c (working copy)
 @@ -730,7 +730,7 @@
    SVN_ERR (svn_wc_adm_probe_open (adm_access, NULL, path, FALSE, FALSE, pool));
    SVN_ERR (svn_wc_entry (entry, path, adm_access, FALSE, pool));
    SVN_ERR (svn_wc_adm_close (adm_access));
 - if (! entry)
 + if (! entry || ! entry-url)
      return svn_error_createf (SVN_ERR_ENTRY_NOT_FOUND, NULL,
                                convert_to_url: %s is not versioned, path);

This would mean that svn diff -r1 wc and svn diff -r1 wc/file will
show different output for wc/file, that doesn't seem right. The error
message is not really correct either, the file *is* versioned.

We need regression tests for corner cases like this, to ensure that
once it is fixed it stays fixed.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 14 02:19:24 2006

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.