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

[PATCH] regression test for issue 2070

From: Refael Ackermann <mose_at_netvision.net.il>
Date: 2004-10-10 14:32:24 CEST

Typo clean-up

[[[[
* /subversion/tests/clients/cmdline/special_tests.py
        added a new test to prevent regression of issue 2070
        (not using run_and_verify_* for simplicity)
]]]]

Index: special_tests.py
===================================================================
--- special_tests.py (revision 11275)
+++ special_tests.py (working copy)
@@ -356,6 +356,43 @@
                                          None, None, None, None, wc_dir)

+#----------------------------------------------------------------------
+# Regression test for issue #2070
+
+def export_symlink_before_target(sbox):
+ "export a symlink before it's target"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ # Create a clean new dir
+ new_dir_name = 'newdir'
+ wc_dir = os.path.join(wc_dir, new_dir_name)
+ svntest.main.run_svn(0, 'mkdir', wc_dir)
+
+ # Create new symlink and target in newdir
+ newfile_path = os.path.join(wc_dir, 'a.link')
+ linktarget_path = os.path.join(wc_dir, 'b.targ')
+ svntest.main.file_append(linktarget_path, 'this is just a link target')
+ os.symlink('b.targ', newfile_path)
+
+ # Add and Commit (verified by previous tests)
+ svntest.main.run_svn(0, 'add', newfile_path, linktarget_path)
+ svntest.main.run_svn(1, 'commit', wc_dir, '-m', 'symlink in')
+
+ # Export just newdir into a new clean dir
+ # Before r11224 svn would try to update the date on a link
+ # and would error out if the target was not present yet
+ export_url = svntest.main.current_repo_url + '/' + new_dir_name
+ export_target = sbox.add_wc_path('export_to')
+
+ stdout_lines, stderr_lines = svntest.main.run_svn(1, 'export',
+ export_url,
+ export_target)
+ if (len(stderr_lines) != 0):
+ print stderr_lines[0]
+ raise svntest.Failure
+
  ########################################################################
  # Run the tests

@@ -368,6 +405,7 @@
                Skip(copy_tree_with_symlink, (os.name != 'posix')),
                Skip(replace_symlink_with_file, (os.name != 'posix')),
                Skip(remove_symlink, (os.name != 'posix')),
+ Skip(export_symlink_before_target, (os.name != 'posix')),
               ]

  if __name__ == '__main__':

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Oct 10 14:32:35 2004

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.