egencache --update-changelogs: reverse the sort order for headers.
authorMichał Górny <mgorny@gentoo.org>
Tue, 5 Oct 2010 18:43:39 +0000 (20:43 +0200)
committerZac Medico <zmedico@gentoo.org>
Sun, 24 Oct 2010 18:30:10 +0000 (11:30 -0700)
bin/egencache

index 783cfc428ab750ff31d3cfe59c4f82d8b1c1affb..e0834a4ad2e30270ea5317b9383edce689ed1a04 100755 (executable)
@@ -623,7 +623,8 @@ class GenChangeLogs(object):
                        changed = [str(x) for x in sorted(changed)]
 
                        wroteheader = False
-                       for c in changed:
+                       # Reverse the sort order for headers.
+                       for c in reversed(changed):
                                if c.startswith('+') and c.endswith('.ebuild'):
                                        output.write('*%s (%s)\n' % (c[1:-7], date))
                                        wroteheader = True
@@ -654,7 +655,7 @@ class GenChangeLogs(object):
                        output.write('\n%s\n\n' % '\n'.join([self._wrapper.fill(x) for x in body]))
 
                output.close()
-       
+
        def run(self):
                repo_path = self._portdb.porttrees[0]
                os.chdir(repo_path)