Discussion:
svn commit: r1079400 - /subversion/trunk/subversion/tests/cmdline/log_tests.py
(too old to reply)
Daniel Shahaf
2011-03-15 04:24:25 UTC
Permalink
Author: pburba
Date: Tue Mar 8 15:46:09 2011
New Revision: 1079400
URL: http://svn.apache.org/viewvc?rev=1079400&view=rev
Follow-up to rr1076726, fix a flawed log -g test helper.
* subversion/tests/cmdline/log_tests.py
(check_merge_results): Account for the fact that the EXPECTED_MERGES arg
might be None. Fix the check of expected merges so it doesn't spuriously
pass when EXPECTED_REVSERSE_MERGES is none.
EXPECTED_REVERSE_MERGES
Suggested by: danielsh
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=1079400&r1=1079399&r2=1079400&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/log_tests.py Tue Mar 8 15:46:09 2011
@@ -1148,9 +1148,9 @@ def check_merge_results(log_chain, expec
# Check to see if the number and values of the revisions is correct
- if (log['revision'] not in expected_merges
- and (expected_reverse_merges is not None
+ if not ((expected_merges and log['revision'] in expected_merges)
+ or (expected_reverse_merges
If EXPECTED_MERGES and EXPECTED_REVERSE_MERGES are both None,
then the if() would trigger --- and I don't think that's the
intention.
raise SVNUnexpectedLogs("Found unexpected revision %d" %
log['revision'], log_chain)
Paul Burba
2011-03-15 13:38:31 UTC
Permalink
Post by Daniel Shahaf
Author: pburba
Date: Tue Mar  8 15:46:09 2011
New Revision: 1079400
URL: http://svn.apache.org/viewvc?rev=1079400&view=rev
Follow-up to rr1076726, fix a flawed log -g test helper.
* subversion/tests/cmdline/log_tests.py
  (check_merge_results): Account for the fact that the EXPECTED_MERGES arg
   might be None.  Fix the check of expected merges so it doesn't spuriously
   pass when EXPECTED_REVSERSE_MERGES is none.
EXPECTED_REVERSE_MERGES
Suggested by: danielsh
    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=1079400&r1=1079399&r2=1079400&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/log_tests.py Tue Mar  8 15:46:09 2011
@@ -1148,9 +1148,9 @@ def check_merge_results(log_chain, expec
   # Check to see if the number and values of the revisions is correct
-    if (log['revision'] not in expected_merges
-        and (expected_reverse_merges is not None
+    if not ((expected_merges and log['revision'] in expected_merges)
+            or (expected_reverse_merges
If EXPECTED_MERGES and EXPECTED_REVERSE_MERGES are both None,
then the if() would trigger --- and I don't think that's the
intention.
Hi Daniel,

It is the intention. If EXPECTED_MERGES and EXPECTED_REVERSE_MERGES
are both None, then the caller believes that no merged revisions
(normal or reverse) are present. However, there *is* something in the
LOG_CHAIN, so there is an error. Admittedly, none of the present
callers pass EXPECTED_MERGES=None and EXPECTED_REVERSE_MERGES=None,
but we might have reason to do so in the future.

Paul
Post by Daniel Shahaf
       raise SVNUnexpectedLogs("Found unexpected revision %d" %
                               log['revision'], log_chain)
Loading...