You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2018/07/31 14:22:18 UTC
svn commit: r1837151 - in /subversion/trunk/subversion: libsvn_repos/dump.c
tests/cmdline/svnadmin_tests.py
Author: julianfoad
Date: Tue Jul 31 14:22:18 2018
New Revision: 1837151
URL: http://svn.apache.org/viewvc?rev=1837151&view=rev
Log:
Fix issue SVN-4767: svnadmin dump shouldn't canonicalize svn:date.
* subversion/libsvn_repos/dump.c
(write_revision_record): Don't canonicalize svn:date.
* subversion/tests/cmdline/svnadmin_tests.py
(dump_no_canonicalize_svndate): New test.
(test_list): Run it.
Modified:
subversion/trunk/subversion/libsvn_repos/dump.c
subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py
Modified: subversion/trunk/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/dump.c?rev=1837151&r1=1837150&r2=1837151&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/dump.c (original)
+++ subversion/trunk/subversion/libsvn_repos/dump.c Tue Jul 31 14:22:18 2018
@@ -1936,25 +1936,11 @@ write_revision_record(svn_stream_t *stre
apr_pool_t *pool)
{
apr_hash_t *props;
- apr_time_t timetemp;
- svn_string_t *datevalue;
if (include_revprops)
{
SVN_ERR(svn_repos_fs_revision_proplist(&props, repos, rev,
authz_func, authz_baton, pool));
-
- /* Run revision date properties through the time conversion to
- canonicalize them. */
- /* ### Remove this when it is no longer needed for sure. */
- datevalue = svn_hash_gets(props, SVN_PROP_REVISION_DATE);
- if (datevalue)
- {
- SVN_ERR(svn_time_from_cstring(&timetemp, datevalue->data, pool));
- datevalue = svn_string_create(svn_time_to_cstring(timetemp, pool),
- pool);
- svn_hash_sets(props, SVN_PROP_REVISION_DATE, datevalue);
- }
}
else
{
Modified: subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py?rev=1837151&r1=1837150&r2=1837151&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py Tue Jul 31 14:22:18 2018
@@ -3826,6 +3826,23 @@ def load_issue4725(sbox):
sbox2.build(create_wc=False, empty=True)
load_and_verify_dumpstream(sbox2, None, [], None, False, dump, '-M100')
+@Issue(4767)
+def dump_no_canonicalize_svndate(sbox):
+ "svnadmin dump shouldn't canonicalize svn:date"
+
+ sbox.build(create_wc=False, empty=True)
+ svntest.actions.enable_revprop_changes(sbox.repo_dir)
+
+ # set svn:date in a non-canonical format (not six decimal places)
+ propval = "2015-01-01T00:00:00.0Z"
+ svntest.actions.run_and_verify_svn(svntest.verify.AnyOutput, [],
+ "propset", "--revprop", "-r0", "svn:date",
+ propval,
+ sbox.repo_url)
+
+ dump_lines = svntest.actions.run_and_verify_dump(sbox.repo_dir)
+ assert propval + '\n' in dump_lines
+
########################################################################
# Run the tests
@@ -3900,6 +3917,7 @@ test_list = [ None,
dump_exclude_all_rev_changes,
dump_invalid_filtering_option,
load_issue4725,
+ dump_no_canonicalize_svndate,
]
if __name__ == '__main__':