[darcs-users] patches to Darcs.Commands.ShowFiles, and repository internals that would be useful to patch-tag. (baby steps towards darcs API, and factoring out getCurrentDirectory dependence)

Thomas Hartman thomashartman1 at googlemail.com
Sat Jan 2 18:18:17 UTC 2010


There are a couple issues I'm facing with patch-tag, some of which may
also be shared by gitit, and most of which have to do with darcs api
(or lack thereof).

I would like to be able to do actions like
-- list files in a repository subdirectory, as of a certain patch
-- list repository history, or some subset thereof

without

a) forking a process with a shell call to darcs inside of it, which
must then trap stdout and parse the output. For darcs changes
--xml-output especially, this is quite slow. (threads are cheap,
processes are expensive)
b) calling setCurrentDirectory, because this seems like a likely cause
of problems if two repositories are attempted to be read
simultaneously (of course this is not a problem if using heavyweight
processes, but as said that's way more expensive.) I believe this
could also bite patch-tag, for example, when serving static content.
In general, even without bringing the need for an API in, it seems
like currentDirectory agnosticism is a better way to go.

The attached patches are mostly improvements in this direction, along
with a few that are more just readability or style.

I hope that all of these can be applied, though not getting my hopes
up for darcs 2.4 given the freeze eh?

Best regards,

Thomas.

-- 
Need somewhere to put your code? http://patch-tag.com
Want to build a webapp? http://happstack.com


More information about the darcs-users mailing list