drop: Suggest using git annex move when numcopies prevents dropping a file.
This commit is contained in:
parent
1bc49b7158
commit
2e11a6013b
5 changed files with 14 additions and 5 deletions
|
@ -48,18 +48,20 @@ getKeyFile key file dest = dispatch =<< Remote.keyPossibilities key
|
|||
where
|
||||
dispatch [] = do
|
||||
showNote "not available"
|
||||
Remote.showLocations key []
|
||||
showlocs
|
||||
return False
|
||||
dispatch remotes = trycopy remotes remotes
|
||||
trycopy full [] = do
|
||||
Remote.showTriedRemotes full
|
||||
Remote.showLocations key []
|
||||
showlocs
|
||||
return False
|
||||
trycopy full (r:rs) =
|
||||
ifM (probablyPresent r)
|
||||
( docopy r (trycopy full rs)
|
||||
, trycopy full rs
|
||||
)
|
||||
showlocs = Remote.showLocations key [] $
|
||||
"No other repository is known to contain the file."
|
||||
-- This check is to avoid an ugly message if a remote is a
|
||||
-- drive that is not mounted.
|
||||
probablyPresent r
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue