[PATCH 1 of 2] run-tests: indent _processoutput to aid readability for next patch

timeless timeless at mozdev.org
Thu Mar 17 17:17:34 EDT 2016


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1458248076 0
#      Thu Mar 17 20:54:36 2016 +0000
# Node ID 2d259ce76b6f0d4e11aac7f8e2a4db7785c3992d
# Parent  dfd5a6830ea7cd56909b6667c78ae122cc3a5aa1
run-tests: indent _processoutput to aid readability for next patch

The next commit will loop over the expected[pos] list, this change
makes that change easier to review.

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1111,21 +1111,21 @@
                 el = None
                 if expected.get(pos, None):
                     el = expected[pos].pop(0)
-
-                r = TTest.linematch(el, lout)
-                if isinstance(r, str):
-                    if r == '+glob':
-                        lout = el[:-1] + ' (glob)\n'
-                        r = '' # Warn only this line.
-                    elif r == '-glob':
-                        lout = ''.join(el.rsplit(' (glob)', 1))
-                        r = '' # Warn only this line.
-                    elif r == "retry":
-                        postout.append(b'  ' + el)
-                        continue
-                    else:
-                        log('\ninfo, unknown linematch result: %r\n' % r)
-                        r = False
+                if True:
+                    r = TTest.linematch(el, lout)
+                    if isinstance(r, str):
+                        if r == '+glob':
+                            lout = el[:-1] + ' (glob)\n'
+                            r = '' # Warn only this line.
+                        elif r == '-glob':
+                            lout = ''.join(el.rsplit(' (glob)', 1))
+                            r = '' # Warn only this line.
+                        elif r == "retry":
+                            postout.append(b'  ' + el)
+                            continue
+                        else:
+                            log('\ninfo, unknown linematch result: %r\n' % r)
+                            r = False
                 if r:
                     postout.append(b'  ' + el)
                 else:


More information about the Mercurial-devel mailing list