summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--quilt.changes5
-rw-r--r--quilt/annotate.in16
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"