Commit graph

15 commits

Author SHA1 Message Date
Joey Hess
135d75f2b9 avoid list traverse on queue
I wanted to use M.insertWith' (\_ l -> file:l) action [] m , but the
order of the parameters and which to ignore is not clear, and
seems unsafe to rely on.
2011-04-07 15:00:29 -04:00
Joey Hess
bc51387e6d Periodically flush git command queue, to avoid boating memory usage too much.
Since the queue is flushed in between subcommand actions being run,
there should be no issues with actions that expect to queue up some stuff
and have it run after they do other stuff. So I didn't have to audit for
such assumptions.
2011-04-07 13:59:31 -04:00
Joey Hess
bf1e2205a4 bugfix for uuid lookup 2011-04-01 12:19:26 -04:00
Joey Hess
bc21502b9a use queue when upgrading, flushing every so often
Added a cheap way to query the size of a queue.

runQueueAt is not the default yet only because there may be some code that
expects to be able to queue some suff, do something else, and run the whole
queue at the end.

10240 is an arbitrary size for the queue. If we assume annexed
filenames are between 10 and 255 characters long, then the queue will
build up between 100kb and 2550kb long commands. The max command line
length on linux is somewhere above 20k, so this is a fairly good balance --
the queue will buffer only a few megabytes of stuff and a minimal number
of commands will be run by xargs.

Also, insert queue items strictly, this should save memory.
2011-03-16 15:10:15 -04:00
Joey Hess
4cd96ad2db rename 2011-02-28 16:25:31 -04:00
Joey Hess
fcdc4797a9 use ShellParam type
So, I have a type checked safe handling of filenames starting with dashes,
throughout the code.
2011-02-28 16:18:55 -04:00
Joey Hess
755029ae0e use forM_ in a few places 2011-01-31 23:27:53 -04:00
Joey Hess
d007e58a54 use mapM_ 2011-01-31 13:52:11 -04:00
Joey Hess
57adb0347b hlint tweaks
Remotes.hs next, and also Backend/* and Command/*
2010-11-22 15:46:57 -04:00
Joey Hess
a3519c365f hlinted a few files 2010-11-06 17:07:11 -04:00
Joey Hess
435ec21d58 bugfix: really run GitQueue against specified repo, not necessarily pwd 2010-10-31 15:25:55 -04:00
Joey Hess
045b051ec1 got rid of almost all 'return ()' 2010-10-28 12:40:05 -04:00
Joey Hess
833d4b342e copyright statements 2010-10-27 16:53:54 -04:00
Joey Hess
5b4fa4aeca use xargs 2010-10-27 13:12:02 -04:00
Joey Hess
ef26076a5a add git queue to Annex monad
not used anywhere just yet..
2010-10-26 15:59:50 -04:00