From 8f5b1f622cfdf7948a1e2dc269a6b7d7f8d82c1c Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Wed, 12 May 2010 11:14:16 -0400 Subject: [PATCH] Hide stderr by combining it with the captured output => no stderr messages. (Also, a slightly nicer string for the case of using the file timestamp.) --- collects/repo-time-stamp/stamp.rkt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/collects/repo-time-stamp/stamp.rkt b/collects/repo-time-stamp/stamp.rkt index d39cb78600..f764632f8e 100644 --- a/collects/repo-time-stamp/stamp.rkt +++ b/collects/repo-time-stamp/stamp.rkt @@ -11,7 +11,7 @@ (define-runtime-path this "stamp.rkt") (define stamp - (let ([rx:secs+id #rx"^([0-9]+)\\|([0-9a-f]+)\\|(.*?)[ \r\n]*$"]) + (let ([rx:secs+id #rx"^([0-9]+)\\|([0-9a-f]+|-)\\|(.*?)[ \r\n]*$"]) (for*/or ([x (list ;; info from an archive (incl. nightly builds) (lambda () archive-id) @@ -21,13 +21,14 @@ (find-executable-path "git.exe"))]) (and exe (let ([out (open-output-string)]) - (parameterize ([current-output-port out]) + (parameterize ([current-output-port out] + [current-error-port out]) (system* exe "log" "-1" "--pretty=format:%ct|%h|g") (get-output-string out)))))) ;; fallback: get the date of this file, no id (lambda () - (format "~a|0|f" + (format "~a|-|f" (file-or-directory-modify-seconds this))))]) (let* ([x (x)] [m (and (string? x) (regexp-match rx:secs+id x))]