diff options
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | quilt.changes | 15 | ||||
-rwxr-xr-x | scripts/apatch.in | 23 | ||||
-rw-r--r-- | scripts/patchfns.in | 3 | ||||
-rw-r--r-- | test/dotglob.test | 23 | ||||
-rwxr-xr-x | test/run | 4 |
6 files changed, 60 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index 9e1884c..f905c43 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,8 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([quilt],[0.35],[quilt-dev@nongnu.org]) +AC_INIT([quilt],[0.36],[quilt-dev@nongnu.org]) AC_CONFIG_AUX_DIR(config) AC_PREREQ(2.53) -AC_REVISION ($Revision: 1.30 $) +AC_REVISION ($Revision: 1.31 $) PACKAGE_RELEASE=1 AC_SUBST(PACKAGE_RELEASE) diff --git a/quilt.changes b/quilt.changes index 1c75cb6..539ebb4 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,19 @@ ------------------------------------------------------------------- +Wed Sep 22 13:03:53 CEST 2004 - agruen@suse.de + +- scripts/patchfns.in: set the dotglob option so that dot files + will show up in file globs as well. Bug reported by James Rowe. +- Add a missing tab to the patch header of files that are removed. + Bug reported by James Rowe. +- Push command: Without -f or --leave-rejects, when applying a + patch failed, the *.rej files were not removed properly. Change + the code so that they won't be created in the working tree in + the first place this case. +- test/run script: Oops, the previouos commit was not the latest + version. +- Bump version to 0.36. + +------------------------------------------------------------------- Tue Sep 21 15:39:09 CEST 2004 - agruen@suse.de - Series command: add missing paths to patches if diff --git a/scripts/apatch.in b/scripts/apatch.in index 6ab07b9..11f3739 100755 --- a/scripts/apatch.in +++ b/scripts/apatch.in @@ -47,16 +47,19 @@ apply_patch() gzip -cd $patch_file \ | @PATCH@ $QUILT_PATCH_OPTS $(patch_args $patch) \ --backup --prefix="$QUILT_PC/$patch/" \ + $no_reject_files \ -E $silent $force_apply 2>&1 elif [ "x${patch_file:(-4)}" = "x.bz2" ] then bzip2 -cd $patch_file \ | @PATCH@ $QUILT_PATCH_OPTS $(patch_args $patch) \ --backup --prefix="$QUILT_PC/$patch/" \ + $no_reject_files \ -E $silent $force_apply 2>&1 else @PATCH@ $QUILT_PATCH_OPTS $(patch_args $patch) \ --backup --prefix="$QUILT_PC/$patch/" \ + $no_reject_files \ -E $silent $force_apply -i $patch_file 2>&1 fi } @@ -65,11 +68,6 @@ rollback_patch() { local patch=$1 - if [ -z "$opt_leave_rejects" ] - then - files_in_patch | @SED@ -e 's/$/\.rej/' | xargs rm -f - fi - @LIB@/backup-files $silent_unless_verbose -r -B $QUILT_PC/$patch/ - } @@ -81,6 +79,13 @@ apatch() printf $"Applying patch %s\n" "$(print_patch $patch)" trap "interrupt $patch" SIGINT + no_reject_files= + if [ -z "$opt_leave_rejects" ]; then + local tmp="$(gen_tempfile)" + trap "rm -f $tmp" EXIT + no_reject_files="-r $tmp" + fi + output="$(apply_patch $patch)" status=${PIPESTATUS[0]} @@ -90,8 +95,12 @@ apatch() then # The reject files are removed in rollback_patch. echo "$output" \ - | @SED@ -e \ -'s/-- saving rejects to file \(.\+\)\.rej/-- rejects in file \1/' + | @AWK@ ' + /^patching file / { filename = substr($0, 15) } + { gsub(/-- saving rejects to file .*/, + "-- rejects in file " filename) } + { print } + ' elif [ -n "$output" ] then echo "$output" diff --git a/scripts/patchfns.in b/scripts/patchfns.in index 36f3d4f..5ce5c6d 100644 --- a/scripts/patchfns.in +++ b/scripts/patchfns.in @@ -22,6 +22,7 @@ DB_VERSION=2 : ${QUILT_PC:=.pc} unset CDPATH +shopt -s dotglob if [ -e "$QUILTRC" ] then @@ -532,7 +533,7 @@ diff_file() new_file=/dev/null new_hdr=/dev/null [ -n "$QUILT_NO_DIFF_TIMESTAMPS" ] \ - || new_date="1970-01-01 00:00:00.000000000 +0000" + || new_date=$'\t'"1970-01-01 00:00:00.000000000 +0000" else [ -n "$QUILT_NO_DIFF_TIMESTAMPS" ] \ || new_date=$'\t'$(date +'%Y-%m-%d %H:%M:%S.%N %z' \ diff --git a/test/dotglob.test b/test/dotglob.test new file mode 100644 index 0000000..11c93dd --- /dev/null +++ b/test/dotglob.test @@ -0,0 +1,23 @@ + $ mkdir d + $ cd d + + $ quilt new dotglob.diff + > Patch patches/dotglob.diff is now on top + + $ quilt add .foo + > File .foo added to patch patches/dotglob.diff + + $ echo dot-foo > .foo + $ quilt refresh + > Refreshed patch patches/dotglob.diff + + $ quilt pop -q + > Removing patch patches/dotglob.diff + > No patches applied + + $ quilt push -q + > Applying patch patches/dotglob.diff + > Now at patch patches/dotglob.diff + + $ cd .. + $ rm -rf d @@ -199,11 +199,11 @@ sub exec_test($$) { } elsif ($prog->[0] eq "sg") { return sg($prog->[1]); } elsif ($prog->[0] eq "export") { - my ($name, $value) = split /=/, prog->[1]; + my ($name, $value) = split /=/, $prog->[1]; $ENV{$name} = $value; return []; } elsif ($prog->[0] eq "unset") { - delete $ENV{$name}; + delete $ENV{$prog->[1]}; return []; } |