You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ivan Zhakov <iv...@visualsvn.com> on 2013/09/28 21:22:02 UTC
Re: svn commit: r1527217 - /subversion/trunk/subversion/libsvn_fs_fs/transaction.c
On 28 September 2013 23:11, <st...@apache.org> wrote:
> Author: stefan2
> Date: Sat Sep 28 19:11:23 2013
> New Revision: 1527217
>
> URL: http://svn.apache.org/r1527217
> Log:
> Skip move-related checks and updates in FSFS if moves are not supported.
> This minimizes the overhead for existing repositories.
>
> * subversion/libsvn_fs_fs/transaction.c
> (write_final_changed_path_info,
> commit_body): execute fs_move related code only if moves are supported
> by the current FSFS format
>
> Modified:
> subversion/trunk/subversion/libsvn_fs_fs/transaction.c
>
> Modified: subversion/trunk/subversion/libsvn_fs_fs/transaction.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/transaction.c?rev=1527217&r1=1527216&r2=1527217&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_fs_fs/transaction.c (original)
> +++ subversion/trunk/subversion/libsvn_fs_fs/transaction.c Sat Sep 28 19:11:23 2013
> @@ -2706,15 +2706,16 @@ write_final_changed_path_info(apr_off_t
> SVN_ERR(svn_fs_fs__get_file_offset(&offset, file, pool));
>
> /* all moves specify the "copy-from-rev" as REV-1 */
> - for (hi = apr_hash_first(pool, changed_paths); hi; hi = apr_hash_next(hi))
> - {
> - svn_fs_path_change2_t *change;
> - apr_hash_this(hi, NULL, NULL, (void **)&change);
> + if (svn_fs_fs__supports_move(fs))
Minor nit: explicit statement block ({}) will make code more readable.
> + for (hi = apr_hash_first(pool, changed_paths); hi; hi = apr_hash_next(hi))
> + {
> + svn_fs_path_change2_t *change;
> + apr_hash_this(hi, NULL, NULL, (void **)&change);
"change = svn__apr_hash_index_key(hi);" ?
--
Ivan Zhakov
CTO | VisualSVN | http://www.visualsvn.com
Re: svn commit: r1527217 - /subversion/trunk/subversion/libsvn_fs_fs/transaction.c
Posted by Stefan Fuhrmann <st...@wandisco.com>.
On Sat, Sep 28, 2013 at 9:22 PM, Ivan Zhakov <iv...@visualsvn.com> wrote:
> On 28 September 2013 23:11, <st...@apache.org> wrote:
> > Author: stefan2
> > Date: Sat Sep 28 19:11:23 2013
> > New Revision: 1527217
> >
> > URL: http://svn.apache.org/r1527217
> > Log:
> > Skip move-related checks and updates in FSFS if moves are not supported.
> > This minimizes the overhead for existing repositories.
> >
> > * subversion/libsvn_fs_fs/transaction.c
> > (write_final_changed_path_info,
> > commit_body): execute fs_move related code only if moves are supported
> > by the current FSFS format
> >
> > Modified:
> > subversion/trunk/subversion/libsvn_fs_fs/transaction.c
> >
> > Modified: subversion/trunk/subversion/libsvn_fs_fs/transaction.c
> > URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/transaction.c?rev=1527217&r1=1527216&r2=1527217&view=diff
> >
> ==============================================================================
> > --- subversion/trunk/subversion/libsvn_fs_fs/transaction.c (original)
> > +++ subversion/trunk/subversion/libsvn_fs_fs/transaction.c Sat Sep 28
> 19:11:23 2013
> > @@ -2706,15 +2706,16 @@ write_final_changed_path_info(apr_off_t
> > SVN_ERR(svn_fs_fs__get_file_offset(&offset, file, pool));
> >
> > /* all moves specify the "copy-from-rev" as REV-1 */
> > - for (hi = apr_hash_first(pool, changed_paths); hi; hi =
> apr_hash_next(hi))
> > - {
> > - svn_fs_path_change2_t *change;
> > - apr_hash_this(hi, NULL, NULL, (void **)&change);
> > + if (svn_fs_fs__supports_move(fs))
> Minor nit: explicit statement block ({}) will make code more readable.
>
> > + for (hi = apr_hash_first(pool, changed_paths); hi; hi =
> apr_hash_next(hi))
> > + {
> > + svn_fs_path_change2_t *change;
> > + apr_hash_this(hi, NULL, NULL, (void **)&change);
> "change = svn__apr_hash_index_key(hi);" ?
>
Committed as r1532893.
Thanks for the review!
-- Stefan^2.