summaryrefslogtreecommitdiff
path: root/P2P/Annex.hs
diff options
context:
space:
mode:
Diffstat (limited to 'P2P/Annex.hs')
-rw-r--r--P2P/Annex.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/P2P/Annex.hs b/P2P/Annex.hs
index d24e65b0f..e9b59652c 100644
--- a/P2P/Annex.hs
+++ b/P2P/Annex.hs
@@ -16,6 +16,7 @@ module P2P.Annex
import Annex.Common
import Annex.Content
import Annex.Transfer
+import Annex.ChangedRefs
import P2P.Protocol
import P2P.IO
import Logs.Location
@@ -114,6 +115,14 @@ runLocal runmode runner a = case a of
protoaction False
next
Right _ -> runner next
+ WaitRefChange next -> do
+ v <- tryNonAsync $ bracket
+ watchChangedRefs
+ (liftIO . stopWatchingChangedRefs)
+ (liftIO . waitChangedRefs)
+ case v of
+ Left e -> return (Left (show e))
+ Right changedrefs -> runner (next changedrefs)
where
transfer mk k af ta = case runmode of
-- Update transfer logs when serving.