~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to subversion/libsvn_repos/reporter.c

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2014-02-20 20:38:10 UTC
  • mfrom: (0.2.11)
  • Revision ID: package-import@ubuntu.com-20140220203810-w61omsda8fs70pta
Tags: 1.8.8-1
* New upstream release.  Refresh patches.
  - Remove backported patches sqlite_3.8.x_workaround & swig-pl_build_fix
  - Fix integer overflows with 32-bit svnserv, which could cause an infinite
    loop (Closes: #738840) or inaccurate statistics (Closes: #738841)
  - Work around SQLite not honoring umask when creating rep-cache.db.
    (Closes: #735446)
  - Includes security fix:
    + CVE-2014-0032: mod_dav_svn crash when handling certain requests with
      SVNListParentPath on  (Closes: #737815)
* Add a subversion-dbg package.  (Closes: #508147)
* Bump libdb5.1-dev → libdb5.3-dev  (Closes: #738650)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1143
1143
  svn_fs_root_t *s_root;
1144
1144
  apr_hash_t *s_entries = NULL, *t_entries;
1145
1145
  apr_hash_index_t *hi;
1146
 
  apr_pool_t *subpool;
 
1146
  apr_pool_t *subpool = svn_pool_create(pool);
 
1147
  apr_pool_t *iterpool;
1147
1148
  const char *name, *s_fullpath, *t_fullpath, *e_fullpath;
1148
1149
  path_info_t *info;
1149
1150
 
1152
1153
 
1153
1154
     When we support directory locks, we must pass the lock token here. */
1154
1155
  SVN_ERR(delta_proplists(b, s_rev, start_empty ? NULL : s_path, t_path,
1155
 
                          NULL, change_dir_prop, dir_baton, pool));
 
1156
                          NULL, change_dir_prop, dir_baton, subpool));
 
1157
  svn_pool_clear(subpool);
1156
1158
 
1157
1159
  if (requested_depth > svn_depth_empty
1158
1160
      || requested_depth == svn_depth_unknown)
1161
1163
      if (s_path && !start_empty)
1162
1164
        {
1163
1165
          SVN_ERR(get_source_root(b, &s_root, s_rev));
1164
 
          SVN_ERR(svn_fs_dir_entries(&s_entries, s_root, s_path, pool));
 
1166
          SVN_ERR(svn_fs_dir_entries(&s_entries, s_root, s_path, subpool));
1165
1167
        }
1166
 
      SVN_ERR(svn_fs_dir_entries(&t_entries, b->t_root, t_path, pool));
 
1168
      SVN_ERR(svn_fs_dir_entries(&t_entries, b->t_root, t_path, subpool));
1167
1169
 
1168
1170
      /* Iterate over the report information for this directory. */
1169
 
      subpool = svn_pool_create(pool);
 
1171
      iterpool = svn_pool_create(pool);
1170
1172
 
1171
1173
      while (1)
1172
1174
        {
1173
1175
          const svn_fs_dirent_t *s_entry, *t_entry;
1174
1176
 
1175
 
          svn_pool_clear(subpool);
1176
 
          SVN_ERR(fetch_path_info(b, &name, &info, e_path, subpool));
 
1177
          svn_pool_clear(iterpool);
 
1178
          SVN_ERR(fetch_path_info(b, &name, &info, e_path, iterpool));
1177
1179
          if (!name)
1178
1180
            break;
1179
1181
 
1193
1195
              continue;
1194
1196
            }
1195
1197
 
1196
 
          e_fullpath = svn_relpath_join(e_path, name, subpool);
1197
 
          t_fullpath = svn_fspath__join(t_path, name, subpool);
 
1198
          e_fullpath = svn_relpath_join(e_path, name, iterpool);
 
1199
          t_fullpath = svn_fspath__join(t_path, name, iterpool);
1198
1200
          t_entry = svn_hash_gets(t_entries, name);
1199
 
          s_fullpath = s_path ? svn_fspath__join(s_path, name, subpool) : NULL;
 
1201
          s_fullpath = s_path ? svn_fspath__join(s_path, name, iterpool) : NULL;
1200
1202
          s_entry = s_entries ?
1201
1203
            svn_hash_gets(s_entries, name) : NULL;
1202
1204
 
1216
1218
                                 t_entry, dir_baton, e_fullpath, info,
1217
1219
                                 info ? info->depth
1218
1220
                                      : DEPTH_BELOW_HERE(wc_depth),
1219
 
                                 DEPTH_BELOW_HERE(requested_depth), subpool));
 
1221
                                 DEPTH_BELOW_HERE(requested_depth), iterpool));
1220
1222
 
1221
1223
          /* Don't revisit this name in the target or source entries. */
1222
1224
          svn_hash_sets(t_entries, name, NULL);
1236
1238
         target, for graceful handling of case-only renames. */
1237
1239
      if (s_entries)
1238
1240
        {
1239
 
          for (hi = apr_hash_first(pool, s_entries);
 
1241
          for (hi = apr_hash_first(subpool, s_entries);
1240
1242
               hi;
1241
1243
               hi = apr_hash_next(hi))
1242
1244
            {
1243
1245
              const svn_fs_dirent_t *s_entry;
1244
1246
 
1245
 
              svn_pool_clear(subpool);
 
1247
              svn_pool_clear(iterpool);
1246
1248
              s_entry = svn__apr_hash_index_val(hi);
1247
1249
 
1248
1250
              if (svn_hash_gets(t_entries, s_entry->name) == NULL)
1259
1261
                    continue;
1260
1262
 
1261
1263
                  /* There is no corresponding target entry, so delete. */
1262
 
                  e_fullpath = svn_relpath_join(e_path, s_entry->name, subpool);
 
1264
                  e_fullpath = svn_relpath_join(e_path, s_entry->name, iterpool);
1263
1265
                  SVN_ERR(svn_repos_deleted_rev(svn_fs_root_fs(b->t_root),
1264
1266
                                                svn_fspath__join(t_path,
1265
1267
                                                                 s_entry->name,
1266
 
                                                                 subpool),
 
1268
                                                                 iterpool),
1267
1269
                                                s_rev, b->t_rev,
1268
 
                                                &deleted_rev, subpool));
 
1270
                                                &deleted_rev, iterpool));
1269
1271
 
1270
1272
                  SVN_ERR(b->editor->delete_entry(e_fullpath,
1271
1273
                                                  deleted_rev,
1272
 
                                                  dir_baton, subpool));
 
1274
                                                  dir_baton, iterpool));
1273
1275
                }
1274
1276
            }
1275
1277
        }
1276
1278
 
1277
1279
      /* Loop over the dirents in the target. */
1278
 
      for (hi = apr_hash_first(pool, t_entries); hi; hi = apr_hash_next(hi))
 
1280
      for (hi = apr_hash_first(subpool, t_entries);
 
1281
           hi;
 
1282
           hi = apr_hash_next(hi))
1279
1283
        {
1280
1284
          const svn_fs_dirent_t *s_entry, *t_entry;
1281
1285
 
1282
 
          svn_pool_clear(subpool);
 
1286
          svn_pool_clear(iterpool);
1283
1287
          t_entry = svn__apr_hash_index_val(hi);
1284
1288
 
1285
1289
          if (is_depth_upgrade(wc_depth, requested_depth, t_entry->kind))
1307
1311
                  svn_hash_gets(s_entries, t_entry->name)
1308
1312
                  : NULL;
1309
1313
              s_fullpath = s_entry ?
1310
 
                  svn_fspath__join(s_path, t_entry->name, subpool) : NULL;
 
1314
                  svn_fspath__join(s_path, t_entry->name, iterpool) : NULL;
1311
1315
            }
1312
1316
 
1313
1317
          /* Compose the report, editor, and target paths for this entry. */
1314
 
          e_fullpath = svn_relpath_join(e_path, t_entry->name, subpool);
1315
 
          t_fullpath = svn_fspath__join(t_path, t_entry->name, subpool);
 
1318
          e_fullpath = svn_relpath_join(e_path, t_entry->name, iterpool);
 
1319
          t_fullpath = svn_fspath__join(t_path, t_entry->name, iterpool);
1316
1320
 
1317
1321
          SVN_ERR(update_entry(b, s_rev, s_fullpath, s_entry, t_fullpath,
1318
1322
                               t_entry, dir_baton, e_fullpath, NULL,
1319
1323
                               DEPTH_BELOW_HERE(wc_depth),
1320
1324
                               DEPTH_BELOW_HERE(requested_depth),
1321
 
                               subpool));
 
1325
                               iterpool));
1322
1326
        }
1323
1327
 
1324
1328
 
1325
1329
      /* Destroy iteration subpool. */
1326
 
      svn_pool_destroy(subpool);
 
1330
      svn_pool_destroy(iterpool);
1327
1331
    }
 
1332
 
 
1333
  svn_pool_destroy(subpool);
 
1334
 
1328
1335
  return SVN_NO_ERROR;
1329
1336
}
1330
1337