Mercurial > hg
comparison hgext/children.py @ 24482:3eb9045396b0
children: don't pass filectx to displayer
displayer doesn't want a fctx but a ctx. It failed with -Tdefault template.
Traceback (most recent call last):
...
File "mercurial/templatekw.py", line 212, in showbookmarks
bookmarks = args['ctx'].bookmarks()
AttributeError: 'filectx' object has no attribute 'bookmarks'
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 26 Mar 2015 23:56:18 +0900 |
parents | 2d3fb8476d7a |
children | 80c5b2666a96 |
comparison
equal
deleted
inserted
replaced
24481:dded1eeeff64 | 24482:3eb9045396b0 |
---|---|
37 file was last changed (after the working directory revision or the | 37 file was last changed (after the working directory revision or the |
38 argument to --rev if given) is printed. | 38 argument to --rev if given) is printed. |
39 """ | 39 """ |
40 rev = opts.get('rev') | 40 rev = opts.get('rev') |
41 if file_: | 41 if file_: |
42 ctx = repo.filectx(file_, changeid=rev) | 42 fctx = repo.filectx(file_, changeid=rev) |
43 childctxs = [fcctx.changectx() for fcctx in fctx.children()] | |
43 else: | 44 else: |
44 ctx = repo[rev] | 45 ctx = repo[rev] |
46 childctxs = ctx.children() | |
45 | 47 |
46 displayer = cmdutil.show_changeset(ui, repo, opts) | 48 displayer = cmdutil.show_changeset(ui, repo, opts) |
47 for cctx in ctx.children(): | 49 for cctx in childctxs: |
48 displayer.show(cctx) | 50 displayer.show(cctx) |
49 displayer.close() | 51 displayer.close() |