本文整理汇总了Python中trac.ticket.Ticket.values['changesets']方法的典型用法代码示例。如果您正苦于以下问题:Python Ticket.values['changesets']方法的具体用法?Python Ticket.values['changesets']怎么用?Python Ticket.values['changesets']使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类trac.ticket.Ticket
的用法示例。
在下文中一共展示了Ticket.values['changesets']方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: process_request
# 需要导入模块: from trac.ticket import Ticket [as 别名]
# 或者: from trac.ticket.Ticket import values['changesets'] [as 别名]
def process_request(self, req, db=None):
req.perm.assert_permission('CHANGESET_VIEW')
if not db:
db = self.env.get_db_cnx()
# Fetch the standard ticket fields
cursor = db.cursor()
ticket_id = req.args.get('ticket_id')
req.hdf['ticket_id'] = ticket_id
repos = self.env.get_repository(req.authname)
authzperm = SubversionAuthorizer(self.env, req.authname)
diff_options = get_diff_options(req)
if req.args.has_key('update'):
req.redirect(self.env.href.setchangeset(ticket_id))
ticket = Ticket(self.env, ticket_id)
ticket.setchangesets = self.get_setchangesets(ticket_id,db)
ticket.values['setchangesets'] = ticket.setchangesets
ticket.values['changesets'] = ""
for changeset in ticket.setchangesets:
ticket.values['changesets'] += str(changeset)
setchangesets = ticket.setchangesets
req.hdf['ticket'] = ticket
req.hdf['dbWarning'] = False
# get the list of changesets for the ticket_id
# then loop through and get the actual changesets like the following line
chgset = []
self.log.debug('PublishRevert: %s', ticket['ticketaction'])
for rev in setchangesets:
authzperm.assert_permission_for_changeset(rev)
changeset = repos.get_changeset(rev)
chgset.append(changeset)
format = req.args.get('format')
self._render_html(req, ticket, repos, chgset, diff_options)
return 'setchangeset.cs', None