diff options
-rw-r--r-- | TODO | 27 | ||||
-rw-r--r-- | doc/sample.quiltrc | 7 | ||||
-rw-r--r-- | quilt.changes | 8 | ||||
-rw-r--r-- | quilt/diff.in | 8 | ||||
-rw-r--r-- | quilt/fold.in | 2 | ||||
-rwxr-xr-x | scripts/apatch.in | 6 | ||||
-rw-r--r-- | scripts/patchfns.in | 7 |
7 files changed, 30 insertions, 35 deletions
@@ -1,17 +1,5 @@ -This is my current list of open issues with the patch scripts. I would -like to do the most intrusive changes before syncing up with the -Savannah CVS. Of course, contributions are very welcome. It wouldn't -hurt to know if you want to work on some of the issues in advance to -avoid duplicate work, though :) - - -- Andreas Gruenbacher <agruen@suse.de> - - General: - - Test if patches/ can be moved with environment variable as - planned. - - Abstract backup operations to/from the .pc/ directory, so that optionally something like rcs can be used instead of lib/backup-files? @@ -35,8 +23,6 @@ General: Documentation: - - How to rediff with push -f / pop -f? - - How to import a new version of a patch? - How to import a complete directory, before doing @@ -60,23 +46,12 @@ quilt setup: - spec2series also prints -p1; omit. -quilt patches: - - - Add something so that it's possible to show a list of all - patches, with those patches marked that modify the - specified file. - rpatch: - If not removing the topmost patch, add checks if any files are hidden by later patches. If so, refuse to remove patch! (Note that poppatch takes care of that currently.) - - Instead of reverse-applying a patch to make sure it contains all - changes, forward-apply it to a copy of the .pc/$patch directory, - and check if the resulting files are identical. This also works - with patches that don't reverse-apply. - apatch: - Allow to add a patch in the middle of the applied series, and @@ -88,4 +63,4 @@ quilt diff: - The number of contetx lines cannot be overridden in QUILT_DIFF_OPTS: GNU diff uses three context lines as soon as -u or -U3 is on the - command line, no matter which order of arguments. + command line, no matter which order of arguments are specified. diff --git a/doc/sample.quiltrc b/doc/sample.quiltrc index 3f81d73..0a4a24d 100644 --- a/doc/sample.quiltrc +++ b/doc/sample.quiltrc @@ -1,5 +1,12 @@ +# Additional options passed to GNU diff # -p : Show which C function each change is in. QUILT_DIFF_OPTS="-p${QUILT_DIFF_OPTS:+ $QUILT_DIFF_OPTS}" +# Additional options passed to GNU patch +#QUILT_PATCH_OPTS="" + # The directory in which patches are found (defaults to "patches"). #QUILT_PATCHES=patches + +# Define this to generate diffs without timestamps. +#QUILT_NO_DIFF_TIMESTAMPS=yes diff --git a/quilt.changes b/quilt.changes index 187fdfc..5aa915c 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Sat Jan 24 23:58:01 CET 2004 - agruen@suse.de + +- Add QUILT_NO_DIFF_TIMESTAMPS option in .quiltrc. +- Add QUILT_PATCH_OPTS setting to allow passing options to + GNU patch. +- Fix help for `quilt diff'. + +------------------------------------------------------------------- Thu Jan 8 03:48:22 CET 2004 - agruen@suse.de - Also accept `quilt diff -z ./file' (ignore the ./ prefix that diff --git a/quilt/diff.in b/quilt/diff.in index a67df2a..f9cb2d6 100644 --- a/quilt/diff.in +++ b/quilt/diff.in @@ -24,7 +24,7 @@ usage() then redirect='>&2' fi - echo $"Usage: quilt diff [-p n] [-c patch|-z] [-R] [-P patch] [file ...]" $redirect + echo $"Usage: quilt diff [-p n] [-c patch|-z] [-R] [-P patch] [--diff=utility] [file ...]" $redirect if [ x$1 = x-h ] then @@ -50,6 +50,10 @@ included. -z Write to standard output the changes that have been made relative to the topmost or specified patch. +--diff=utility + Use the specified utility for generating the diff. The utility + is invoked with the original and new file name as arguments. + " exit 0 else @@ -254,7 +258,7 @@ then if [ -s $pwd/$patch_file ] then if ! cat_file $pwd/$patch_file \ - | @PATCH@ $patch_args --no-backup-if-mismatch \ + | @PATCH@ $QUILT_PATCH_OPTS $patch_args --no-backup-if-mismatch \ -Ef >/dev/null 2>/dev/null then # If a patch was force applied (and therefore needs diff --git a/quilt/fold.in b/quilt/fold.in index 2fc226d..71825fc 100644 --- a/quilt/fold.in +++ b/quilt/fold.in @@ -82,7 +82,7 @@ fi trap "failed=1" SIGINT workdir=$(gen_tempfile -d $PWD) -@PATCH@ -p$opt_strip_level $silent --backup --prefix="$workdir/" -E \ +@PATCH@ $QUILT_PATCH_OPTS -p$opt_strip_level $silent --backup --prefix="$workdir/" -E \ || failed=1 if [ -z "$failed" ] diff --git a/scripts/apatch.in b/scripts/apatch.in index 54efa81..bba756f 100755 --- a/scripts/apatch.in +++ b/scripts/apatch.in @@ -44,15 +44,15 @@ apply_patch() if [ "x${patch_file:(-3)}" = "x.gz" ] then gzip -cd $patch_file \ - | @PATCH@ $(patch_args $patch) --backup --prefix=".pc/$patch/" \ + | @PATCH@ $QUILT_PATCH_OPTS $(patch_args $patch) --backup --prefix=".pc/$patch/" \ -E $silent $force_apply 2>&1 elif [ "x${patch_file:(-4)}" = "x.bz2" ] then bzip2 -cd $patch_file \ - | @PATCH@ $(patch_args $patch) --backup --prefix=".pc/$patch/" \ + | @PATCH@ $QUILT_PATCH_OPTS $(patch_args $patch) --backup --prefix=".pc/$patch/" \ -E $silent $force_apply 2>&1 else - @PATCH@ $(patch_args $patch) --backup --prefix=".pc/$patch/" \ + @PATCH@ $QUILT_PATCH_OPTS $(patch_args $patch) --backup --prefix=".pc/$patch/" \ -E $silent $force_apply -i $patch_file 2>&1 fi } diff --git a/scripts/patchfns.in b/scripts/patchfns.in index 2ddf7ac..a715033 100644 --- a/scripts/patchfns.in +++ b/scripts/patchfns.in @@ -425,9 +425,10 @@ touched_by_patch() fix_diff_header() { - local from=$1 to=$2 - @SED@ -e 's/^--- [^ '$'\t'']*/--- '"$(quote_bre $from)"'/' \ - -e 's/^+++ [^ '$'\t'']*/+++ '"$(quote_bre $to)"'/' + local from=$1 to=$2 z + [ -n "$QUILT_NO_DIFF_TIMESTAMPS" ] && z='.*' + @SED@ -e 's/^--- [^ '$'\t'']*'$z'/--- '"$(quote_bre $from)"'/' \ + -e 's/^+++ [^ '$'\t'']*'$z'/+++ '"$(quote_bre $to)"'/' } diff_file() |