[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/05: ssh: 'retrieve-files' now only retrieves what's missing.
From: |
Ludovic Courtès |
Subject: |
02/05: ssh: 'retrieve-files' now only retrieves what's missing. |
Date: |
Fri, 12 Jan 2018 17:53:18 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 0e3c8528af1b36687a8cfe56a09c452b6ff3508d
Author: Ludovic Courtès <address@hidden>
Date: Fri Jan 12 22:32:52 2018 +0100
ssh: 'retrieve-files' now only retrieves what's missing.
* guix/ssh.scm (retrieve-files): Remove the subset of FILES that is
valid in LOCAL.
(store-export-channel): Add comment.
---
guix/ssh.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/guix/ssh.scm b/guix/ssh.scm
index 21c452f..ac85692 100644
--- a/guix/ssh.scm
+++ b/guix/ssh.scm
@@ -28,6 +28,7 @@
#:use-module (ssh session)
#:use-module (ssh dist)
#:use-module (ssh dist node)
+ #:use-module (srfi srfi-1)
#:use-module (srfi srfi-11)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
@@ -235,6 +236,10 @@ be read. When RECURSIVE? is true, the closure of FILES is
exported."
(write `(invalid-items ,invalid))
(exit 1))
+ ;; TODO: When RECURSIVE? is true, we could send the list of store
+ ;; items in the closure so that the other end can filter out
+ ;; those it already has.
+
(write '(exporting)) ;we're ready
(force-output)
@@ -394,7 +399,8 @@ check.")
#:key recursive? (log-port (current-error-port)))
"Retrieve FILES from REMOTE and import them using the 'import-paths' RPC on
LOCAL. When RECURSIVE? is true, retrieve the closure of FILES."
- (retrieve-files* files remote
+ (retrieve-files* (remove (cut valid-path? local <>) files)
+ remote
#:recursive? recursive?
#:log-port log-port
#:import (lambda (port)