Log message:
[[[
Add XFail test for relocating working copy with removed externals.

Found by: TortoiseSVN dump
Patch by: Ivan Zhakov {ivan {at} visualsvn.com}

* subversion/tests/cmdline/relocate_tests.py
  (relocate_with_removed_externals): New test.
  (test_list): Add new test to the test list.
]]]

-- 
Ivan Zhakov
Index: subversion/tests/cmdline/relocate_tests.py
===================================================================
--- subversion/tests/cmdline/relocate_tests.py  (revision 1806425)
+++ subversion/tests/cmdline/relocate_tests.py  (working copy)
@@ -418,7 +418,37 @@
   svntest.actions.run_and_verify_info([{ 'URL' : '.*.yyyother$' }],
                                       wc_dir)
   
+
+@XFail()
+def relocate_with_removed_externals(sbox):
+  "relocate a directory with removed externals"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Add a relative external.
+  change_external(os.path.join(wc_dir, 'A', 'B'),
+                  "^/A/D/G G-ext", commit=True)
+  svntest.actions.run_and_verify_svn(None, [], 'update', wc_dir)
+
+  svntest.main.safe_rmtree(os.path.join(wc_dir, 'A', 'B', 'G-ext'), 1)
+
+  # Move our repository to another location.
+  repo_dir = sbox.repo_dir
+  repo_url = sbox.repo_url
+  other_repo_dir, other_repo_url = sbox.add_repo_path('other')
+  svntest.main.copy_repos(repo_dir, other_repo_dir, 2, 0)
+  svntest.main.safe_rmtree(repo_dir, 1)
+
+  # Now relocate our working copy.
+  svntest.actions.run_and_verify_svn(None, [], 'relocate',
+                                     repo_url, other_repo_url, wc_dir)
+
   
+  # Check the URLs of the externals -- were they updated to point to the
+  # .other repository URL?
+  svntest.actions.run_and_verify_info([{ 'URL' : '.*.other/A/D/G$' }],
+                                      os.path.join(wc_dir, 'A', 'B', 'G-ext'))
 ########################################################################
 # Run the tests
 
@@ -431,6 +461,7 @@
               relocate_with_switched_children,
               relocate_with_relative_externals,
               prefix_partial_component,
+              relocate_with_removed_externals,
               ]
 
 if __name__ == '__main__':

Reply via email to