You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2022/11/09 04:00:03 UTC

svn commit: r1905172 - in /subversion/branches/1.14.x: ./ STATUS subversion/tests/cmdline/log_tests.py

Author: svn-role
Date: Wed Nov  9 04:00:03 2022
New Revision: 1905172

URL: http://svn.apache.org/viewvc?rev=1905172&view=rev
Log:
Merge r1877310 from trunk:

 * r1877310
   Add a test for issue #4711 "invalid xml file produced by svn log --xml
   --verbose --use-merge-history --search".
   Justification:
     Increase test coverage.
   Votes:
     +0: danielsh (with appropriate Skip()/XFail() annotations if needed)
     +1: hartmannathan, jamessan

Modified:
    subversion/branches/1.14.x/   (props changed)
    subversion/branches/1.14.x/STATUS
    subversion/branches/1.14.x/subversion/tests/cmdline/log_tests.py

Propchange: subversion/branches/1.14.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1877310

Modified: subversion/branches/1.14.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.14.x/STATUS?rev=1905172&r1=1905171&r2=1905172&view=diff
==============================================================================
--- subversion/branches/1.14.x/STATUS (original)
+++ subversion/branches/1.14.x/STATUS Wed Nov  9 04:00:03 2022
@@ -47,15 +47,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1877310
-   Add a test for issue #4711 "invalid xml file produced by svn log --xml
-   --verbose --use-merge-history --search".
-   Justification:
-     Increase test coverage.
-   Votes:
-     +0: danielsh (with appropriate Skip()/XFail() annotations if needed)
-     +1: hartmannathan, jamessan
-
  * r1904167
    swig-py: Fix conditionals by SWIG version and by Python version for proxy
    code.
@@ -63,4 +54,3 @@ Approved changes:
      swig-py should be built correctly with upcoming SWIG 4.1.0 release.
    Votes:
      +1: futatuki, jun66j5, jamessan
-

Modified: subversion/branches/1.14.x/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.14.x/subversion/tests/cmdline/log_tests.py?rev=1905172&r1=1905171&r2=1905172&view=diff
==============================================================================
--- subversion/branches/1.14.x/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/branches/1.14.x/subversion/tests/cmdline/log_tests.py Wed Nov  9 04:00:03 2022
@@ -2779,6 +2779,42 @@ def log_on_deleted_deep(sbox):
                                      '',
                                      '-q', '-c', '1-2')
 
+@XFail()
+@Issue(4711)
+def log_with_merge_history_and_search(sbox):
+  "log --use-merge-history --search"
+  
+  sbox.build()
+
+  # r2: create branch
+  sbox.simple_repo_copy('A', 'A2') # r2
+
+  # r3: mod in trunk
+  sbox.simple_append('A/mu', 'line 2')
+  sbox.simple_commit(message='r3: mod')
+  sbox.simple_update()
+
+  # r4: merge
+  svntest.main.run_svn(None, 'merge', sbox.repo_url + '/A', sbox.ospath('A2'))
+  sbox.simple_commit(message='r4: merge')
+  sbox.simple_update()
+
+  # Helper function
+  def count(haystack, needle):
+    """Return the number of times the string NEEDLE occurs in the string
+    HAYSTACK."""
+    return len(haystack.split(needle)) - 1
+
+  # Check the output is valid
+  # ### Since the test is currently XFail, we only smoke test the output.
+  # ### When fixing this test to PASS, extend this validation.
+  _, output, _ = svntest.main.run_svn(None, 'log', '--xml', '-g',
+                                      '--search', "this will have no matches",
+                                      sbox.ospath('A2'))
+
+  output = '\n'.join(output)
+  if count(output, "<logentry") != count(output, "</logentry"):
+    raise svntest.Failure("Apparently invalid XML in " + repr(output))
 
 ########################################################################
 # Run the tests
@@ -2830,6 +2866,7 @@ test_list = [ None,
               merge_sensitive_log_xml_reverse_merges,
               log_revision_move_copy,
               log_on_deleted_deep,
+              log_with_merge_history_and_search,
              ]
 
 if __name__ == '__main__':