guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: etc: teams: List teams sorted by id.


From: guix-commits
Subject: 02/02: etc: teams: List teams sorted by id.
Date: Wed, 9 Nov 2022 11:24:13 -0500 (EST)

mothacehe pushed a commit to branch master
in repository guix.

commit 18fb7c0f3078216bf4fc865d86b3be76ddc68414
Author: zimoun <zimon.toutoune@gmail.com>
AuthorDate: Thu Oct 20 15:28:13 2022 +0200

    etc: teams: List teams sorted by id.
    
    * etc/teams.scm.in (list-teams): Sort teams by id.
    
    Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
 etc/teams.scm.in | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/etc/teams.scm.in b/etc/teams.scm.in
index f3f33aae08..f74acadc01 100644
--- a/etc/teams.scm.in
+++ b/etc/teams.scm.in
@@ -538,8 +538,8 @@ TEAMS when a patch is received by Debbugs."
   "Print all teams, their scope and their members."
   (define port* (current-output-port))
   (define width* (%text-width))
-  (hash-for-each
-   (lambda (key team)
+  (for-each
+   (lambda (team)
      (format port*
              "\
 id: ~a
@@ -560,7 +560,11 @@ description: ~a
                (scope (format #f "scope: ~{~s ~}~%" scope))))
      (list-members team port* "+ ")
      (newline))
-   %teams))
+   (sort
+    (hash-map->list (lambda (key value) value) %teams)
+    (lambda (team1 team2)
+      (string<? (symbol->string (team-id team1))
+                (symbol->string (team-id team2)))))))
 
 
 (define (diff-revisions rev-start rev-end)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]