Author: rhuijben
Date: Fri Feb 20 14:26:54 2015
New Revision: 1661131

URL: http://svn.apache.org/r1661131
Log:
Add a regression test for some interesting cases around targets not existing
in specific revisions. Currently accepting this behavior as OK, because this
is how it worked for many revisions.

Found by: julianf

* subversion/tests/cmdline/log_tests.py
  (log_revision_move_copy): New function.
  (test_list): Add log_revision_move_copy.

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

Modified: subversion/trunk/subversion/tests/cmdline/log_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/log_tests.py?rev=1661131&r1=1661130&r2=1661131&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/log_tests.py Fri Feb 20 14:26:54 
2015
@@ -2618,6 +2618,53 @@ def merge_sensitive_log_xml_reverse_merg
   svntest.actions.run_and_verify_log_xml(expected_log_attrs=log_attrs,
                                          args=['-g', '-r8', D_COPY_path])
 
+def log_revision_move_copy(sbox):
+  "log revision handling over move/copy"
+
+  sbox.build()
+
+  sbox.simple_move('iota', 'iotb')
+  sbox.simple_append('iotb', 'new line\n')
+
+  sbox.simple_copy('A/mu', 'mutb')
+  sbox.simple_append('iotb', 'mutb\n')
+
+  #r2
+  svntest.actions.run_and_verify_svn(None, [],
+                                     'rm', sbox.repo_url + '/A/D', '-mm')
+
+  sbox.simple_commit() #r3
+
+  # This introduces a copy and a move in r3, but check how the history
+  # of these nodes behaves in r2.
+
+  # This one might change behavior once we improve move handling
+  expected_output = []
+  expected_err = '.*E195012: Unable to find repository location.*'
+  svntest.actions.run_and_verify_svn(expected_output, expected_err,
+                                     'log', '-v', sbox.ospath('iotb'),
+                                     '-r2')
+
+  # While this one
+  expected_output = []
+  expected_err = '.*E195012: Unable to find repository location.*'
+  svntest.actions.run_and_verify_svn(expected_output, expected_err,
+                                     'log', '-v', sbox.ospath('mutb'),
+                                     '-r2')
+
+  # And just for fun, do the same thing for blame
+  expected_output = None
+  expected_err = '.*E195012: Unable to find repository location.*'
+  svntest.actions.run_and_verify_svn(expected_output, expected_err,
+                                     'blame', sbox.ospath('iotb'),
+                                     '-r2')
+
+  expected_output = None
+  expected_err = '.*E195012: Unable to find repository location.*'
+  svntest.actions.run_and_verify_svn(expected_output, expected_err,
+                                     'log', '-v', sbox.ospath('mutb'),
+                                     '-r2')
+
 
 ########################################################################
 # Run the tests
@@ -2667,6 +2714,7 @@ test_list = [ None,
               log_multiple_revs_spanning_rename,
               mergeinfo_log,
               merge_sensitive_log_xml_reverse_merges,
+              log_revision_move_copy,
              ]
 
 if __name__ == '__main__':


Reply via email to