subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r992343 - /subversion/trunk/subversion/tests/cmdline/externals_tests.py
Date Fri, 03 Sep 2010 15:58:29 GMT
Author: philip
Date: Fri Sep  3 15:58:28 2010
New Revision: 992343

URL: http://svn.apache.org/viewvc?rev=992343&view=rev
Log:
Add an XFail regression test for a file external bug.

* subversion/tests/cmdline/externals_tests.py
  (update_modify_file_external): New.
  (test_list): Mark update_modify_file_external XFail.

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=992343&r1=992342&r2=992343&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/externals_tests.py Fri Sep  3 15:58:28 2010
@@ -1512,6 +1512,64 @@ def merge_target_with_externals(sbox):
      "    /A-branch:8\n"],
     [], 'pg', svntest.main.SVN_PROP_MERGEINFO, '-vR', wc_dir)
 
+def update_modify_file_external(sbox):
+  "update that modifies a file external"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Setup A/external as file external to A/mu
+  externals_prop = "^/A/mu external\n"
+  change_external(sbox.ospath('A'), externals_prop)
+  expected_output = svntest.wc.State(wc_dir, {
+      'A/external'      : Item(status='E '),
+    })
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.add({
+    'A'          : Item(props={'svn:externals':externals_prop}),
+    'A/external' : Item("This is the file 'mu'.\n"),
+    })
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
+  expected_status.add({
+    'A/external' : Item(status='  ', wc_rev='2', switched='X'),
+    })
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        expected_output,
+                                        expected_disk,
+                                        expected_status,
+                                        None, None, None, None, None,
+                                        True)
+
+  # Modify A/mu
+  svntest.main.file_append(sbox.ospath('A/mu'), 'appended mu text')
+  expected_output = svntest.wc.State(wc_dir, {
+    'A/mu' : Item(verb='Sending'),
+    })
+  expected_status.tweak('A/mu', wc_rev=3)
+  svntest.actions.run_and_verify_commit(wc_dir,
+                                        expected_output,
+                                        expected_status,
+                                        None,
+                                        wc_dir)
+
+  # Update to modify the file external, this asserts in update_editor.c
+  expected_output = svntest.wc.State(wc_dir, {
+      'A/external'      : Item(status='E '),
+    })
+  expected_disk.tweak('A/mu', 'A/external',
+                      contents=expected_disk.desc['A/mu'].contents
+                      + 'appended mu text')
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
+  expected_status.add({
+    'A/external' : Item(status='  ', wc_rev='3', switched='X'),
+    })
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        expected_output,
+                                        expected_disk,
+                                        expected_status,
+                                        None, None, None, None, None,
+                                        True)
+
 ########################################################################
 # Run the tests
 
@@ -1542,6 +1600,7 @@ test_list = [ None,
               relegate_external,
               wc_repos_file_externals,
               merge_target_with_externals,
+              XFail(update_modify_file_external),
              ]
 
 if __name__ == '__main__':



Mime
View raw message