You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2011/04/12 17:34:32 UTC
svn commit: r1091470 - in /subversion/trunk/subversion:
libsvn_wc/questions.c tests/cmdline/stat_tests.py
Author: philip
Date: Tue Apr 12 15:34:31 2011
New Revision: 1091470
URL: http://svn.apache.org/viewvc?rev=1091470&view=rev
Log:
Start making timestamp repair work in WCNG; revert now works but
not cleanup. Issue 3773.
* subversion/libsvn_wc/questions.c
(svn_wc__internal_file_modified_p): Repair timestamps if locked.
* subversion/tests/cmdline/stat_tests.py
(text_time_behaviour): Check for timestamp repair by restoring code
removed in r878620.
(timestamp_behaviour): Mark XFail and issue 3773.
Modified:
subversion/trunk/subversion/libsvn_wc/questions.c
subversion/trunk/subversion/tests/cmdline/stat_tests.py
Modified: subversion/trunk/subversion/libsvn_wc/questions.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/questions.c?rev=1091470&r1=1091469&r2=1091470&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/questions.c (original)
+++ subversion/trunk/subversion/libsvn_wc/questions.c Tue Apr 12 15:34:31 2011
@@ -378,11 +378,26 @@ svn_wc__internal_file_modified_p(svn_boo
}
/* Check all bytes, and verify checksum if requested. */
- return svn_error_return(compare_and_verify(modified_p, db, local_abspath,
- pristine_stream,
- compare_textbases,
- force_comparison,
- scratch_pool));
+ SVN_ERR(compare_and_verify(modified_p, db, local_abspath,
+ pristine_stream,
+ compare_textbases,
+ force_comparison,
+ scratch_pool));
+
+ if (!*modified_p)
+ {
+ svn_boolean_t own_lock;
+
+ /* The timestamp is missing or "broken" so "repair" it if we can. */
+ SVN_ERR(svn_wc__db_wclock_owns_lock(&own_lock, db, local_abspath, FALSE,
+ scratch_pool));
+ if (own_lock)
+ SVN_ERR(svn_wc__db_global_record_fileinfo(db, local_abspath,
+ finfo.size, finfo.mtime,
+ scratch_pool));
+ }
+
+ return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/stat_tests.py?rev=1091470&r1=1091469&r2=1091470&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/stat_tests.py Tue Apr 12 15:34:31 2011
@@ -679,9 +679,20 @@ def text_time_behaviour(wc_dir, wc_path,
if text_time != pre_text_time:
raise svntest.Failure
+ # revert/cleanup change the text-time even though the text doesn't change
+ if cmd == 'cleanup':
+ svntest.actions.run_and_verify_svn(None, None, [], cmd, wc_dir)
+ else:
+ svntest.actions.run_and_verify_svn(None, None, [], cmd, wc_path)
+ svntest.actions.run_and_verify_status(wc_dir, expected_status)
+ text_time = get_text_timestamp(wc_path)
+ if text_time == pre_text_time:
+ raise svntest.Failure
# Is this really a status test? I'm not sure, but I don't know where
# else to put it.
+@XFail()
+@Issue(3773)
def timestamp_behaviour(sbox):
"timestamp behaviour"
Re: svn commit: r1091470 - in /subversion/trunk/subversion: libsvn_wc/questions.c
tests/cmdline/stat_tests.py
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 04/12/2011 11:34 AM, philip@apache.org wrote:
> Author: philip
> Date: Tue Apr 12 15:34:31 2011
> New Revision: 1091470
>
> URL: http://svn.apache.org/viewvc?rev=1091470&view=rev
> Log:
> Start making timestamp repair work in WCNG; revert now works but
> not cleanup. Issue 3773.
Excellent!
And yet, bummer -- you stole my commit. Well, this is what I get for not
marked 3773 STARTED and assigning it to myself.
$ svn revert -R .
Reverted 'subversion/libsvn_wc/questions.c'
$
:-)
> * subversion/libsvn_wc/questions.c
> (svn_wc__internal_file_modified_p): Repair timestamps if locked.
Please make the docstring for this function point out this new behavior so
that callers can depend on / expect it.
(Also, as you saw, Bert points out that the post-commit processing might be
doing this work twice now. You'll want to look into that.)
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand