On Thu, 2010-09-09 at 13:08 +0530, Senthil Kumaran S wrote:
> Hi Vijay,
>
> vijayaguru wrote:
> > The attached patch adds a test case for issue #3471:svn up touches file
> > w/ lock & svn:keywords property and marking it as 'XFail' until the
> > issue is fixed.
>
> Thanks for the patch. I reviewed it and I could see the patch does not test
> the
> actual problem. The issue says the timestamp changes for the file hence
> 'make'
> rebuilds stuff. In this case you have tested whether the keyword is expanded
> or
> not, which is a valid check for this use case, but apart from that you must
> also test whether an update happens for the file or not, because if someone
> fixes the keyword expansion thingy, and still something else causes an update
> of the file's timestamp, that is also not acceptable, since 1.4.x didn't
> behave
> in such a way. Hence do a check for timestamp on the file after an update.
>
> PS: See that all lines in your patch is within 79 columns.
>
> Thank You.
Thanks senthil. The attached patch tests the timestamp changes before
and after "svn up" and raises failure if they are not same.
[[[
Log:
Add a test for issue #3471:'svn up touches file w/ lock &
svn:keywords property'
* subversion/tests/cmdline/update_tests.py
(update_with_file_lock_and_keywords_property_set): New test case.
(test_list): Add update_with_file_lock_and_keywords_property_set and
mark it as XFail.
]]]
Thanks & Regards,
Vijayaguru
Index: subversion/tests/cmdline/update_tests.py
===================================================================
--- subversion/tests/cmdline/update_tests.py (revision 995318)
+++ subversion/tests/cmdline/update_tests.py (working copy)
@@ -5720,7 +5720,32 @@
svntest.actions.run_and_verify_update(wc_dir, expected_output,
expected_disk, expected_status)
+#----------------------------------------------------------------------
+# Test for issue #3471 'svn up touches file w/ lock & svn:keywords property'
+#
+# Marked as XFail until that issue is fixed.
+def update_with_file_lock_and_keywords_property_set(sbox):
+ """update with file lock & keywords property set"""
+ sbox.build()
+
+ wc_dir = sbox.wc_dir
+ mu_path = os.path.join(wc_dir, 'A', 'mu')
+ svntest.main.file_append(mu_path, '$Id$')
+ svntest.main.run_svn(None, 'ps', 'svn:keywords', 'Id', mu_path)
+ svntest.main.run_svn(None, 'lock', mu_path)
+ mu_ts_before_update = os.path.getmtime(mu_path)
+
+ # Issue #3471 manifests itself here; The timestamp of 'mu' gets updated
+ # to the time of the last "svn up".
+ sbox.simple_update()
+ mu_ts_after_update = os.path.getmtime(mu_path)
+ if (mu_ts_before_update != mu_ts_after_update):
+ print("The timestamp of 'mu' before and after update does not match.")
+ raise svntest.Failure
+
+
+
#######################################################################
# Run the tests
@@ -5792,6 +5817,7 @@
add_moved_file_has_props,
XFail(add_moved_file_has_props2),
update_with_excluded_subdir,
+ XFail(update_with_file_lock_and_keywords_property_set)
]
if __name__ == '__main__':