mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-31 06:46:50 +01:00
etc: teams: Add 'show' subcommand and sort teams.
* etc/teams.scm.in: Add 'show' subcommand. Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This commit is contained in:
parent
ee4a429d49
commit
60dc07a461
1 changed files with 11 additions and 4 deletions
|
@ -6,6 +6,7 @@
|
||||||
;;; Copyright © 2022, 2023 Ricardo Wurmus <rekado@elephly.net>
|
;;; Copyright © 2022, 2023 Ricardo Wurmus <rekado@elephly.net>
|
||||||
;;; Copyright © 2022 Mathieu Othacehe <othacehe@gnu.org>
|
;;; Copyright © 2022 Mathieu Othacehe <othacehe@gnu.org>
|
||||||
;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
|
;;; Copyright © 2022 Simon Tournier <zimon.toutoune@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -702,11 +703,13 @@ (define (sort-teams teams)
|
||||||
(string<? (symbol->string (team-id team1))
|
(string<? (symbol->string (team-id team1))
|
||||||
(symbol->string (team-id team2))))))
|
(symbol->string (team-id team2))))))
|
||||||
|
|
||||||
(define* (list-teams)
|
(define* (list-teams #:optional team-names)
|
||||||
"Print all teams, their scope and their members."
|
"Print all teams, their scope and their members."
|
||||||
(for-each print-team
|
(for-each print-team
|
||||||
(sort-teams (hash-map->list
|
(sort-teams
|
||||||
(lambda (_ value) value) %teams))))
|
(if team-names
|
||||||
|
(map find-team team-names)
|
||||||
|
(hash-map->list (lambda (_ value) value) %teams)))))
|
||||||
|
|
||||||
|
|
||||||
(define (diff-revisions rev-start rev-end)
|
(define (diff-revisions rev-start rev-end)
|
||||||
|
@ -786,6 +789,8 @@ (define (main . args)
|
||||||
(lambda (team-name)
|
(lambda (team-name)
|
||||||
(list-members (find-team team-name)))
|
(list-members (find-team team-name)))
|
||||||
team-names))
|
team-names))
|
||||||
|
(("show" . team-names)
|
||||||
|
(list-teams team-names))
|
||||||
(anything
|
(anything
|
||||||
(format (current-error-port)
|
(format (current-error-port)
|
||||||
"Usage: etc/teams.scm <command> [<args>]
|
"Usage: etc/teams.scm <command> [<args>]
|
||||||
|
@ -804,6 +809,8 @@ (define (main . args)
|
||||||
list-members <team-name>
|
list-members <team-name>
|
||||||
list members belonging to <team-name>
|
list members belonging to <team-name>
|
||||||
get-maintainer <patch>
|
get-maintainer <patch>
|
||||||
compatibility mode with Linux get_maintainer.pl~%"))))
|
compatibility mode with Linux get_maintainer.pl
|
||||||
|
show <team-name>
|
||||||
|
display <team-name> properties~%"))))
|
||||||
|
|
||||||
(apply main (cdr (command-line)))
|
(apply main (cdr (command-line)))
|
||||||
|
|
Loading…
Reference in a new issue