[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: Masaru Tsuchiyama <m.tmatma_at_gmail.com>
Date: Sun, 28 Jul 2013 18:12:08 +0900

Hi.

I attache new patch.

 [[[
   add 'svn:use-commit-times' property. If a file has 'svn:use-commit-times' property,
   the timestamp of the file is modified to commit time.

   * subversion/include/svn_props.h
    (): add SVN_PROP_USE_COMMIT_TIMES and SVN_PROP_USE_COMMIT_TIMES_VALUE
    (): add SVN_PROP_USE_COMMIT_TIMES to SVN_PROP_NODE_ALL_PROPS

   * subversion/libsvn_subr/properties.c
    (svn_prop_is_boolean) : svn_prop_is_boolean() checks SVN_PROP_USE_COMMIT_TIMES

   * subversion/libsvn_wc/props.c
    (svn_wc_canonicalize_svn_prop) : add comment

   * subversion/libsvn_wc/update_editor.c
    (): include assert.h
    (struct file_baton): add use_commit_times and remove_use_commit_times
    (change_file_prop): set fb->use_commit_times or fb->remove_use_commit_times
    (close_file): change the timestamp of file when use_commit_times or remove_use_commit_times is set.
    
   * subversion/libsvn_wc/workqueue.c
    (run_file_install): set use_commit_times when svn:use-commit-times is set

   * subversion/tests/cmdline/checkout_tests.py
    (checkout_with_use_commit_times): add checkout test when svn:use-commit-times is set
    (test_list): add checkout_with_use_commit_times to test_list

   * subversion/tests/cmdline/export_tests.py
    (): import time
    (export_with_use_commit_times): add export test when svn:use-commit-times is set
    (test_list): add export_with_use_commit_times to test_list

   * subversion/tests/cmdline/prop_tests.py
    (prop_value_conversions): add test setting and getting svn:use-commit-times

   * subversion/tests/cmdline/update_tests.py
    (update_with_use_commit_times): add update test when svn:use-commit-times is set
    (test_list): add update_with_use_commit_times to test_list
 ]]]

> 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.

I implement this behavior.

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

I implement the regression tests.

Received on 2013-07-28 11:12:47 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.