summaryrefslogtreecommitdiff
path: root/Remote/Helper
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-10-09 17:21:02 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-10-09 17:31:02 -0400
commit841e9fc078f114a7d1942d433a7f50af8f8552d4 (patch)
tree3aad8922a3428258bd22c9c1bd80328f318fdeec /Remote/Helper
parent43efb9173bbf23d35106d980fc36c07c6c29a4e6 (diff)
improve display when lockcontent fails
/dev/null stderr; ssh is still able to display a password prompt despite this Show some messages so the user knows it's locking a remote, and knows if that locking failed.
Diffstat (limited to 'Remote/Helper')
-rw-r--r--Remote/Helper/Messages.hs27
1 files changed, 15 insertions, 12 deletions
diff --git a/Remote/Helper/Messages.hs b/Remote/Helper/Messages.hs
index 377f2d231..6e72758fb 100644
--- a/Remote/Helper/Messages.hs
+++ b/Remote/Helper/Messages.hs
@@ -13,20 +13,23 @@ import Common.Annex
import qualified Git
import qualified Types.Remote as Remote
-class Checkable a where
- descCheckable :: a -> String
+class Describable a where
+ describe :: a -> String
-instance Checkable Git.Repo where
- descCheckable = Git.repoDescribe
+instance Describable Git.Repo where
+ describe = Git.repoDescribe
-instance Checkable (Remote.RemoteA a) where
- descCheckable = Remote.name
+instance Describable (Remote.RemoteA a) where
+ describe = Remote.name
-instance Checkable String where
- descCheckable = id
+instance Describable String where
+ describe = id
-showChecking :: Checkable a => a -> Annex ()
-showChecking v = showAction $ "checking " ++ descCheckable v
+showChecking :: Describable a => a -> Annex ()
+showChecking v = showAction $ "checking " ++ describe v
-cantCheck :: Checkable a => a -> e
-cantCheck v = error $ "unable to check " ++ descCheckable v
+cantCheck :: Describable a => a -> e
+cantCheck v = error $ "unable to check " ++ describe v
+
+showLocking :: Describable a => a -> Annex ()
+showLocking v = showAction $ "locking " ++ describe v