use P2P protocol for checkpresent, retrieve, and store
Note that, due to not using rsync to transfer files to ssh remotes any longer, permissions and other file metadata of annexed files will no longer be preserved when copying them to ssh remotes. Other remotes never supported preserving that information, so this is not considered a regression. Added NEWS item about this. Another significant side effect of this is that, even when rsync is run to retrieve a file, its progress display will no longer be shown, and instead the native git-annex progress display will appear. It would be possible to use the rsync process display when rsync is used (old git-annex-shell and also retrieval from a local repository), but it would have complicated the code unncessarily, and been inconsistent behavior. (I'd been thinking for a while about eliminating the rsync progress display, since it's got some annoying verbosities, including display of the key and the "(xfr#1, to-chk=0/1)" bit and was already somewhat inconsistent.) retrieveKeyFileCheap still uses rsync, since that ensures that it gets the actual file content from the remote. Using the P2P protocol would use the local content, as long as the local and remote size are the same. This commit was sponsored by John Pellman on Patreon.
This commit is contained in:
parent
26febb4e58
commit
08814327ff
6 changed files with 88 additions and 65 deletions
|
@ -77,15 +77,6 @@ metered othermeter key getsrcfile a = withMessageState $ \st ->
|
|||
Nothing -> return Nothing
|
||||
Just f -> catchMaybeIO $ liftIO $ getFileSize f
|
||||
|
||||
{- Use when the command's own progress output is preferred.
|
||||
- The command's output will be suppressed and git-annex's progress meter
|
||||
- used for concurrent output, and json progress. -}
|
||||
commandMetered :: Maybe MeterUpdate -> Key -> Annex (Maybe FilePath) -> (MeterUpdate -> Annex a) -> Annex a
|
||||
commandMetered combinemeterupdate key getsrcfile a =
|
||||
withMessageState $ \s -> if needOutputMeter s
|
||||
then metered combinemeterupdate key getsrcfile a
|
||||
else a (fromMaybe nullMeterUpdate combinemeterupdate)
|
||||
|
||||
{- Poll file size to display meter, but only when concurrent output or
|
||||
- json progress needs the information. -}
|
||||
meteredFile :: FilePath -> Maybe MeterUpdate -> Key -> Annex a -> Annex a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue