diff options
author | 2012-10-29 02:21:04 -0400 | |
---|---|---|
committer | 2012-10-29 02:21:04 -0400 | |
commit | 579f63b6b756ca51b8f9fe53c3e668500718d91f (patch) | |
tree | 20039581df67e034ef434749d37de41e9802d21d /Assistant/Threads/Merger.hs | |
parent | 040f68d628120e112e22bfb7100f9650dec940c8 (diff) |
Assistant monad, stage 2.5
Converted several threads to run in the monad.
Added a lot of useful combinators for working with the monad.
Now the monad includes the name of the thread.
Some debugging messages are disabled pending converting other threads.
Diffstat (limited to 'Assistant/Threads/Merger.hs')
-rw-r--r-- | Assistant/Threads/Merger.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Assistant/Threads/Merger.hs b/Assistant/Threads/Merger.hs index e415a7562..152b40361 100644 --- a/Assistant/Threads/Merger.hs +++ b/Assistant/Threads/Merger.hs @@ -25,7 +25,7 @@ thisThread = "Merger" {- This thread watches for changes to .git/refs/, and handles incoming - pushes. -} mergeThread :: ThreadState -> DaemonStatusHandle -> TransferQueue -> BranchChangeHandle -> NamedThread -mergeThread st dstatus transferqueue branchchange = thread $ do +mergeThread st dstatus transferqueue branchchange = thread $ liftIO $ do g <- runThreadState st gitRepo let dir = Git.localGitDir g </> "refs" createDirectoryIfMissing True dir @@ -35,7 +35,7 @@ mergeThread st dstatus transferqueue branchchange = thread $ do , errHook = hook onErr } void $ watchDir dir (const False) hooks id - debug thisThread ["watching", dir] + brokendebug thisThread ["watching", dir] where thread = NamedThread thisThread @@ -81,7 +81,7 @@ onAdd st dstatus transferqueue branchchange file _ changedbranch = fileToBranch file mergecurrent (Just current) | equivBranches changedbranch current = do - liftIO $ debug thisThread + liftIO $ brokendebug thisThread [ "merging" , show changedbranch , "into" |