changeset 37173:d7f3fdab94c4

context: remove unwanted assignments in basectx.__new__() (API) The two subclasses in core apparently didn't trust __new__() to do the job anyway (they both reassigned all the properties after). Differential Revision: https://phab.mercurial-scm.org/D2966
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 29 Mar 2018 21:15:40 -0700
parents b837655c1509
children daef13da66fe
files mercurial/context.py
diffstat 1 files changed, 1 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Wed Jan 31 17:15:44 2018 +0100
+++ b/mercurial/context.py	Thu Mar 29 21:15:40 2018 -0700
@@ -66,13 +66,7 @@
         if isinstance(changeid, basectx):
             return changeid
 
-        o = super(basectx, cls).__new__(cls)
-
-        o._repo = repo
-        o._rev = nullrev
-        o._node = nullid
-
-        return o
+        return super(basectx, cls).__new__(cls)
 
     def __bytes__(self):
         return short(self.node())