Am 03.09.2005 um 16:29 schrieb David Roundy:
On Sat, Sep 03, 2005 at 04:02:56PM +0200, Daniel Lutz wrote:
Am 03.09.2005 um 14:45 schrieb David Roundy:
We could add a --plain option to annotate, which would eliminate the
post-processing and could be implemented to run faster.  Or we could
stick this in the query supercommand as something like

darcs query filecontents -p foo filename

This would be great. Probably even better would be if the command could
accept a list of patches (e.g. --match ...  --match ...) because file
"versions" which differ only in a few patches could benefit of their
common predecessor patches (which could improve efficiency on large
repositories).

True, but how'd you get the output then? I assumed we'd just dump the file contents to stdout, but it'd be more of a pain if we need to figure out how to mark the beginning and ending of the files. I guess we could output the
file length first, followed by a newline, but that's a bit of a pain.

I had a output to files (specified by parameters) in mind.
But I agree: an output to stdout (of one file content) is much cleaner
and simpler, hence better.

An other idea (for improving efficiency in a second step if necessary):
Supposed some locking mechanism is implemented. Then caching could be
introduced (user = e.g. script):

1)  user requests write lock on the repository
2a) user requests file content of file A after patch X to stdout
     -> generate a cache file (e.g. containing file A after patch X)
2b) user requests file content of file A after patch Y (after X) to stdout
     -> use cache file
...
3) user releases write lock
     -> cache files are deleted

Daniel


_______________________________________________
darcs-devel mailing list
[email protected]
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel

Reply via email to