guix-commits
[Top][All Lists]
Advanced

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

04/04: Revert "ui: Only display link in capable terminals."


From: guix-commits
Subject: 04/04: Revert "ui: Only display link in capable terminals."
Date: Thu, 27 Feb 2020 18:10:26 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit c2f9ea2b502a617bb69227d5f858eee9d4288a6a
Author: Ludovic Courtès <address@hidden>
AuthorDate: Fri Feb 28 00:03:34 2020 +0100

    Revert "ui: Only display link in capable terminals."
    
    This reverts commit d7545a6b538813e88195d084f75a3e87065c999e.
    
    The commit led to a test failure in 'tests/guix-package-net.sh'.  It
    also led to disagreements discussed here:
    
      https://lists.gnu.org/archive/html/guix-devel/2020-02/msg00353.html
    
    Reverting until these are addressed.
---
 guix/scripts/describe.scm | 15 ++++-----------
 guix/ui.scm               |  2 +-
 2 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/guix/scripts/describe.scm b/guix/scripts/describe.scm
index 5e00067..f13f221 100644
--- a/guix/scripts/describe.scm
+++ b/guix/scripts/describe.scm
@@ -201,11 +201,7 @@ way and displaying details about the channel's source 
code."
                    (format #t (G_ "    commit: ~a~%")
                            (if (supports-hyperlinks?)
                                (channel-commit-hyperlink channel commit)
-                               commit))
-                   (when (not (supports-hyperlinks?))
-                     (format #t (G_ "    URL: ~a~%")
-                             (channel-commit-hyperlink channel commit
-                                                       (lambda (url msg) 
url))))))
+                               commit))))
                 (_ #f)))
 
             ;; Show most recently installed packages last.
@@ -237,12 +233,9 @@ way and displaying details about the channel's source 
code."
 
 (define* (channel-commit-hyperlink channel
                                    #:optional
-                                   (commit (channel-commit channel))
-                                   (transformer hyperlink))
+                                   (commit (channel-commit channel)))
   "Return a hyperlink for COMMIT in CHANNEL, using COMMIT as the hyperlink's
-text.  The hyperlink links to a web view of COMMIT, when available.
-TRANSFORMER is a procedure of 2 arguments, a URI and text, and returns a
-string for display."
+text.  The hyperlink links to a web view of COMMIT, when available."
   (let* ((url  (channel-url channel))
          (uri  (string->uri url))
          (host (and uri (uri-host uri))))
@@ -251,7 +244,7 @@ string for display."
           (#f
            commit)
           ((_ template)
-           (transformer (template url commit) commit)))
+           (hyperlink (template url commit) commit)))
         commit)))
 
 
diff --git a/guix/ui.scm b/guix/ui.scm
index 22a6d6c..fbe2b70 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1638,7 +1638,7 @@ DURATION-RELATION with the current time."
     (let* ((file   (generation-file-name profile number))
            (link   (if (supports-hyperlinks?)
                        (cut file-hyperlink file <>)
-                       (cut format #f (G_ "~a~%file: ~a") <> file)))
+                       identity))
            (header (format #f (link (highlight (G_ "Generation ~a\t~a")))
                            number
                            (date->string



reply via email to

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