Show More
@@ -1,31 +1,31 b'' | |||||
1 | from __future__ import absolute_import |
|
1 | from __future__ import absolute_import | |
2 |
|
2 | |||
3 | from mercurial.i18n import _ |
|
3 | from mercurial.i18n import _ | |
4 | from mercurial import ( |
|
4 | from mercurial import ( | |
5 | hg, |
|
5 | hg, | |
6 | registrar, |
|
6 | registrar, | |
7 | ) |
|
7 | ) | |
8 |
|
8 | |||
9 | cmdtable = {} |
|
9 | cmdtable = {} | |
10 | command = registrar.command(cmdtable) |
|
10 | command = registrar.command(cmdtable) | |
11 |
|
11 | |||
12 | @command('getflogheads', |
|
12 | @command(b'getflogheads', | |
13 | [], |
|
13 | [], | |
14 | 'path') |
|
14 | b'path') | |
15 | def getflogheads(ui, repo, path): |
|
15 | def getflogheads(ui, repo, path): | |
16 | """ |
|
16 | """ | |
17 | Extension printing a remotefilelog's heads |
|
17 | Extension printing a remotefilelog's heads | |
18 |
|
18 | |||
19 | Used for testing purpose |
|
19 | Used for testing purpose | |
20 | """ |
|
20 | """ | |
21 |
|
21 | |||
22 | dest = repo.ui.expandpath('default') |
|
22 | dest = repo.ui.expandpath(b'default') | |
23 | peer = hg.peer(repo, {}, dest) |
|
23 | peer = hg.peer(repo, {}, dest) | |
24 |
|
24 | |||
25 | flogheads = peer.x_rfl_getflogheads(path) |
|
25 | flogheads = peer.x_rfl_getflogheads(path) | |
26 |
|
26 | |||
27 | if flogheads: |
|
27 | if flogheads: | |
28 | for head in flogheads: |
|
28 | for head in flogheads: | |
29 | ui.write(head + '\n') |
|
29 | ui.write(head + b'\n') | |
30 | else: |
|
30 | else: | |
31 | ui.write(_('EMPTY\n')) |
|
31 | ui.write(_(b'EMPTY\n')) |
General Comments 0
You need to be logged in to leave comments.
Login now