diff options
Diffstat (limited to 'Assistant')
-rw-r--r-- | Assistant/Threads/Merger.hs | 8 | ||||
-rw-r--r-- | Assistant/Types/NetMessager.hs | 4 | ||||
-rw-r--r-- | Assistant/XMPP.hs | 3 |
3 files changed, 8 insertions, 7 deletions
diff --git a/Assistant/Threads/Merger.hs b/Assistant/Threads/Merger.hs index 3f4fcb0cc..8c406990a 100644 --- a/Assistant/Threads/Merger.hs +++ b/Assistant/Threads/Merger.hs @@ -80,8 +80,8 @@ onChange file mergecurrent (Just current) | equivBranches changedbranch current = do debug - [ "merging", show changedbranch - , "into", show current + [ "merging", Git.fromRef changedbranch + , "into", Git.fromRef current ] void $ liftAnnex $ Command.Sync.mergeFrom changedbranch mergecurrent _ = noop @@ -105,12 +105,12 @@ onChange file equivBranches :: Git.Ref -> Git.Ref -> Bool equivBranches x y = base x == base y where - base = takeFileName . show + base = takeFileName . Git.fromRef isAnnexBranch :: FilePath -> Bool isAnnexBranch f = n `isSuffixOf` f where - n = '/' : show Annex.Branch.name + n = '/' : Git.fromRef Annex.Branch.name fileToBranch :: FilePath -> Git.Ref fileToBranch f = Git.Ref $ "refs" </> base diff --git a/Assistant/Types/NetMessager.hs b/Assistant/Types/NetMessager.hs index 0af262e9a..41ab4b272 100644 --- a/Assistant/Types/NetMessager.hs +++ b/Assistant/Types/NetMessager.hs @@ -32,7 +32,7 @@ data NetMessage | PairingNotification PairStage ClientID UUID -- used for git push over the network messager | Pushing ClientID PushStage - deriving (Show, Eq, Ord) + deriving (Eq, Ord, Show) {- Something used to identify the client, or clients to send the message to. -} type ClientID = Text @@ -50,7 +50,7 @@ data PushStage | SendPackOutput SequenceNum ByteString -- sent when git receive-pack exits, with its exit code | ReceivePackDone ExitCode - deriving (Show, Eq, Ord) + deriving (Eq, Ord, Show) {- A sequence number. Incremented by one per packet in a sequence, - starting with 1 for the first packet. 0 means sequence numbers are diff --git a/Assistant/XMPP.hs b/Assistant/XMPP.hs index 09b7daf4e..e74705021 100644 --- a/Assistant/XMPP.hs +++ b/Assistant/XMPP.hs @@ -13,6 +13,7 @@ import Assistant.Common import Assistant.Types.NetMessager import Assistant.Pairing import Git.Sha (extractSha) +import Git import Network.Protocol.XMPP hiding (Node) import Data.Text (Text) @@ -152,7 +153,7 @@ pushMessage = gitAnnexMessage . encode where encode (CanPush u shas) = gitAnnexTag canPushAttr $ T.pack $ unwords $ - fromUUID u : map show shas + fromUUID u : map fromRef shas encode (PushRequest u) = gitAnnexTag pushRequestAttr $ T.pack $ fromUUID u encode (StartingPush u) = |