Patchwork [04,of,36] context: move rev from changectx

login
register
mail settings
Submitter Sean Farley
Date Aug. 7, 2013, 6:13 p.m.
Message ID <b02915c5f63cce0ce07a.1375899184@laptop.local>
Download mbox | patch
Permalink /patch/2021/
State Superseded
Commit d800bb40baf32719cd8c09b03daee8e7ef6c8e32
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 1375488546 18000
#      Fri Aug 02 19:09:06 2013 -0500
# Node ID b02915c5f63cce0ce07adb8612b335dbad66ed0f
# Parent  8fc7a11d2a2f02bd6491fa9c24656d0e44a0a92d
context: move rev from changectx

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -36,10 +36,13 @@ 
         return o
 
     def __str__(self):
         return short(self.node())
 
+    def rev(self):
+        return self._rev
+
 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."""
     def __init__(self, repo, changeid=''):
@@ -199,12 +202,10 @@ 
     def manifest(self):
         return self._manifest
     def manifestnode(self):
         return self._changeset[0]
 
-    def rev(self):
-        return self._rev
     def node(self):
         return self._node
     def hex(self):
         return hex(self._node)
     def user(self):