quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Quilt-dev] Annotate command


From: Andreas Gruenbacher
Subject: Re: [Quilt-dev] Annotate command
Date: Wed, 22 Jun 2005 00:52:03 +0200
User-agent: KMail/1.7.1

On Wednesday 22 June 2005 00:16, Andreas Gruenbacher wrote:
> On Monday 20 June 2005 07:34, Jean Delvare wrote:
> > [Andreas Gruenbacher]
> >
> > > here is a first shot at a cvs-style annotate command that shows which
> > > patches  modify which parts of a file. Useful especially with huge
> > > patch series.
> >
> > Sounds like a very good idea, I didn't even think we could possibly do
> > that. Could you please tell us how the script works? I think it would
> > greatly benefit from a few comments here and there, as it's not totally
> > trivial.
>
> # The annotated listing is generated as follows: A file of annotations
> # is created based on a file that contains the same number of lines as
> # the source file, but all lines are empty.
> #
> # Then, for each patch that modifies the source file, a diff without
> # context is generated (-U0 or -C0 would do, but I've picked -e).  In
> # that diff, all line additions are replaced with the identifier of the
> # patch (1, 2, ...). These patches are then applied to the empty file.

Actually -U0 or -C0 wouldn't work very well because the contents of deleted 
lines matter, so:

# Then, for each patch that modifies the source file, an ed-style diff
# (which has no context, and removes lines that are removed without
# caring for the line's contents) is generated. In that diff, all line
# additions are replaced with the identifier of the patch (1, 2, ...).
# These patches are then applied to the empty file.

> # Finally, the annotations listing is merged with the source file line
> # by line.
>
> > As a side note, the script creates a temporary file $apatch but then
> > never uses it. It has to be an error.
>
> Ahh, a leftover, thanks.
>
> - Andreas.
>
>
> _______________________________________________
> Quilt-dev mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/quilt-dev

-- 
Andreas Gruenbacher <address@hidden>
SUSE Labs, SUSE LINUX PRODUCTS GMBH




reply via email to

[Prev in Thread] Current Thread [Next in Thread]