Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb/webutil.py @ 14957:16e5271b216f
hgweb: move remaining hasattr calls to safehasattr
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Mon, 25 Jul 2011 15:38:46 -0500 |
parents | 9f908ef5a595 |
children | 2695aaf4eb72 |
comparison
equal
deleted
inserted
replaced
14956:1b3f5f603aef | 14957:16e5271b216f |
---|---|
70 d = {'node': s.hex(), 'rev': s.rev()} | 70 d = {'node': s.hex(), 'rev': s.rev()} |
71 d['user'] = s.user() | 71 d['user'] = s.user() |
72 d['date'] = s.date() | 72 d['date'] = s.date() |
73 d['description'] = s.description() | 73 d['description'] = s.description() |
74 d['branch'] = s.branch() | 74 d['branch'] = s.branch() |
75 if hasattr(s, 'path'): | 75 if util.safehasattr(s, 'path'): |
76 d['file'] = s.path() | 76 d['file'] = s.path() |
77 yield d | 77 yield d |
78 | 78 |
79 def parents(ctx, hide=None): | 79 def parents(ctx, hide=None): |
80 return _siblings(ctx.parents(), hide) | 80 return _siblings(ctx.parents(), hide) |