[darcs-users] Getting a full diff for pulled patches

David Roundy droundy at darcs.net
Thu Jul 26 00:46:34 UTC 2007


On Thu, Jul 26, 2007 at 02:32:22AM +0200, Alexander Staubo wrote:
> On 7/26/07, David Roundy <droundy at darcs.net> wrote:
> >On Thu, Jul 26, 2007 at 12:14:27AM +0200, Alexander Staubo wrote:
> >> This is a small repo -- 3,500 files or around 24MB in total (excluding
> >> _darcs, which has 5,600 files, or 64MB). Perhaps this operation is
> >> fairly quick with recently-checkpointed repos, but I can't count on
> >> this being the case; the operation I am implementing cannot take more
> >> than a second or so.
> >
> >A local partial get is much slower than a local full get, or at least it
> >should be.
> 
> I didn't know this. All right, good point, though there's the
> additional snag: You cannot "get" from a partial repo -- you get this
> obscure error ("openBinaryFile: does not exist"), and you have to add
> --partial. So while performance on full repos might be fine, partial
> repos would be horrible.

Hmmm.  This should be fixed.  There shouldn't be (in the sense that there's
no fundamental problem with the idea) any trouble with fast local gets from
a partial repository (which would result in a second partial repo).

> [snip]
> >You could also get the remote patch contents with darcs changes --repo -v.
> 
> Silly me, I had no idea that the changes command could do remote
> repos, since most of the usual repo-interaction commands don't. That's
> great news.

Yeah, someone added that... maybe even me? I don't recall, but it's a very
good idea, and adding remote functionality to repo-querying commands would
definitely be nice.

[snip]

> What would have really helped is if "annotate" could support the
> --repo argument for remote repos. Then I could trivially reconstruct
> the ancestor file for both pulls and pushes, and it would all be using
> Darcs itself instead of my home-brewed patch reconstruction logic,
> improving future compatibility and reducing the possibility of
> unforeseen edge cases.

Indeed, and this would be nice to add, but could be disastrously less
efficient on remote repositories, since we quite likely don't have access
to the pristine cache.  On the other hand, we already support operation in
the absence of a pristine cache, it's just slow.

And I'd like to have a "darcs query cat" subcommand that just dumps the
contents of a file, much like annotate, but a more focussed command, and
that doesn't add the annotations (which would make it faster).
-- 
David Roundy
Department of Physics
Oregon State University



More information about the darcs-users mailing list