35
35
# BranchView object
36
36
self._branch = branch
37
37
self.log = branch.log
40
@util.strip_whitespace
39
41
@turbogears.expose(html='loggerhead.templates.revision')
40
42
def default(self, *args, **kw):
42
44
h = self._branch.get_history()
45
48
revid = h.fix_revid(args[0])
49
52
file_id = kw.get('file_id', None)
50
53
start_revid = h.fix_revid(kw.get('start_revid', None))
51
54
query = kw.get('q', None)
55
remember = kw.get('remember', None)
56
compare_revid = kw.get('compare_revid', None)
54
59
revid, start_revid, revid_list = h.get_view(revid, start_revid, file_id, query)
56
self.log.error('Exception fetching changes: %s' % (x,))
57
util.log_exception(self.log)
58
raise HTTPRedirect(self._branch.url('/changes'))
61
self.log.exception('Exception fetching changes')
62
raise InternalError('Could not fetch changes')
60
64
navigation = util.Container(revid_list=revid_list, revid=revid, start_revid=start_revid, file_id=file_id,
61
65
pagesize=1, scan_url='/revision', branch=self._branch, feed=True)
62
66
if query is not None:
63
67
navigation.query = query
64
util.fill_in_navigation(h, navigation)
68
util.fill_in_navigation(navigation)
66
change = h.get_changes([ revid ], get_diffs=True)[0]
70
if compare_revid is not None:
71
change = h.get_diff(compare_revid, revid)
73
change = h.get_changes([ revid ], get_diffs=True)[0]
67
74
# add parent & merge-point branch-nick info, in case it's useful
68
75
h.get_branch_nicks([ change ])