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
|
||||
(lambda (commit)
|
||||
(let ((result
|
||||
(null?
|
||||
(exec-query
|
||||
conn
|
||||
"SELECT 1 FROM git_commits WHERE commit = $1"
|
||||
commit))))
|
||||
(or
|
||||
(string-null? commit)
|
||||
(null?
|
||||
(exec-query
|
||||
conn
|
||||
"SELECT 1 FROM git_commits WHERE commit = $1"
|
||||
(list commit))))))
|
||||
(unless result
|
||||
(simple-format (current-error-port)
|
||||
"skipping ~A because it's still referenced\n"
|
||||
commit))
|
||||
result))
|
||||
commits)))
|
||||
(delete-jobs conn now-unreferenced-commits)
|
||||
(delete-guix-revisions conn
|
||||
git-repository-id
|
||||
now-unreferenced-commits)))))
|
||||
(unless (null? now-unreferenced-commits)
|
||||
(delete-jobs conn now-unreferenced-commits)
|
||||
(delete-guix-revisions conn
|
||||
git-repository-id
|
||||
now-unreferenced-commits))))))
|
||||
(lambda (key . args)
|
||||
(simple-format
|
||||
(current-error-port)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue