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

Re: svn commit: r22940 - in trunk/subversion: include libsvn_client libsvn_wc svn tests/cmdline

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2007-01-09 13:56:54 CET

On Tue, Jan 09, 2007 at 03:09:35PM +0300, Ivan Zhakov wrote:
> Buildbot fails on MacOS and Debian shared, but works on Windows after
> my commit. I cannot understand why, because it works on my Mac OS
> machine, but with --disable-shared.
>

I don't know why it works on your machine.

In svn_wc__check_killme(), if the killme file doesn't exist, you ignore
the error from svn_stringbuf_from_file but leave (svn_stringbuf_t*)
contents uninitialised.

Perhaps the attached patch? It's not the simplest possible fix, but I
took the opportunity to clear up what would otherwise have been an
else-after-return, and also make the structure a bit clearer.

Regards,
Malcolm

Index: subversion/libsvn_wc/adm_files.c
===================================================================
--- subversion/libsvn_wc/adm_files.c (revision 22940)
+++ subversion/libsvn_wc/adm_files.c (working copy)
@@ -296,22 +296,22 @@
 
   path = extend_with_adm_name(svn_wc_adm_access_path(adm_access),
                               NULL, FALSE, pool, SVN_WC__ADM_KILLME, NULL);
-
- /* By default think that killme file exists. */
- *exists = TRUE;
   err = svn_stringbuf_from_file(&contents, path, pool);
 
- if (err && APR_STATUS_IS_ENOENT(err->apr_err))
+ if (err)
     {
- /* Killme file doesn't exist. */
- *exists = FALSE;
- svn_error_clear(err);
- }
- else if (err)
- {
+ if (APR_STATUS_IS_ENOENT(err->apr_err))
+ {
+ /* Killme file doesn't exist. */
+ svn_error_clear(err);
+ *exists = FALSE;
+ return SVN_NO_ERROR;
+ }
+
       return err;
     }
 
+ *exists = TRUE;
   /* If killme file contains string 'adm-only' then remove only administrative
      area. */
   *kill_adm_only = svn_string_compare_stringbuf

  • application/pgp-signature attachment: stored
Received on Tue Jan 9 13:57:06 2007

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.