nub transitionList to avoid ugly message after repeated transitions, and avoid redundant work for repeated ForgetDeadRemotes transitions
This commit is contained in:
parent
766728c8cf
commit
823c28d2dc
2 changed files with 4 additions and 3 deletions
|
@ -522,7 +522,7 @@ performTransitionsLocked jl ts neednewlocalbranch transitionedrefs = do
|
|||
Annex.Queue.flush
|
||||
withIndex $ do
|
||||
prepareModifyIndex jl
|
||||
run $ mapMaybe getTransitionCalculator $ transitionList ts
|
||||
run $ mapMaybe getTransitionCalculator tlist
|
||||
Annex.Queue.flush
|
||||
if neednewlocalbranch
|
||||
then do
|
||||
|
@ -535,7 +535,8 @@ performTransitionsLocked jl ts neednewlocalbranch transitionedrefs = do
|
|||
message
|
||||
| neednewlocalbranch && null transitionedrefs = "new branch for transition " ++ tdesc
|
||||
| otherwise = "continuing transition " ++ tdesc
|
||||
tdesc = show $ map describeTransition $ transitionList ts
|
||||
tdesc = show $ map describeTransition tlist
|
||||
tlist = transitionList ts
|
||||
|
||||
{- The changes to make to the branch are calculated and applied to
|
||||
- the branch directly, rather than going through the journal,
|
||||
|
|
|
@ -77,7 +77,7 @@ combineTransitions :: [Transitions] -> Transitions
|
|||
combineTransitions = S.unions
|
||||
|
||||
transitionList :: Transitions -> [Transition]
|
||||
transitionList = map transition . S.elems
|
||||
transitionList = nub . map transition . S.elems
|
||||
|
||||
{- Typically ran with Annex.Branch.change, but we can't import Annex.Branch
|
||||
- here since it depends on this module. -}
|
||||
|
|
Loading…
Reference in a new issue