# HG changeset patch # User Martin von Zweigbergk # Date 2018-03-30 04:15:40 # Node ID d7f3fdab94c4994b650d83f67b0eb88531c06b89 # Parent b837655c1509d22a7d564e3bf90d22bcb3be752b 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 diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -66,13 +66,7 @@ class basectx(object): 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())