Fix bug in annex.queuesize calculation that caused much more queue flushing than necessary.
The bug caused the size of the queue to be miscalculted; it was doubled each time an item was added. Commands run after approx 140 items rather than the intended 10240!
This commit is contained in:
parent
c7cbd6488c
commit
986bf1d6f6
2 changed files with 6 additions and 4 deletions
|
@ -82,16 +82,16 @@ new lim = Queue 0 (fromMaybe defaultLimit lim) M.empty
|
|||
-}
|
||||
addCommand :: String -> [CommandParam] -> [FilePath] -> Queue -> Repo -> IO Queue
|
||||
addCommand subcommand params files q repo =
|
||||
updateQueue action different (length newfiles) q repo
|
||||
updateQueue action different (length files) q repo
|
||||
where
|
||||
key = actionKey action
|
||||
action = CommandAction
|
||||
{ getSubcommand = subcommand
|
||||
, getParams = params
|
||||
, getFiles = newfiles
|
||||
, getFiles = allfiles
|
||||
}
|
||||
newfiles = map File files ++ maybe [] getFiles (M.lookup key $ items q)
|
||||
|
||||
allfiles = map File files ++ maybe [] getFiles (M.lookup key $ items q)
|
||||
|
||||
different (CommandAction { getSubcommand = s }) = s /= subcommand
|
||||
different _ = True
|
||||
|
||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -7,6 +7,8 @@ git-annex (5.20140614) UNRELEASED; urgency=medium
|
|||
* Windows: Fix opening file browser from webapp when repo is in a
|
||||
directory with spaces.
|
||||
* Windows: Assistant now logs to daemon.log.
|
||||
* Fix bug in annex.queuesize calculation that caused much more
|
||||
queue flushing than necessary.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Mon, 16 Jun 2014 11:28:42 -0400
|
||||
|
||||
|
|
Loading…
Reference in a new issue