[PATCH 32 of 48 RFC] commitablectx: move extra from workingctx

Sean Farley sean.michael.farley at gmail.com
Thu Sep 5 15:07:26 CDT 2013


# HG changeset patch
# User Sean Farley <sean.michael.farley at gmail.com>
# Date 1376515408 18000
#      Wed Aug 14 16:23:28 2013 -0500
# Node ID cdcf8a393b8f3b22c3e4e5b9c9d3499ab26a7373
# Parent  2f615119bfe6364ed69c78e3136ab5ee9c2bc91b
commitablectx: move extra from workingctx

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -989,10 +989,12 @@
         return self._clean
     def branch(self):
         return encoding.tolocal(self._extra['branch'])
     def closesbranch(self):
         return 'close' in self._extra
+    def extra(self):
+        return self._extra
 
 class workingctx(commitablectx):
     """A workingctx object makes access to data related to
     the current working directory convenient.
     date - any valid date string or (unixtime, offset), or None.
@@ -1016,13 +1018,10 @@
         p = self._repo.dirstate.parents()
         if p[1] == nullid:
             p = p[:-1]
         return [changectx(self._repo, x) for x in p]
 
-    def extra(self):
-        return self._extra
-
     def tags(self):
         t = []
         for p in self.parents():
             t.extend(p.tags())
         return t


More information about the Mercurial-devel mailing list