challenge: Add "--diff".
authorLudovic Courtès <ludo@gnu.org>
Sat, 7 Dec 2019 14:10:39 +0000 (15:10 +0100)
committerLudovic Courtès <ludo@gnu.org>
Thu, 12 Dec 2019 16:56:58 +0000 (17:56 +0100)
commit5208db3a526e3fcdb8473d9bab8afe498c5f3f76
tree7879ec7202bf6119509a270e973e456113261975
parent22f06a212879369bd1d7f3aa5b19f8f89a8c6693
challenge: Add "--diff".

* guix/scripts/challenge.scm (dump-port*): New variable.
(archive-contents, store-item-contents, narinfo-contents)
(differing-files, report-differing-files): New procedures.
(summarize-report): Add #:report-differences and call it.
(show-help, %options): Add "--diff".
(%default-options): Add 'difference-report' key.
(report-differing-files): Parameterize CURRENT-TERMINAL-COLUMNS and pass
 #:report-differences to 'summarize-report'.
* guix/tests/http.scm (%local-url): Add optional argument.
(call-with-http-server): Fix docstring typo.
* tests/challenge.scm (query-path-size, make-narinfo): New procedures.
("differing-files"): New test.
* doc/guix.texi (Invoking guix challenge): Document "--diff".
doc/guix.texi
guix/scripts/challenge.scm
guix/tests/http.scm
tests/challenge.scm