Changeset 4058
- Timestamp:
- 07/24/08 07:16:22 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
ticketmodifiedfilesplugin/0.11/setup.py
r4057 r4058 4 4 name='TicketModifiedFiles', 5 5 description='Trac plugin that lists the files that have been modified while resolving a ticket.', 6 version='0. 8.1',6 version='0.9', 7 7 license='BSD-ish (see the COPYING.txt file)', 8 8 author='Emilien Klein', ticketmodifiedfilesplugin/0.11/ticketmodifiedfiles/templates/ticketmodifiedfiles.html
r4057 r4058 95 95 <h3 class="backtonormalflow"><a id="changesetslink" href="#" onclick="javascript:togglevisibility('listofchangesets'); return false;">Display the list of changesets relative to this ticket.</a></h3> 96 96 <dl id="listofchangesets"> 97 <py:for each="rev, author in revisions">97 <py:for each="rev, author, date in revisions"> 98 98 <dt class="changeset"> 99 99 <a href="${href.changeset(rev)}"> … … 102 102 by 103 103 <span class="author">${author}</span> 104 <span class="time">(${date})</span> 104 105 </a> 105 106 </dt> ticketmodifiedfilesplugin/0.11/ticketmodifiedfiles/ticketmodifiedfiles.py
r4036 r4058 4 4 5 5 import re 6 from time import strftime, strptime 6 7 7 8 import genshi.filters … … 112 113 cursor = db.cursor() 113 114 #Retrieve all the revisions which's messages contain "#<TICKETID>" 114 cursor.execute("SELECT rev, author, message FROM revision WHERE message LIKE '%#" + str(id) + "%'")115 for rev, author, message, in cursor:115 cursor.execute("SELECT rev, datetime(time, 'unixepoch', 'localtime') as date, author, message FROM revision WHERE message LIKE '%#" + str(id) + "%'") 116 for rev, date, author, message, in cursor: 116 117 #Filter out non-related revisions. 117 118 #for instance, you are lookink for #19, so you don't want #190, #191, #192, etc. to interfere … … 127 128 128 129 if validrevision: 130 date = strftime("%d/%m/%Y %H:%M", strptime(date, "%Y-%m-%d %H:%M:%S")) 129 131 cursor2 = db.cursor() 130 132 cursor2.execute("SELECT path FROM node_change WHERE rev=" + rev) 131 revisions.append((rev, author ))133 revisions.append((rev, author, date)) 132 134 for path, in cursor2: 133 135 files.append(path)
