##// END OF EJS Templates
test: use proper subclassing in `test-issue2137.t`....
Pierre-Yves David -
r17802:a421459b default
parent child Browse files
Show More
@@ -12,15 +12,15 b' 1 and 2 are preconditions for the bug; 3'
12 12 > from mercurial import extensions, node, revlog
13 13 >
14 14 > def reposetup(ui, repo):
15 > def wrapcommit(orig, *args, **kwargs):
16 > result = orig(*args, **kwargs)
15 > class wraprepo(repo.__class__):
16 > def commit(self, *args, **kwargs):
17 > result = super(wraprepo, self).commit(*args, **kwargs)
17 18 > tip1 = node.short(repo.changelog.tip())
18 19 > tip2 = node.short(repo.lookup(tip1))
19 20 > assert tip1 == tip2
20 21 > ui.write('new tip: %s\n' % tip1)
21 22 > return result
22 >
23 > extensions.wrapfunction(repo, 'commit', wrapcommit)
23 > repo.__class__ = wraprepo
24 24 >
25 25 > def extsetup(ui):
26 26 > revlog._maxinline = 8 # split out 00changelog.d early
General Comments 0
You need to be logged in to leave comments. Login now