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

Re: [PATCH] add 'svn:use-commit-times' property

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Fri, 26 Jul 2013 17:23:33 +0100

Masaru Tsuchiyama <m.tmatma_at_gmail.com> writes:

> Index: subversion/include/svn_props.h
> ===================================================================
> --- subversion/include/svn_props.h (revision 1505676)
> +++ subversion/include/svn_props.h (working copy)
> @@ -449,6 +449,9 @@
> /** Property used to record inheritable configuration ignores. */
> #define SVN_PROP_INHERITABLE_IGNORES SVN_PROP_PREFIX "global-ignores"
>
> +/** Property used to control whether timestamp of a file is modified to the commit time */
> +#define SVN_PROP_USE_COMMIT_TIMES SVN_PROP_PREFIX "use-commit-times"
> +

You need to mark this new value @since 1.9.

> /** Meta-data properties.
> *
> * The following properties are used for storing meta-data about
> @@ -509,7 +512,8 @@
> SVN_PROP_TEXT_TIME, \
> SVN_PROP_OWNER, \
> SVN_PROP_GROUP, \
> - SVN_PROP_UNIX_MODE,
> + SVN_PROP_UNIX_MODE, \
> + SVN_PROP_USE_COMMIT_TIMES,
>
> /** @} */
>
> Index: subversion/libsvn_wc/workqueue.c
> ===================================================================
> --- subversion/libsvn_wc/workqueue.c (revision 1505676)
> +++ subversion/libsvn_wc/workqueue.c (working copy)
> @@ -638,6 +638,9 @@
> SVN_ERR(svn_io_set_file_read_only(local_abspath, FALSE, scratch_pool));
> }
>
> + if (props && svn_hash_gets(props, SVN_PROP_USE_COMMIT_TIMES))
> + use_commit_times = TRUE;
> +
> if (use_commit_times)
> {
> if (changed_date)

For consistency with other properties you need to implement this
behaviour:

/** Properties whose values are interpreted as booleans (such as
 * svn:executable, svn:needs_lock, and svn:special) always fold their
 * value to this.
 *
 * @since New in 1.5.
 */
#define SVN_PROP_BOOLEAN_TRUE "*"

This probably means changing svn_prop_is_boolean so that

    svn propset svn:use-commit-times foo some/file

converts the value 'foo' to SVN_PROP_BOOLEAN_TRUE.

We also need regression tests for the standard testsuite, see
subversion/tests/cmdline/prop_tests.py.

-- 
Philip Martin | Subversion Committer
WANdisco | Non-Stop Data
Received on 2013-07-26 18:24:10 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.