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

login
register
mail settings
Submitter Sean Farley
Date Sept. 5, 2013, 8:07 p.m.
Message ID <cdcf8a393b8f3b22c3e4.1378411646@laptop.local>
Download mbox | patch
Permalink /patch/2370/
State Accepted
Commit 8dbb66f339f333fc8cdfc34b7749c55a57549407
Headers show

Comments

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

Patch

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