summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BUGS3
-rw-r--r--quilt.changes6
-rw-r--r--scripts/patchfns.in27
3 files changed, 21 insertions, 15 deletions
diff --git a/BUGS b/BUGS
index 41d11d1..94e9871 100644
--- a/BUGS
+++ b/BUGS
@@ -7,6 +7,3 @@
* Patch destroys the backup files it generates if a file appears more
than once in a patch. This is the reason why we use the backup-files
utility instead.
-
-* diff_file prints an `Index: ' line for each file it looks at, not only for
- those that have differences in them.
diff --git a/quilt.changes b/quilt.changes
index 8ef919e..827ba4c 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Sun Feb 2 15:23:20 +0100 2003 - agruen@suse.de
+
+- Make quilt setup recognize the "# Sourcedir:" directive.
+- Fix bug with spurious `Index:' lines in diff/refresh output.
+
+-------------------------------------------------------------------
Sat Feb 1 18:52:15 +0100 2003 - agruen@suse.de
- Integrate James Rowe's Autoconf setup (with a comple of
diff --git a/scripts/patchfns.in b/scripts/patchfns.in
index 57a3ab2..332752d 100644
--- a/scripts/patchfns.in
+++ b/scripts/patchfns.in
@@ -441,7 +441,7 @@ stripit()
then
echo $1 |
sed -e 's/^\(\.\/\)*//' \
- -e 's/^'"$(quote_bre $P)"'patches\///' -e 's/^\.pc\///' \
+ -e 's/^'"$(quote_bre $P)"'patches\///' \
-e 's/\.gz$//' -e 's/\.bz2$//' \
-e 's/\.patch$//' -e 's/\.diff\?$//'
fi
@@ -514,17 +514,23 @@ refresh_file_list()
fi
}
+fix_diff_header()
+{
+ local from=$1 to=$2
+ sed -e 's/^--- [^ \t]*/--- '"$(quote_bre $from)"'/' \
+ -e 's/^+++ [^ \t]*/+++ '"$(quote_bre $to)"'/'
+}
+
diff_file()
{
local file=$1 suffix=$2 old_file=$3 new_file=$4
- local old_file new_file
+ local old_hdr new_hdr line
if [ ! -e "$old_file" -a ! -e "$new_file" ]
then
echo "File $file does not exist" >&2
return 0
fi
- local old_hdr new_hdr
if [ $opt_strip_level -eq 0 ]
then
old_hdr=$file$suffix
@@ -535,16 +541,13 @@ diff_file()
new_hdr=$dir/$file
fi
- echo Index: $new_hdr
@DIFF@ -Nu $DIFF_OPTS $old_file $new_file |
- fix_diff_header $old_hdr $new_hdr
-}
-
-fix_diff_header()
-{
- local from=$1 to=$2
- sed -e 's/^--- [^ \t]*/--- '"$(quote_bre $from)"'/' \
- -e 's/^+++ [^ \t]*/+++ '"$(quote_bre $to)"'/'
+ if read line
+ then
+ echo "Index: $new_hdr"
+ (echo "$line" ; cat) \
+ | fix_diff_header $old_hdr $new_hdr
+ fi
}
cat_file()