Show More
@@ -125,20 +125,28 b' class filerevnav(revnav):' | |||
|
125 | 125 | def hex(self, rev): |
|
126 | 126 | return hex(self._changelog.node(self._revlog.linkrev(rev))) |
|
127 | 127 | |
|
128 | class _siblings(object): | |
|
129 | def __init__(self, siblings=[], hiderev=None): | |
|
130 | self.siblings = [s for s in siblings if s.node() != nullid] | |
|
131 | if len(self.siblings) == 1 and self.siblings[0].rev() == hiderev: | |
|
132 | self.siblings = [] | |
|
128 | 133 | |
|
129 | def _siblings(siblings=[], hiderev=None): | |
|
130 | siblings = [s for s in siblings if s.node() != nullid] | |
|
131 | if len(siblings) == 1 and siblings[0].rev() == hiderev: | |
|
132 | return | |
|
133 | for s in siblings: | |
|
134 | d = {'node': s.hex(), 'rev': s.rev()} | |
|
135 | d['user'] = s.user() | |
|
136 | d['date'] = s.date() | |
|
137 | d['description'] = s.description() | |
|
138 | d['branch'] = s.branch() | |
|
139 | if util.safehasattr(s, 'path'): | |
|
140 | d['file'] = s.path() | |
|
141 | yield d | |
|
134 | def __iter__(self): | |
|
135 | for s in self.siblings: | |
|
136 | d = { | |
|
137 | 'node': s.hex(), | |
|
138 | 'rev': s.rev(), | |
|
139 | 'user': s.user(), | |
|
140 | 'date': s.date(), | |
|
141 | 'description': s.description(), | |
|
142 | 'branch': s.branch(), | |
|
143 | } | |
|
144 | if util.safehasattr(s, 'path'): | |
|
145 | d['file'] = s.path() | |
|
146 | yield d | |
|
147 | ||
|
148 | def __len__(self): | |
|
149 | return len(self.siblings) | |
|
142 | 150 | |
|
143 | 151 | def parents(ctx, hide=None): |
|
144 | 152 | if isinstance(ctx, context.basefilectx): |
@@ -355,7 +363,7 b' def changesetentry(web, req, tmpl, ctx):' | |||
|
355 | 363 | rev=ctx.rev(), |
|
356 | 364 | node=ctx.hex(), |
|
357 | 365 | symrev=symrevorshortnode(req, ctx), |
|
358 |
parent= |
|
|
366 | parent=parents(ctx), | |
|
359 | 367 | child=children(ctx), |
|
360 | 368 | basenode=basectx.hex(), |
|
361 | 369 | changesettag=showtags, |
General Comments 0
You need to be logged in to leave comments.
Login now