Merge branch 'git-remote-annex'
This commit is contained in:
commit
434a88c368
37 changed files with 1575 additions and 92 deletions
|
@ -38,6 +38,7 @@ import Utility.CopyFile
|
|||
import Git.FilePath
|
||||
import Utility.PID
|
||||
import Utility.InodeCache
|
||||
import Utility.Metered
|
||||
import Annex.InodeSentinal
|
||||
import qualified Database.Keys
|
||||
import qualified Database.Fsck as FsckDb
|
||||
|
@ -206,8 +207,7 @@ performRemote key afile numcopies remote =
|
|||
)
|
||||
, return Nothing
|
||||
)
|
||||
getfile' tmp = Remote.retrieveKeyFile remote key (AssociatedFile Nothing) (fromRawFilePath tmp) dummymeter (RemoteVerify remote)
|
||||
dummymeter _ = noop
|
||||
getfile' tmp = Remote.retrieveKeyFile remote key (AssociatedFile Nothing) (fromRawFilePath tmp) nullMeterUpdate (RemoteVerify remote)
|
||||
getcheap tmp = case Remote.retrieveKeyFileCheap remote of
|
||||
Just a -> isRight <$> tryNonAsync (a key afile (fromRawFilePath tmp))
|
||||
Nothing -> return False
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{- git-annex command
|
||||
-
|
||||
- Copyright 2010-2016 Joey Hess <id@joeyh.name>
|
||||
- Copyright 2010-2024 Joey Hess <id@joeyh.name>
|
||||
-
|
||||
- Licensed under the GNU AGPL version 3 or higher.
|
||||
-}
|
||||
|
@ -34,6 +34,7 @@ import Logs.View (is_branchView)
|
|||
import Annex.BloomFilter
|
||||
import qualified Database.Keys
|
||||
import Annex.InodeSentinal
|
||||
import Backend.GitRemoteAnnex (isGitRemoteAnnexKey)
|
||||
|
||||
import qualified Data.Map as M
|
||||
import qualified Data.ByteString as S
|
||||
|
@ -104,7 +105,8 @@ checkRemoteUnused remotename refspec = go =<< Remote.nameToUUID remotename
|
|||
_ <- check "" (remoteUnusedMsg r remotename) (remoteunused u) 0
|
||||
next $ return True
|
||||
remoteunused u = loggedKeysFor u >>= \case
|
||||
Just ks -> excludeReferenced refspec ks
|
||||
Just ks -> filter (not . isGitRemoteAnnexKey u)
|
||||
<$> excludeReferenced refspec ks
|
||||
Nothing -> giveup "This repository is read-only."
|
||||
|
||||
check :: String -> ([(Int, Key)] -> String) -> Annex [Key] -> Int -> Annex Int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue