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

[patch] Issue #601 regression tests in trans_tests.py

From: Madan U Sreenivasan <madan_at_collab.net>
Date: 2005-02-14 13:53:32 CET

Index: subversion/tests/clients/cmdline/trans_tests.py
===================================================================
--- subversion/tests/clients/cmdline/trans_tests.py (revision 13004)
+++ subversion/tests/clients/cmdline/trans_tests.py (working copy)
@@ -653,6 +653,68 @@
                                          wc_dir)
 
   
+#----------------------------------------------------------------------
+# Regression test described in issue #601.
+# Create a greek tree, commit a keyword into one file,
+# then commit a keyword property (i.e., turn on keywords), then
+# try to check out head somewhere else. See seg fault.
+def propset_commit_otherwc_checkout(sbox):
+ "propset, commit, checkout into another wc"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ mu_path = os.path.join(wc_dir, 'A', 'mu')
+
+ # Set up A/mu to do $Rev$ keyword expansion
+ svntest.main.file_append (mu_path , "\n$Rev$")
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'propset', 'svn:keywords', 'Rev', mu_path)
+
+ expected_output = wc.State(wc_dir, {
+ 'A/mu' : Item(verb='Sending'),
+ })
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
+ expected_status.tweak(wc_rev=1)
+ expected_status.tweak('A/mu', wc_rev=2)
+ svntest.actions.run_and_verify_commit (wc_dir,
+ expected_output, expected_status,
+ None, None, None, None, None,
+ wc_dir)
+
+
+ # Checkout into another wc dir
+ other_wc_dir = sbox.add_wc_path('other')
+ mu_other_path = os.path.join(other_wc_dir, 'A', 'mu')
+
+ svntest.actions.run_and_verify_svn (None, None, None, 'checkout',
+ '--username', svntest.main.wc_author,
+ '--password', svntest.main.wc_passwd,
+ svntest.main.current_repo_url,
+ other_wc_dir)
+
+ # Check the contents of the file
+ svntest.actions.run_and_verify_svn (None, [ "This is the file 'mu'.\n",
+ "$Rev: 2 $" ], None,
+ 'cat', '-r', 'HEAD', mu_other_path)
+
+#----------------------------------------------------------------------
+# Regression test described in issue #601.
+# Add the keyword property to a file, svn revert the file, see
+# error.
+def propset_revert(sbox):
+ "propset, revert"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ mu_path = os.path.join(wc_dir, 'A', 'mu')
+
+ # Set the Rev keyword for the mu file
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'propset', 'svn:keywords', 'Rev', mu_path)
+
+ # Revert the propset
+ svntest.actions.run_and_verify_svn(None, None, [], 'revert', mu_path)
+
 ########################################################################
 # Run the tests
 
@@ -668,6 +730,8 @@
               keyword_expanded_on_checkout,
               cat_keyword_expansion,
               copy_propset_commit,
+ propset_commit_otherwc_checkout,
+ propset_revert,
              ]
 
 if __name__ == '__main__':

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Feb 16 05:51:53 2005

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.