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

Re: [PATCH] possible fix for issue 565

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2002-01-17 02:31:50 CET

in case anyone has a chance to take a look at this, now that 0.8 is
out, here's an updated patch, and a regression test. as before, i'm
not entirely sure that this is the correct fix, but it passes make
check.

-garrett

Fix issue 565, an error during commit when a file that was svn rm'd
is physically deleted before the commit.

* subversion/libsvn_subr/target.c
  (svn_path_condense_targets): don't error out if svn_path_split_if_file
  fails, as that causes us to fail to commit changes in the case where a
  file is svn rm'd and then actually deleted before the commit occurs,
  and its results don't seem to be strictly necessary.
* subversion/tests/clients/cmdline/commit_tests.py
  (commit_rmd_and_deleted_file): new test, testing the case where we
  try to commit a file that has been svn rm'd and actually deleted.

Index: ./subversion/libsvn_subr/target.c
===================================================================
--- ./subversion/libsvn_subr/target.c
+++ ./subversion/libsvn_subr/target.c Sat Jan 12 22:54:41 2002
@@ -99,6 +99,8 @@
                            enum svn_path_style style,
                            apr_pool_t *pool)
 {
+ svn_error_t *err;
+
   if (targets->nelts <=0)
     {
       *pbasedir = NULL;
@@ -222,16 +224,17 @@
                 = svn_stringbuf_create (rel_item, pool);
             }
         }
-
+
       /* Finally check if pbasedir is a dir or a file. */
- SVN_ERR (svn_path_split_if_file (*pbasedir, pbasedir, &file, pool));
- if ((pcondensed_targets != NULL)
- && (! svn_path_is_empty (file, svn_path_local_style)))
- {
- /* If there was just one target, and it was a file, then
- return it as the sole condensed target. */
- (*((svn_stringbuf_t**)apr_array_push (*pcondensed_targets))) = file;
- }
+ err = svn_path_split_if_file (*pbasedir, pbasedir, &file, pool);
+ if (err == SVN_NO_ERROR)
+ if ((pcondensed_targets != NULL)
+ && (! svn_path_is_empty (file, svn_path_local_style)))
+ {
+ /* If there was just one target, and it was a file, then
+ return it as the sole condensed target. */
+ (*((svn_stringbuf_t**)apr_array_push (*pcondensed_targets))) = file;
+ }
     }
   
   return SVN_NO_ERROR;

-
garrett rooney Unix was not designed to stop you from
rooneg@electricjellyfish.net doing stupid things, because that would
http://electricjellyfish.net/ stop you from doing clever things.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:56 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.