Fix delete-revisions-from-branch
This commit is contained in:
parent
de98cbfaa3
commit
9032079bda
1 changed files with 12 additions and 9 deletions
|
|
@ -234,21 +234,24 @@ DROP TABLE IF EXISTS package_derivations_by_guix_revision_range_git_branch_"
|
||||||
(filter
|
(filter
|
||||||
(lambda (commit)
|
(lambda (commit)
|
||||||
(let ((result
|
(let ((result
|
||||||
(null?
|
(or
|
||||||
(exec-query
|
(string-null? commit)
|
||||||
conn
|
(null?
|
||||||
"SELECT 1 FROM git_commits WHERE commit = $1"
|
(exec-query
|
||||||
commit))))
|
conn
|
||||||
|
"SELECT 1 FROM git_commits WHERE commit = $1"
|
||||||
|
(list commit))))))
|
||||||
(unless result
|
(unless result
|
||||||
(simple-format (current-error-port)
|
(simple-format (current-error-port)
|
||||||
"skipping ~A because it's still referenced\n"
|
"skipping ~A because it's still referenced\n"
|
||||||
commit))
|
commit))
|
||||||
result))
|
result))
|
||||||
commits)))
|
commits)))
|
||||||
(delete-jobs conn now-unreferenced-commits)
|
(unless (null? now-unreferenced-commits)
|
||||||
(delete-guix-revisions conn
|
(delete-jobs conn now-unreferenced-commits)
|
||||||
git-repository-id
|
(delete-guix-revisions conn
|
||||||
now-unreferenced-commits)))))
|
git-repository-id
|
||||||
|
now-unreferenced-commits))))))
|
||||||
(lambda (key . args)
|
(lambda (key . args)
|
||||||
(simple-format
|
(simple-format
|
||||||
(current-error-port)
|
(current-error-port)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue