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