D5215: catapult: rename 'active' to 'activetrace'; this isn't storing a boolean state

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Mon Nov 5 11:07:32 EST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa9e00c48c5ef: catapult: rename 'active' to 'activetrace'; this isn't storing a boolean state (authored by spectral, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5215?vs=12373&id=12394

REVISION DETAIL
  https://phab.mercurial-scm.org/D5215

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1378,19 +1378,19 @@
                 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')
         hgcatapult = os.getenv('HGCATAPULTSERVERPIPE')
         def toggletrace(cmd=None):
             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
 



To: spectral, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list