diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2005-06-21 22:19:19 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2005-06-21 22:19:19 +0000 |
commit | 9a4bdee07217cf5b04aeded5f462ed3728b8a3d9 (patch) | |
tree | c7597a077105e9691460ad738ffa5b7b3e0ffc61 | |
parent | dd0f1ff558ce1d329174f58d8b0bef40e36f8968 (diff) | |
download | quilt-9a4bdee07217cf5b04aeded5f462ed3728b8a3d9.tar.gz |
- quilt/annotate.in: Add comment; remove some dead code.
-rw-r--r-- | quilt.changes | 5 | ||||
-rw-r--r-- | quilt/annotate.in | 16 |
2 files changed, 18 insertions, 3 deletions
diff --git a/quilt.changes b/quilt.changes index 800377a..f338cb2 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Wed Jun 22 00:15:19 CEST 2005 - agruen@suse.de + +- quilt/annotate.in: Add comment; remove some dead code. + +------------------------------------------------------------------- Tue Jun 21 23:54:51 CEST 2005 - agruen@suse.de - add command: "File %s added to patch %s" message goes to stdout diff --git a/quilt/annotate.in b/quilt/annotate.in index 7bdd844..e3ac44f 100644 --- a/quilt/annotate.in +++ b/quilt/annotate.in @@ -121,14 +121,24 @@ then fi template=$(gen_tempfile) -apatch=$(gen_tempfile) -trap "rm -f $template $apatch" EXIT +# 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. +# +# Finally, the annotations listing is merged with the source file line +# by line. empty_file ${patches[0]} "$opt_file" > $template for ((n = 0; n < ${#patches[@]}; n++)) do - annotation_for "${patches[$n]}" "${patches[$((n+1))]}" "$opt_file" $((n+1)) + annotation_for "${patches[$n]}" "${patches[$((n+1))]}" "$opt_file" \ + $((n+1)) done \ | @PATCH@ $template merge_files $template "$opt_file" |