Patchwork [19,of,36] context: move mutable from changectx

login
register
mail settings
Submitter Sean Farley
Date Aug. 7, 2013, 6:13 p.m.
Message ID <17abbc076a57267fe7fe.1375899199@laptop.local>
Download mbox | patch
Permalink /patch/2036/
State Superseded
Commit 97c10eb562aaab72eb2b3aa3f60af2c5033ab247
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 1375744759 18000
#      Mon Aug 05 18:19:19 2013 -0500
# Node ID 17abbc076a57267fe7fed57001c2fd4dcbcaf46a
# Parent  424a5db71bb743a4d43b3a0926167df985b03c6d
context: move mutable from changectx

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -75,10 +75,12 @@ 
         return hex(self.node())
     def manifest(self):
         return self._manifest
     def phasestr(self):
         return phases.phasenames[self.phase()]
+    def mutable(self):
+        return self.phase() > phases.public
 
 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."""
@@ -228,12 +230,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 mutable(self):
-        return self.phase() > phases.public
     def hidden(self):
         return self._rev in repoview.filterrevs(self._repo, 'visible')
 
     def parents(self):
         """return contexts for each parent changeset"""