diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-05-18 12:26:38 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-05-18 12:26:38 -0400 |
commit | 85e78e454171812d8c8315c7d20d472b1d5ab946 (patch) | |
tree | aef81597423e70c9673ec4e6444dee00f73e551b | |
parent | 49ac40c1e90a2a32a2728e36f02a0f3baa854c8b (diff) |
nub transitionList to avoid ugly message after repeated transitions, and avoid redundant work for repeated ForgetDeadRemotes transitions
-rw-r--r-- | Annex/Branch.hs | 5 | ||||
-rw-r--r-- | Logs/Transitions.hs | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Annex/Branch.hs b/Annex/Branch.hs index e43c07f8e..0993eaaff 100644 --- a/Annex/Branch.hs +++ b/Annex/Branch.hs @@ -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, diff --git a/Logs/Transitions.hs b/Logs/Transitions.hs index eb9fb433b..544004768 100644 --- a/Logs/Transitions.hs +++ b/Logs/Transitions.hs @@ -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. -} |