From c81444bea5d4c90681434dff5fc00948333b4a10 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 9 Jan 2013 18:53:59 -0400 Subject: drop: Suggest using git annex move when numcopies prevents dropping a file. --- Command/Drop.hs | 1 + Command/Get.hs | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'Command') 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 -- cgit v1.2.3