You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2015/01/12 13:15:03 UTC

svn commit: r1651070 - /subversion/trunk/subversion/tests/cmdline/externals_tests.py

Author: philip
Date: Mon Jan 12 12:15:03 2015
New Revision: 1651070

URL: http://svn.apache.org/r1651070
Log:
Regression test for wc-to-repo copy of a file external, this
didn't work before 1.8.

* subversion/tests/cmdline/externals_tests.py
  (copy_file_external_to_repo): New test.
  (test_list): Add new test.

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

Modified: subversion/trunk/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/externals_tests.py?rev=1651070&r1=1651069&r2=1651070&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/externals_tests.py Mon Jan 12 12:15:03 2015
@@ -3480,6 +3480,31 @@ def switch_relative_externals(sbox):
                                      'up', wc)
 
 
+def copy_file_external_to_repo(sbox):
+  "explicitly copy file external to repo"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  change_external(sbox.ospath('A'), '^/A/mu ext')
+  sbox.simple_update()
+
+  svntest.actions.run_and_verify_svn(None, None, [], 'cp',
+                                     '--message', 'external copy',
+                                     sbox.ospath('A/ext'),
+                                     sbox.repo_url + '/ext_copy')
+
+  expected_output = svntest.wc.State(wc_dir, {
+      'ext_copy' : Item(status='A '),
+  })
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.add({
+      'A/ext'    : Item('This is the file \'mu\'.\n'),
+      'ext_copy' : Item('This is the file \'mu\'.\n'),
+      })
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        expected_output, expected_disk, None)
+
 ########################################################################
 # Run the tests
 
@@ -3538,6 +3563,7 @@ test_list = [ None,
               update_external_peg_rev,
               update_deletes_file_external,
               switch_relative_externals,
+              copy_file_external_to_repo,
              ]
 
 if __name__ == '__main__':