subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r905587 - /subversion/trunk/subversion/tests/cmdline/update_tests.py
Date Tue, 02 Feb 2010 11:39:48 GMT
Author: rhuijben
Date: Tue Feb  2 11:39:48 2010
New Revision: 905587

URL: http://svn.apache.org/viewvc?rev=905587&view=rev
Log:
This patch adds a very simple testcase to support issue #3569:

I can summarize this issue by:
$ svn up --depth files <directory>
$ svn up <directory>

You would expect that the last 'svn up' makes the working copy 'complete',
but you will see that this case misses all new child directories added
before the 'svn up --depth <below-dir-depth>'.

The more generic case 'svn up --depth empty <directory>' is tested in
this new testcase as it is a very simple to build testcase that just
checks the inner issue.

(This issue is triggered by AnkhSVN users via a file selector UI where
 you can also choose to update directories with depth empty)

* subversion/tests/cmdline/update_tests.py
  (update_empty_hides_entries): New function.
  (test_list): Add test

Modified:
    subversion/trunk/subversion/tests/cmdline/update_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/update_tests.py?rev=905587&r1=905586&r2=905587&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/update_tests.py Tue Feb  2 11:39:48 2010
@@ -4864,6 +4864,76 @@
                                         expected_disk,
                                         expected_status)
 
+#----------------------------------------------------------------------
+# Test for issue #3659 svn update --depth <DEPTH> allows making a working
+# copy incomplete.
+#
+# XFail until issue #3659 is fixed.  This test needs extension to map some
+# real use cases (all add operations are missing if a directory is updated
+# without its children.)
+def update_empty_hides_entries(sbox):
+  "svn up --depth empty hides entries for next update"
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  expected_disk_empty = []
+  expected_status_empty = []
+
+  expected_disk = svntest.main.greek_state.copy()
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+
+  # Update to revision 0 - Removes all files from WC
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        None,
+                                        expected_disk_empty,
+                                        expected_status_empty,
+                                        None, None, None,
+                                        None, None, 1,
+                                        '-r', '0',
+                                        wc_dir)
+
+  # Now update back to HEAD
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        None,
+                                        expected_disk,
+                                        expected_status,
+                                        None, None, None,
+                                        None, None, 1,
+                                        wc_dir)
+
+  # Update to revision 0 - Removes all files from WC
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        None,
+                                        expected_disk_empty,
+                                        expected_status_empty,
+                                        None, None, None,
+                                        None, None, 1,
+                                        '-r', '0',
+                                        wc_dir)
+
+  # Update the directory itself back to HEAD
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        None,
+                                        expected_disk_empty,
+                                        expected_status_empty,
+                                        None, None, None,
+                                        None, None, 1,
+                                        '--depth', 'empty',
+                                        wc_dir)
+
+  # Now update the rest back to head
+  
+  # This operation is currently a NO-OP, because the WC-Crawler
+  # tells the repository that it contains a full tree of the HEAD
+  # revision.
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        None,
+                                        expected_disk,
+                                        expected_status,
+                                        None, None, None,
+                                        None, None, 1,
+                                        wc_dir)
+
 
 #######################################################################
 # Run the tests
@@ -4931,6 +5001,7 @@
               set_deep_depth_on_target_with_shallow_children,
               update_wc_of_dir_to_rev_not_containing_this_dir,
               XFail(update_deleted_locked_files),
+              XFail(update_empty_hides_entries),
              ]
 
 if __name__ == '__main__':



Mime
View raw message