[darcs-users] Using "darcs patch bundle context" when reporting bugs?

David Roundy droundy at abridgegame.org
Thu Jun 24 11:25:23 UTC 2004


On Tue, Jun 22, 2004 at 02:46:08PM +0200, Marnix Klooster wrote:
> Hello all,
> 
> Just an idea: often I see people on this list say things like "things go
> wrong in a version of darcs that I built 10 hours ago"...  That should not
> be necessary, because the source for darcs is maintained in a darcs
> repository, and therefore it should be easy to just dump the list of patches
> to reconstruct precisely the source for that specific version of darcs.

That's a good point.  It would be nice to have this information in the
darcs binary, especially if people package and ship "non-vanilla" darcs
binaries.  Actually, a couple of weeks ago I implemented something like
this for a project at work, but it didn't occur to me to do this with darcs
itself....

> What I suggest is to have a command like "darcs context" or something like
> that, which outputs the patch list (the same as what "darcs send" outputs
> when creating a patch bundle).
>
> This command can then be using during the build process, so that this
> context is stored somewhere in the binary(ies) that is(are) built.

This sounds like a great idea--in particular since it applies just as well
not just to darcs itself but to any project that uses darcs.  :) In fact,
it's easier to implement in other projects, since you don't have a
bootstrapping issue (although you still have to be careful about the case
where the source code is from a tarball, not a darcs repository, or if
darcs is unavailable).

I've implemented a --context option to changes which outputs in
machine-readable form minimal information to reproduce the current state of
the repository (except for unrecorded changes...), and set up darcs get to
accept a --context=filename argument which tells it to get the version
described in that file.  Incidentally, when testing this feature with get,
I found a bug--it turned out that --tag-name didn't work properly with
get...  :( So I fixed this, and also made --tag work right with --partial,
which it never did before.

I am not really happy with the name of the option... --context is great
when thinking of it in analogy with patch bundles, but really what we're
describing is a version, or you could call it something like an anonymous
tag.  Suggestions here are welcome.

The other question in my mind is whether we might actually prefer something
like a complete patch bundle--i.e. it might be nice to include the
unrecorded local changes.  This isn't a big issue for "released" code, but
it would be nice to be able to assure that the "context" (or whatever it
ends up being called) completely describes a particular version of the
code.  The annoying thing with trying to replace this with patch bundles is
that currently patch bundles can only contain named patches...

Ideas/suggestions and criticisms are welcome.  I'm excited about this
feature, particularly in application to something like my project at work,
where we recently discovered that an old binary for which we had no idea
what the source code was ran twice as fast as the most recent code.
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list