1{-# LANGUAGE OverloadedStrings #-}
2module ProjectM36.TransactionGraph.Show where
4import ProjectM36.TransactionGraph
5import qualified Data.Set as S
8showTransactionStructure :: Transaction -> TransactionGraph -> String
9showTransactionStructure trans graph = headInfo ++ " " ++ show (transactionUUID trans) ++ " " ++ parentTransactionsInfo
11 headInfo = maybe "" show (headNameForTransaction trans graph)
12 parentTransactionsInfo = if isRootTransaction trans graph then "root" else case parentTransactions trans graph of
14 Right parentTransSet -> concat $ S.toList $ S.map (show . transactionUUID) parentTransSet
16showGraphStructure :: TransactionGraph -> String
17showGraphStructure graph@(TransactionGraph _ transSet) = S.foldr folder "" transSet
19 folder trans acc = acc ++ showTransactionStructure trans graph ++ "\n"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list