Show More
@@ -5,18 +5,18 b' from __future__ import absolute_import' | |||||
5 | def reposetup(ui, repo): |
|
5 | def reposetup(ui, repo): | |
6 |
|
6 | |||
7 | def reportphasemove(tr): |
|
7 | def reportphasemove(tr): | |
8 |
for rev, move in sorted(tr.changes['phases']. |
|
8 | for rev, move in sorted(tr.changes[b'phases'].items()): | |
9 | if move[0] is None: |
|
9 | if move[0] is None: | |
10 | ui.write(('test-debug-phase: new rev %d: x -> %d\n' |
|
10 | ui.write((b'test-debug-phase: new rev %d: x -> %d\n' | |
11 | % (rev, move[1]))) |
|
11 | % (rev, move[1]))) | |
12 | else: |
|
12 | else: | |
13 |
ui.write(('test-debug-phase: move rev %d: % |
|
13 | ui.write((b'test-debug-phase: move rev %d: %d -> %d\n' | |
14 | % (rev, move[0], move[1]))) |
|
14 | % (rev, move[0], move[1]))) | |
15 |
|
15 | |||
16 | class reportphaserepo(repo.__class__): |
|
16 | class reportphaserepo(repo.__class__): | |
17 | def transaction(self, *args, **kwargs): |
|
17 | def transaction(self, *args, **kwargs): | |
18 | tr = super(reportphaserepo, self).transaction(*args, **kwargs) |
|
18 | tr = super(reportphaserepo, self).transaction(*args, **kwargs) | |
19 | tr.addpostclose('report-phase', reportphasemove) |
|
19 | tr.addpostclose(b'report-phase', reportphasemove) | |
20 | return tr |
|
20 | return tr | |
21 |
|
21 | |||
22 | repo.__class__ = reportphaserepo |
|
22 | repo.__class__ = reportphaserepo |
General Comments 0
You need to be logged in to leave comments.
Login now