diff --git a/mercurial/phases.py b/mercurial/phases.py
new file mode 100644
--- /dev/null
+++ b/mercurial/phases.py
@@ -0,0 +1,11 @@
+# Mercurial phases support code
+#
+# Copyright 2011 Pierre-Yves David <pierre-yves.david@ens-lyon.org>
+#                Logilab SA        <contact@logilab.fr>
+#                Augie Fackler     <durin42@gmail.com>
+#
+# This software may be used and distributed according to the terms of the
+# GNU General Public License version 2 or any later version.
+
+allphases = range(2)
+trackedphases = allphases[1:]