Patchwork [1,of,3] test-trip: fix call to super class in crashtriprepo

login
register
mail settings
Submitter Boris Feld
Date July 16, 2017, 9:21 a.m.
Message ID <ed5dfde9455a023b9b26.1500196901@FB>
Download mbox | patch
Permalink /patch/22433/
State Accepted
Headers show

Comments

Boris Feld - July 16, 2017, 9:21 a.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# 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.

Patch

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)