D4464: drawdag: correctly pass repo to super constructor

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Tue Sep 4 17:36:52 UTC 2018


martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This was caught by someone who was looking for the
  
    super(cls, self).__init__(self, ...)
  
  pattern in all code in our Google-internal repo.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4464

AFFECTED FILES
  tests/drawdag.py

CHANGE DETAILS

diff --git a/tests/drawdag.py b/tests/drawdag.py
--- a/tests/drawdag.py
+++ b/tests/drawdag.py
@@ -288,8 +288,7 @@
             'date': b'0 0',
             'extra': {b'branch': b'default'},
         }
-        super(simplecommitctx, self).__init__(self, name, **opts)
-        self._repo = repo
+        super(simplecommitctx, self).__init__(repo, name, **opts)
         self._added = added
         self._parents = parentctxs
         while len(self._parents) < 2:



To: martinvonz, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list