equal
deleted
inserted
replaced
56 except error.RepoError: |
56 except error.RepoError: |
57 pass |
57 pass |
58 |
58 |
59 return nav |
59 return nav |
60 |
60 |
61 def siblings(siblings=[], hiderev=None, **args): |
61 def _siblings(siblings=[], hiderev=None): |
62 siblings = [s for s in siblings if s.node() != nullid] |
62 siblings = [s for s in siblings if s.node() != nullid] |
63 if len(siblings) == 1 and siblings[0].rev() == hiderev: |
63 if len(siblings) == 1 and siblings[0].rev() == hiderev: |
64 return |
64 return |
65 for s in siblings: |
65 for s in siblings: |
66 d = {'node': hex(s.node()), 'rev': s.rev()} |
66 d = {'node': hex(s.node()), 'rev': s.rev()} |
67 d['user'] = s.user() |
67 d['user'] = s.user() |
68 d['date'] = s.date() |
68 d['date'] = s.date() |
69 d['description'] = s.description() |
69 d['description'] = s.description() |
70 if hasattr(s, 'path'): |
70 if hasattr(s, 'path'): |
71 d['file'] = s.path() |
71 d['file'] = s.path() |
72 d.update(args) |
|
73 yield d |
72 yield d |
|
73 |
|
74 def parents(ctx, hide=None): |
|
75 return _siblings(ctx.parents(), hide) |
|
76 |
|
77 def children(ctx, hide=None): |
|
78 return _siblings(ctx.children(), hide) |
74 |
79 |
75 def renamelink(fctx): |
80 def renamelink(fctx): |
76 r = fctx.renamed() |
81 r = fctx.renamed() |
77 if r: |
82 if r: |
78 return [dict(file=r[0], node=hex(r[1]))] |
83 return [dict(file=r[0], node=hex(r[1]))] |