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

[PATCH] fix for issue #3789 log -g regression in r1028108

From: Kevin Radke <kmradke_at_gmail.com>
Date: Wed, 26 Jan 2011 16:59:54 -0600

This also needs a back-port to the 1.6.x branch.

[[[
   Fix issue #3789: Correctly ignore missing locations when a renamed file
   has more than MAX_OPEN_HISTORIES.

   * subversion/libsvn_repos/log.c
     (get_path_histories): Ignore more bogus repository locations to restore
                           pre-1.6.15 log -g behavior. This fixes client chunk
                           errors introduced by r1028108.
   ]]]

Index: subversion/libsvn_repos/log.c
===================================================================
--- subversion/libsvn_repos/log.c (revision 1063904)
+++ subversion/libsvn_repos/log.c (working copy)
@@ -1052,6 +1052,7 @@
 {
   svn_fs_root_t *root;
   apr_pool_t *iterpool;
+ svn_error_t *err;
   int i;

   /* Create a history object for each path so we can walk through
@@ -1093,7 +1094,6 @@

       if (i < MAX_OPEN_HISTORIES)
         {
- svn_error_t *err;
           err = svn_fs_node_history(&info->hist, root, this_path, pool);
           if (err
               && ignore_missing_locations
@@ -1115,10 +1115,20 @@
           info->newpool = NULL;
         }

- SVN_ERR(get_history(info, fs,
- strict_node_history,
- authz_read_func, authz_read_baton,
- hist_start, pool));
+ err = get_history(info, fs,
+ strict_node_history,
+ authz_read_func, authz_read_baton,
+ hist_start, pool);
+ if (err
+ && ignore_missing_locations
+ && (err->apr_err == SVN_ERR_FS_NOT_FOUND ||
+ err->apr_err == SVN_ERR_FS_NOT_DIRECTORY ||
+ err->apr_err == SVN_ERR_FS_NO_SUCH_REVISION))
+ {
+ svn_error_clear(err);
+ continue;
+ }
+ SVN_ERR(err);
       APR_ARRAY_PUSH(*histories, struct path_info *) = info;
     }
   svn_pool_destroy(iterpool);
Received on 2011-01-27 00:00:34 CET

This is an archived mail posted to the Subversion Dev mailing list.