Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8316076B1 for ; Mon, 12 Sep 2011 17:50:14 +0000 (UTC) Received: (qmail 91465 invoked by uid 500); 12 Sep 2011 17:50:14 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 91407 invoked by uid 500); 12 Sep 2011 17:50:13 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 91400 invoked by uid 99); 12 Sep 2011 17:50:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Sep 2011 17:50:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Sep 2011 17:50:12 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 5869023888FE for ; Mon, 12 Sep 2011 17:49:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1169849 - /subversion/branches/fs-successor-ids/subversion/libsvn_fs_fs/fs_fs.c Date: Mon, 12 Sep 2011 17:49:52 -0000 To: commits@subversion.apache.org From: danielsh@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110912174952.5869023888FE@eris.apache.org> Author: danielsh Date: Mon Sep 12 17:49:51 2011 New Revision: 1169849 URL: http://svn.apache.org/viewvc?rev=1169849&view=rev Log: On the fs-successor-ids branch, improve a file-private API. No functional change. Patch by: stsp * subversion/libsvn_fs_fs/fs_fs.c (path_successor_node_revs): Change signature: take a parsed noderev id, rather than unparsed. (update_successor_node_revs_files): Update callers. Modified: subversion/branches/fs-successor-ids/subversion/libsvn_fs_fs/fs_fs.c Modified: subversion/branches/fs-successor-ids/subversion/libsvn_fs_fs/fs_fs.c URL: http://svn.apache.org/viewvc/subversion/branches/fs-successor-ids/subversion/libsvn_fs_fs/fs_fs.c?rev=1169849&r1=1169848&r2=1169849&view=diff ============================================================================== --- subversion/branches/fs-successor-ids/subversion/libsvn_fs_fs/fs_fs.c (original) +++ subversion/branches/fs-successor-ids/subversion/libsvn_fs_fs/fs_fs.c Mon Sep 12 17:49:51 2011 @@ -309,16 +309,13 @@ path_successor_node_revs_shard(svn_fs_t } static const char * -path_successor_node_revs(svn_fs_t *fs, const char *node_rev_id, - apr_pool_t *pool) +path_successor_node_revs(svn_fs_t *fs, const svn_fs_id_t *id, apr_pool_t *pool) { fs_fs_data_t *ffd = fs->fsap_data; - svn_fs_id_t *id; svn_revnum_t rev; long filenum; /* ### TODO(sid): danielsh: is there a need to guard for ID == NULL here? */ - id = svn_fs_fs__id_parse(node_rev_id, strlen(node_rev_id), pool); rev = svn_fs_fs__id_rev(id); assert(ffd->max_files_per_dir); filenum = (rev % FSFS_SUCCESSORS_REVISIONS_PER_SHARD(ffd)) / FSFS_SUCCESSORS_MAX_REVS_PER_FILE; @@ -6164,13 +6161,15 @@ update_successor_node_revs_files(apr_has for (hi = apr_hash_first(pool, successor_ids); hi; hi = apr_hash_next(hi)) { const char *pred = svn_apr_hash_index_key(hi); + svn_fs_id_t *pred_id = svn_fs_fs__id_parse(pred, strlen(pred), pool); const char *node_revs_file_abspath; svn_pool_clear(iterpool); /* This string will be obtained by the caller when iterating over * the NODE_REV_TEMPILES hash so we allocate it in the result pool. */ - node_revs_file_abspath = path_successor_node_revs(fs, pred, pool); + + node_revs_file_abspath = path_successor_node_revs(fs, pred_id, pool); if (apr_hash_get(tempfiles, node_revs_file_abspath, APR_HASH_KEY_STRING) == NULL) { @@ -6215,13 +6214,15 @@ update_successor_node_revs_files(apr_has for (hi = apr_hash_first(pool, successor_ids); hi; hi = apr_hash_next(hi)) { const char *pred = svn_apr_hash_index_key(hi); + svn_fs_id_t *pred_id; const char *node_revs_file_abspath; apr_file_t *tempfile; const char *new_line; svn_pool_clear(iterpool); - node_revs_file_abspath = path_successor_node_revs(fs, pred, iterpool); + pred_id = svn_fs_fs__id_parse(pred, strlen(pred), iterpool); + node_revs_file_abspath = path_successor_node_revs(fs, pred_id, iterpool); tempfile = apr_hash_get(tempfiles, node_revs_file_abspath, APR_HASH_KEY_STRING); SVN_ERR_ASSERT(tempfile);