[darcs-users] Re: yet another feature request for darcs diff

Aggelos Economopoulos aoiko at cc.ece.ntua.gr
Mon Jul 7 17:10:40 UTC 2003


On Monday 07 July 2003 14:59, David Roundy wrote:
> On Wed, Jun 04, 2003 at 05:54:45PM +0300, Aggelos Economopoulos wrote:
> > Hi David,
> >
> > first of all, thanks for implementing 'darcs diff'. Have you considered
> > the possibility of prepending a header to the generated patch explaining
> > what changes it is supposed to make (listing the patch names?), who wrote
> > them and their comments (something resembling a changelog?). In other
> > words, a natural-language resembling presentation of the information
> > contained in the darcs-patch headers.
>
> I've implemented this to a certain extent.  Currently it just lists the
> patch names prepended with " *".

Thanks! I saw it earlier today while pulling from your repository but I 
haven't tried it yet (still in the exams period).

> I'll be interested in extending this to
> give the rest of the information (except perhaps the date), possibly in a
> configurable manner, but I haven't decided how to do so.    There are a
> couple of issues.  One is that of formatting--how to format this
> information in a nice changelog-like manner.  Among other things, I'd like
> to recognize tags and format them in a friendly way so it looks like a real
> changelog.

But not all tags are release tags and quite a few are of no interest to the 
developer, let alone the user (e.g. I regularly come across tags of the form:
it_finally_compiles, this_is_the_version_I_sent_jim, 
I_am_only_tagging_this_to_be_able_to_diff_against_it etc.). This just means 
that it probably shouldn't be the default behaviour. The next paragraphs are 
also relevant.

> Something like:
>
>   * Feature added since 0.9.11.
> darcs 0.9.11:
>   * Add nice changelog feature.
>   * Add other good feature.
>
> I imagine the desired format would vary from project to project, so it
> should be somewhat configurable.

Well, I don't think you (or anybody else) can come up with a format that 
satisfies every project, every developer and every user - I'd argue you can't 
even satisfy the majority. Really, a reasonable default should be enough.

And if you really want to provide that level of flexibility, adding hundreads 
of flags to the changelog generation code is, in my opinion, not the way to 
go. Just export the changelog information to a simple (i.e. not xml :-)), 
documented format and allow the user to specify a program to parse this 
information, piping back the output in the desired presentation format.

Again, I doubt you should invest much more time in the changelog code, at 
least at this point in darcs development. But if that's what you feel like 
coding, sorting the changelog by author name is a feature I'd like to see 
(although its mostly useful for very large projects, where there's so much 
parallel development that information about the chronological order is 
irrelevant - for example, this is the format of the changelog for the linux 
kernel releases (generated by a perl script)).

> There should also be a way to indicate
> that certain patches should be ignored.  For example one might not want to
> bother mentioning the "TODO update" patches I send in from time to time
> since they aren't actual feature changes.  Or a "oops forgot to darcs add
> sucha and such" might not be considered interesting for a changelog.
> The obvious choices are either ignoring patches with a prefix (e.g. "#TODO
> update") or only including those with a prefix ("*Cool new feature").  I
> imagine we'd want to make both choices available.  Another possibility
> would be to only mention patches with a comment.
>
> In case this is seeming a bit extreme for a header to the darcs diff
> output, I also want to make it possible to automatically generate
> changelogs from the darcs metadata.  Any suggestions or votes will be taken
> into account.  I haven't yet decided how to actually implement the
> changelog.  If I'm clever enough, it may be possible (although not
> necesarily desirable) to allow for the darcs comment data to be taken *out*
> of a changelog file...

See above. It seems like too much effort for adding features of relatively 
minor importance. But that's just my view on the subject.

Aggelos





More information about the darcs-users mailing list