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

RE: svn commit: r1096777 - /subversion/trunk/subversion/libsvn_wc/props.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Tue, 26 Apr 2011 18:29:29 +0200

> -----Original Message-----
> From: hwright_at_apache.org [mailto:hwright_at_apache.org]
> Sent: dinsdag 26 april 2011 17:15
> To: commits_at_subversion.apache.org
> Subject: svn commit: r1096777 -
> /subversion/trunk/subversion/libsvn_wc/props.c
>
> Author: hwright
> Date: Tue Apr 26 15:15:24 2011
> New Revision: 1096777
>
> URL: http://svn.apache.org/viewvc?rev=1096777&view=rev
> Log:
> Use the work queue to set file flags when doing a propset.
>
> * subversion/libsvn_wc/props.c
> (do_propset): Remove the custom flag-setting code in favor or using the
> work queue.
>
> Modified:
> subversion/trunk/subversion/libsvn_wc/props.c
>
> Modified: subversion/trunk/subversion/libsvn_wc/props.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/prop
> s.c?rev=1096777&r1=1096776&r2=1096777&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_wc/props.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/props.c Tue Apr 26 15:15:24
> 2011
> @@ -2018,6 +2018,7 @@ do_propset(svn_wc__db_t *db,
> svn_wc_notify_action_t notify_action;
> svn_wc__db_kind_t kind;
> svn_wc__db_status_t status;
> + svn_skel_t *work_item = NULL;
>
> SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
>
> @@ -2073,29 +2074,8 @@ do_propset(svn_wc__db_t *db,
> value = new_value;
> }
>
> - if (kind == svn_wc__db_kind_file && strcmp(name,
> SVN_PROP_EXECUTABLE) == 0)
> - {
> - /* If the svn:executable property was set, then chmod +x.
> - If the svn:executable property was deleted (NULL value passed
> - in), then chmod -x. */
> - if (value == NULL)
> - SVN_ERR(svn_io_set_file_executable(local_abspath, FALSE, TRUE,
> - scratch_pool));
> - else
> - SVN_ERR(svn_io_set_file_executable(local_abspath, TRUE, TRUE,
> - scratch_pool));
> - }
> -
> - if (kind == svn_wc__db_kind_file && strcmp(name,
> SVN_PROP_NEEDS_LOCK) == 0)
> - {
> - /* If the svn:needs-lock property was set to NULL, set the file
> - to read-write */
> - if (value == NULL)
> - SVN_ERR(svn_io_set_file_read_write(local_abspath, FALSE,
> - scratch_pool));
> -
> - /* If not, we'll set the file to read-only at commit time. */
> - }
> + SVN_ERR(svn_wc__wq_build_sync_file_flags(&work_item, db,
> local_abspath,
> + scratch_pool, scratch_pool));

It would be nice if you only insert this wq operation (and run the wq) when we actually change one of these two special property values.

This makes setting properties via this api several times slower than it needs to be, while it is only necessary for setting these properties... and when the property actually changes.

        Bert
Received on 2011-04-26 18:56:43 CEST

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.