Use = when comparing numbers
This commit is contained in:
parent
8c79536fa4
commit
2eb5714829
10 changed files with 23 additions and 23 deletions
|
|
@ -418,7 +418,7 @@ WHERE derivation_output_details.path = $1"
|
|||
(http-request build-url)))
|
||||
|
||||
(cond
|
||||
((eq? (response-code response) 200)
|
||||
((= (response-code response) 200)
|
||||
(json-string->scm
|
||||
(bytevector->string body "utf-8")))
|
||||
(else
|
||||
|
|
@ -439,7 +439,7 @@ WHERE derivation_output_details.path = $1"
|
|||
(read-to-eof port))))
|
||||
(handler
|
||||
(cond
|
||||
((eq? (response-code response) 200)
|
||||
((= (response-code response) 200)
|
||||
(json-string->scm
|
||||
(bytevector->string response-body
|
||||
"utf-8")))
|
||||
|
|
@ -475,7 +475,7 @@ WHERE derivation_output_details.path = $1"
|
|||
(read-to-eof port))))
|
||||
(handler
|
||||
(cond
|
||||
((eq? (response-code response) 200)
|
||||
((= (response-code response) 200)
|
||||
(json-string->scm
|
||||
(bytevector->string response-body
|
||||
"utf-8")))
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
(define group-by-last-element
|
||||
(lambda (vals)
|
||||
(let ((groups (last vals)))
|
||||
(cons (if (eq? (length groups) 2)
|
||||
(cons (if (= (length groups) 2)
|
||||
'common
|
||||
(first groups))
|
||||
(drop-right vals 1)))))
|
||||
|
|
|
|||
|
|
@ -677,7 +677,7 @@ SET CONSTRAINTS derivations_by_output_details_set_derivation_id_fkey DEFERRED")
|
|||
|
||||
(let loop ((total-deleted 0))
|
||||
(let ((batch-deleted-count (delete-batch conn)))
|
||||
(if (eq? 0 batch-deleted-count)
|
||||
(if (= 0 batch-deleted-count)
|
||||
(begin
|
||||
(hash-clear! ignored-derivation-ids)
|
||||
(let ((batch-deleted-count (delete-batch conn)))
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@
|
|||
(simple-format #t "running command: ~A\n"
|
||||
(string-join command))
|
||||
(let ((pid (spawn (%config 'sqitch) command)))
|
||||
(unless (= 0 (status:exit-val (cdr (waitpid pid))))
|
||||
(unless (= 0 (status:exit-val (cdr (waitpid pid)))) ;; TODO Don't use waitppid
|
||||
(simple-format
|
||||
(current-error-port)
|
||||
"error: sqitch command failed\n")
|
||||
|
|
@ -318,7 +318,7 @@
|
|||
(cond
|
||||
((eq? #f val) NULL)
|
||||
((string-null? val)
|
||||
(if (eq? 1 (%PQgetisnull
|
||||
(if (= 1 (%PQgetisnull
|
||||
(squee/unwrap-result-ptr result-ptr) row-i col-i))
|
||||
NULL
|
||||
val))
|
||||
|
|
|
|||
|
|
@ -334,9 +334,9 @@ WHERE job_id = $1")
|
|||
"\n\n"
|
||||
(let ((running-jobs (hash-count (const #t) processes)))
|
||||
(cond
|
||||
((eq? running-jobs 0)
|
||||
((= running-jobs 0)
|
||||
"status: 0 running jobs")
|
||||
((eq? running-jobs 1)
|
||||
((= running-jobs 1)
|
||||
"status: 1 running job")
|
||||
(else
|
||||
(simple-format #f "status: ~A running jobs"
|
||||
|
|
@ -363,7 +363,7 @@ WHERE job_id = $1")
|
|||
(match (hash-ref processes pid)
|
||||
((_ (id))
|
||||
(post-job id)
|
||||
(unless (eq? status 0)
|
||||
(unless (= status 0)
|
||||
(simple-format (current-error-port)
|
||||
"pid ~A (job: ~A) failed with status ~A\n"
|
||||
pid id status)
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@
|
|||
string<?)))
|
||||
(map (lambda (lang index)
|
||||
`(tr
|
||||
,@(if (eq? index 0)
|
||||
,@(if (= index 0)
|
||||
`((td (@ (rowspan ,(length languages)))
|
||||
,(case change
|
||||
((new) "New")
|
||||
|
|
|
|||
|
|
@ -1383,10 +1383,10 @@
|
|||
(build-server-count
|
||||
(length build-servers)))
|
||||
(cond
|
||||
((or (eq? hash-count 0)
|
||||
(eq? build-server-count 1))
|
||||
((or (= hash-count 0)
|
||||
(= build-server-count 1))
|
||||
"unknown")
|
||||
((eq? hash-count 1)
|
||||
((= hash-count 1)
|
||||
"matching")
|
||||
((> hash-count 1)
|
||||
"not-matching")))))))
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@
|
|||
git-repositories)))
|
||||
'())
|
||||
,@(if (> (vector-length licenses) 0)
|
||||
`((dt ,(if (eq? (vector-length licenses) 1)
|
||||
`((dt ,(if (= (vector-length licenses) 1)
|
||||
"License"
|
||||
"Licenses"))
|
||||
(dd (ul
|
||||
|
|
@ -2082,10 +2082,10 @@ figure {
|
|||
(build-server-count
|
||||
(length build-servers)))
|
||||
(cond
|
||||
((or (eq? hash-count 0)
|
||||
(eq? build-server-count 1))
|
||||
((or (= hash-count 0)
|
||||
(= build-server-count 1))
|
||||
"Unknown")
|
||||
((eq? hash-count 1)
|
||||
((= hash-count 1)
|
||||
'(span (@ (class "text-success"))
|
||||
"Matching"))
|
||||
((> hash-count 1)
|
||||
|
|
|
|||
|
|
@ -725,7 +725,7 @@
|
|||
","
|
||||
"\"" ,(or hash "") "\""
|
||||
")"
|
||||
,@(if (eq? count-down 0)
|
||||
,@(if (= count-down 0)
|
||||
'()
|
||||
'(",")))))
|
||||
derivation-outputs
|
||||
|
|
@ -763,7 +763,7 @@
|
|||
",")
|
||||
"]"
|
||||
")"
|
||||
,@(if (eq? count-down 0)
|
||||
,@(if (= count-down 0)
|
||||
'()
|
||||
'(",")))))
|
||||
derivation-inputs
|
||||
|
|
@ -789,7 +789,7 @@
|
|||
(a (@ (href ,source))
|
||||
,(display-store-item source))
|
||||
"\""
|
||||
,@(if (eq? count-down 0)
|
||||
,@(if (= count-down 0)
|
||||
'()
|
||||
'(","))))
|
||||
derivation-sources
|
||||
|
|
@ -850,7 +850,7 @@
|
|||
`(div "\""
|
||||
,(display-possible-store-item arg)
|
||||
"\""
|
||||
,@(if (eq? count-down 0)
|
||||
,@(if (= count-down 0)
|
||||
'()
|
||||
'(","))))
|
||||
args
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
(lambda (conn)
|
||||
(let ((count
|
||||
(count-git-repositories-with-x-git-repo-header-values conn)))
|
||||
(when (eq? count 0)
|
||||
(when (= count 0)
|
||||
(display
|
||||
"\nerror: no git_repositories exist with a value for x_git_repo_header
|
||||
error: to match emails to repositories, the git_repositories entry must have
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue