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/04 02:59:00 UTC

[PATCH] fix for issue 2070

Simple, don't try to change the affected time on special files (here allso).
Same as when exporting from working copy, so should be done for exports 
from URLs.

/moseack


[[[
Fix for issue 2070

* subversion/libsvn_client/export.c
   (close_file) Added check for special files
     when attempting to "set_file_affected_time"
]]]



Index: subversion/libsvn_client/export.c
===================================================================
--- subversion/libsvn_client/export.c   (revision 11207)
+++ subversion/libsvn_client/export.c   (working copy)
@@ -675,7 +675,7 @@
    if (fb->executable_val)
      SVN_ERR (svn_io_set_file_executable (fb->path, TRUE, FALSE, pool));

-  if (fb->date)
+  if ((fb->date) && (! fb->special))
      SVN_ERR (svn_io_set_file_affected_time (fb->date, fb->path, pool));

    if (fb->edit_baton->notify_func)


---------------------------------------------------------------------
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

[PATCH] regression test for issue 2070

Posted by Refael Ackermann <mo...@netvision.net.il>.
[[[[
* /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] fix for issue 2070

Posted by Tobias Ringström <to...@ringstrom.mine.nu>.
Refael Ackermann wrote:

> Simple, don't try to change the affected time on special files (here 
> allso).
> Same as when exporting from working copy, so should be done for 
> exports from URLs.

Thanks!  I've applied your patch in r11224, and it will most likely be 
in 1.1.1.

/Tobias


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