1module ProjectM36.TransactionGraph.Show where
3import ProjectM36.TransactionGraph
4import qualified Data.Set as S
6showTransactionStructure :: Transaction -> TransactionGraph -> String
7showTransactionStructure trans graph = headInfo ++ " " ++ show (transactionId trans) ++ " p" ++ parentTransactionsInfo
9 headInfo = maybe "" show (headNameForTransaction trans graph)
10 parentTransactionsInfo = if isRootTransaction trans then "root" else case parentTransactions trans graph of
12 Right parentTransSet -> concat $ S.toList $ S.map (show . transactionId) parentTransSet
15showGraphStructure :: TransactionGraph -> String
16showGraphStructure graph@(TransactionGraph _ transSet) = S.foldr folder "" transSet
18 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