Patchwork [05,of,35,V2] context: move rev from changectx

login
register
mail settings
Submitter Sean Farley
Date Aug. 7, 2013, 11:51 p.m.
Message ID <bb97c9fd71656aa8eac2.1375919479@laptop.local>
Download mbox | patch
Permalink /patch/2058/
State Accepted
Headers show

Comments

Sean Farley - Aug. 7, 2013, 11:51 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 bb97c9fd71656aa8eac27fba7bd7651c4b61cc5b
# Parent  7de79f2d442e3e404a8b363ef7ecdf2049078b56
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=''):
@@ -205,12 +208,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):