catapult: rename 'active' to 'activetrace'; this isn't storing a boolean state
authorKyle Lippincott <spectral@google.com>
Thu, 01 Nov 2018 16:44:37 -0700
changeset 40489 a9e00c48c5ef
parent 40488 d95358143ce6
child 40490 889424be7ad2
catapult: rename 'active' to 'activetrace'; this isn't storing a boolean state (This is an attempt to make it more obvious that the indentation is correct, to prevent a repeat of 97f52862b1bd) Differential Revision: https://phab.mercurial-scm.org/D5215
tests/run-tests.py
--- a/tests/run-tests.py	Thu Nov 01 16:44:32 2018 -0700
+++ b/tests/run-tests.py	Thu Nov 01 16:44:37 2018 -0700
@@ -1378,7 +1378,7 @@
                 script.append(b'%s %d 0\n' % (salt, line))
             else:
                 script.append(b'echo %s %d $?\n' % (salt, line))
-        active = []
+        activetrace = []
         session = str(uuid.uuid4())
         if PYTHON3:
             session = session.encode('ascii')
@@ -1387,10 +1387,10 @@
             if not hgcatapult or hgcatapult == os.devnull:
                 return
 
-            if active:
+            if activetrace:
                 script.append(
                     b'echo END %s %s >> "$HGCATAPULTSERVERPIPE"\n' % (
-                        session, active[0]))
+                        session, activetrace[0]))
             if cmd is None:
                 return
 
@@ -1402,7 +1402,7 @@
             script.append(
                 b'echo START %s %s >> "$HGCATAPULTSERVERPIPE"\n' % (
                     session, quoted))
-            active[0:] = [quoted]
+            activetrace[0:] = [quoted]
 
         script = []
 
@@ -1543,7 +1543,7 @@
             after.setdefault(pos, []).append('  !!! missing #endif\n')
         addsalt(n + 1, False)
         # Need to end any current per-command trace
-        if active:
+        if activetrace:
             toggletrace()
         return salt, script, after, expected