From patchwork Sun Jul 16 09:21:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1,of,3] test-trip: fix call to super class in crashtriprepo From: Boris Feld X-Patchwork-Id: 22433 Message-Id: To: mercurial-devel@mercurial-scm.org Cc: boris.feld@octobus.net Date: Sun, 16 Jul 2017 11:21:41 +0200 # HG changeset patch # User Boris Feld # Date 1500165494 -7200 # Sun Jul 16 02:38:14 2017 +0200 # Node ID ed5dfde9455a023b9b26152ee55ade0085b5516a # Parent 27d23fe32887279db649eccae244f261452be7ac # EXP-Topic tr.report test-trip: fix call to super class in crashtriprepo The 'self' argument is already taken care of by the 'super(...)' call. Instead we were passing the repository instance as the 'desc' value. This got discovered by breaking the next changesets. diff -r 27d23fe32887 -r ed5dfde9455a tests/test-strip.t --- a/tests/test-strip.t Fri Jul 14 20:26:21 2017 -0700 +++ b/tests/test-strip.t Sun Jul 16 02:38:14 2017 +0200 @@ -928,7 +928,7 @@ > def reposetup(ui, repo): > class crashstriprepo(repo.__class__): > def transaction(self, desc, *args, **kwargs): - > tr = super(crashstriprepo, self).transaction(self, desc, *args, **kwargs) + > tr = super(crashstriprepo, self).transaction(desc, *args, **kwargs) > if desc == 'strip': > def crash(tra): raise error.Abort('boom') > tr.addpostclose('crash', crash)