From 46eac03e720e9b21d225e2ec1c41299c09202d18 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 14 May 2021 23:21:45 +0200 Subject: swh: 'lookup-origin-revision' ignores partial visits. * guix/swh.scm (lookup-origin-revision): Filter out visits with a status different from 'full. --- guix/swh.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/guix/swh.scm b/guix/swh.scm index 3005323fd1..06d2957252 100644 --- a/guix/swh.scm +++ b/guix/swh.scm @@ -455,7 +455,11 @@ (define (lookup-origin-revision url tag) (match (lookup-origin url) (#f #f) (origin - (match (filter visit-snapshot-url (origin-visits origin)) + (match (filter (lambda (visit) + ;; Return #f if (visit-snapshot VISIT) would return #f. + (and (visit-snapshot-url visit) + (eq? 'full (visit-status visit)))) + (origin-visits origin)) ((visit . _) (let ((snapshot (visit-snapshot visit))) (match (and=> (find (lambda (branch) -- cgit v1.2.3