Sorted changelog entries in chronological order. fixes #55
authorEd Bartosh <eduard.bartosh@intel.com>
Mon, 11 Jun 2012 10:47:00 +0000 (13:47 +0300)
committerEd Bartosh <eduard.bartosh@intel.com>
Mon, 11 Jun 2012 15:25:31 +0000 (18:25 +0300)
Change-Id: I7ab1b7cc9564ad8ee09d94dc6d5bb6bcdd6ab87c

gitbuildsys/cmd_changelog.py

index 9f15535..b0b9401 100644 (file)
@@ -134,7 +134,9 @@ def do(opts, _args):
                 msger.error("Can't find last commit ID in the log, "\
                             "please specify it by '--since'")
 
-    commits = repo.get_commits(commitid_since, 'HEAD')
+    commits = [info.split()[1] for info in sorted(repo.get_commits(\
+                  commitid_since, 'HEAD', options=['--pretty=format:%at %H']),
+                  reverse=True)]
     if not commits:
         msger.error("Nothing found between %s and HEAD" % commitid_since)