Patchwork [18,of,36] context: move phasestr from changectx

login
register
mail settings
Submitter Sean Farley
Date Aug. 7, 2013, 6:13 p.m.
Message ID <424a5db71bb743a4d43b.1375899198@laptop.local>
Download mbox | patch
Permalink /patch/2035/
State Superseded
Commit 006473767458ea124d82354631fb95e16bddd993
Delegated to: Augie Fackler
Headers show

Comments

Sean Farley - Aug. 7, 2013, 6:13 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1375744744 18000
#      Mon Aug 05 18:19:04 2013 -0500
# Node ID 424a5db71bb743a4d43b3a0926167df985b03c6d
# Parent  df3021f946dfdaf67f8e630a27167b4bbbbfcd7f
context: move phasestr from changectx

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -73,10 +73,12 @@ 
         return self._node
     def hex(self):
         return hex(self.node())
     def manifest(self):
         return self._manifest
+    def phasestr(self):
+        return phases.phasenames[self.phase()]
 
 class changectx(context):
     """A changecontext object makes access to data related to a particular
     changeset convenient. It represents a read-only context already presnt in
     the repo."""
@@ -226,12 +228,10 @@ 
         return self._repo.nodetags(self._node)
     def bookmarks(self):
         return self._repo.nodebookmarks(self._node)
     def phase(self):
         return self._repo._phasecache.phase(self._repo, self._rev)
-    def phasestr(self):
-        return phases.phasenames[self.phase()]
     def mutable(self):
         return self.phase() > phases.public
     def hidden(self):
         return self._rev in repoview.filterrevs(self._repo, 'visible')