diff options
author | Joey Hess <joey@kitenet.net> | 2013-01-09 18:53:59 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-01-09 18:53:59 -0400 |
commit | c81444bea5d4c90681434dff5fc00948333b4a10 (patch) | |
tree | c7cb1a7d5117455fd4f14054b613fe0f6fa0fe96 /Command | |
parent | 0c893f8743bab81077e3ee0fed0993b746d7a269 (diff) |
drop: Suggest using git annex move when numcopies prevents dropping a file.
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Drop.hs | 1 | ||||
-rw-r--r-- | Command/Get.hs | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Command/Drop.hs b/Command/Drop.hs index 3a30703d5..2552b3d37 100644 --- a/Command/Drop.hs +++ b/Command/Drop.hs @@ -133,6 +133,7 @@ notEnoughCopies key need have skip bad = do " necessary copies" Remote.showTriedRemotes bad Remote.showLocations key (have++skip) + "Rather than dropping this file, try using: git annex move" hint return False where diff --git a/Command/Get.hs b/Command/Get.hs index 1295cdeeb..9c58bde64 100644 --- a/Command/Get.hs +++ b/Command/Get.hs @@ -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 |