You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Refael Ackermann <mo...@netvision.net.il> on 2004/10/07 18:43:59 UTC

[PATCH] regression test for issue 2070

[[[[
* /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 previus 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 r1124 svn would try to update the date on a link
+  # and would error out is the traget 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

Re: [PATCH] regression test for issue 2070

Posted by François Beausoleil <fb...@ftml.net>.
Hi !

Refael Ackermann wrote:
> +  # Add and Commit (verified by previus tests)
Minor typo                             ^^^

> +  # Before r1124 svn would try to update the date on a link
               ^^^^^
Is this correct ?

> +  # and would error out is the traget was not present yet
Probably s/is the trag/if the targ/ ?

François

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org