Ticket #6: repodiff-clogdelta.patch
| File repodiff-clogdelta.patch, 1.5 kB (added by mschwendt, 3 years ago) |
|---|
-
repodiff
old new 7 7 # This program is distributed in the hope that it will be useful, 8 8 # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 # GNU LibraryGeneral Public License for more details.10 # GNU General Public License for more details. 11 11 # 12 12 # You should have received a copy of the GNU General Public License 13 13 # along with this program; if not, write to the Free Software … … 17 17 import yum 18 18 import rpmUtils 19 19 import sys 20 import time 20 import time, datetime 21 21 import os 22 22 import locale 23 23 from yum.misc import to_unicode … … 199 199 # for any newer clog in pkg 200 200 # print it 201 201 oldlogs = oldpkg.changelog 202 oldlogs.sort()203 oldlogs.reverse()204 202 if len(oldlogs): 205 203 oldtime = oldlogs[0][0] 206 clogdelta = []207 204 for (t, author, content) in pkg.changelog: 208 if t > oldtime:209 msg += "* %s %s\n%s\n\n" % (time.ctime(int(t)),205 if t > oldtime: 206 msg += "* %s %s\n%s\n\n" % (datetime.date.fromtimestamp(int(t)).strftime("%a %b %d %Y"), 210 207 to_unicode(author), to_unicode(content)) 211 208 if opts.size: 212 209 sizechange = int(pkg.size) - int(oldpkg.size)

