phases: make `allphases` a list on py3 also
authorMatt Harbison <matt_harbison@yahoo.com>
Thu, 21 Nov 2019 15:31:33 -0500
changeset 43730 d18cf63e1dbd
parent 43729 1d1232c0726f
child 43731 6c8ba31405d9
phases: make `allphases` a list on py3 also Pytype complained that `range` doesn't support slicing, so make this a list like it was on py2. Differential Revision: https://phab.mercurial-scm.org/D7468
mercurial/phases.py
--- a/mercurial/phases.py	Wed Nov 20 09:55:59 2019 -0500
+++ b/mercurial/phases.py	Thu Nov 21 15:31:33 2019 -0500
@@ -134,7 +134,7 @@
 public, draft, secret = range(3)
 internal = INTERNAL_FLAG | HIDEABLE_FLAG
 archived = HIDEABLE_FLAG
-allphases = range(internal + 1)
+allphases = list(range(internal + 1))
 trackedphases = allphases[1:]
 # record phase names
 cmdphasenames = [b'public', b'draft', b'secret']  # known to `hg phase` command