diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2005-02-02 00:32:48 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2005-02-02 00:32:48 +0000 |
commit | 6c2caad20d9e49d07982e6a39786292bdac11e6f (patch) | |
tree | 619d82342e19e14b4f6356cef1bfa825f008b572 | |
parent | 30dec222194425235ce4cc479f99161e6caa0ab3 (diff) | |
download | quilt-6c2caad20d9e49d07982e6a39786292bdac11e6f.tar.gz |
- Use color defaults so that QUILT_COLORS can be used to only
override some colors.
- When checking for remaining changes (refresh forgotten), use
$QUILT_PATCH_OPTS as in the push command to get identical
results. Don't generate the actually diff; it doesn't get
printed anyway. This should speed up things.
-rw-r--r-- | quilt.changes | 10 | ||||
-rw-r--r-- | quilt/pop.in | 16 | ||||
-rw-r--r-- | scripts/patchfns.in | 3 |
3 files changed, 21 insertions, 8 deletions
diff --git a/quilt.changes b/quilt.changes index fe339b5..388d12c 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,14 @@ ------------------------------------------------------------------- +Wed Feb 2 01:16:57 CET 2005 - agruen@suse.de + +- Use color defaults so that QUILT_COLORS can be used to only + override some colors. +- When checking for remaining changes (refresh forgotten), use + $QUILT_PATCH_OPTS as in the push command to get identical + results. Don't generate the actually diff; it doesn't get + printed anyway. This should speed up things. + +------------------------------------------------------------------- Thu Jan 27 08:14:34 CET 2005 - agruen@suse.de - lib/backup-files.c: Remove unused command line option and diff --git a/quilt/pop.in b/quilt/pop.in index d0e19bf..7abb052 100644 --- a/quilt/pop.in +++ b/quilt/pop.in @@ -104,7 +104,6 @@ check_for_pending_changes() { local patch=$1 local patch_file=$(patch_file_name $patch) - local patch_args=$(patch_args $patch) local workdir=$(gen_tempfile -d quilt) status=0 if [ -d $QUILT_PC/$patch ] @@ -129,7 +128,8 @@ check_for_pending_changes() if [ -s $patch_file ] then if ! cat_file $patch_file \ - | @PATCH@ -d $workdir $patch_args \ + | @PATCH@ -d $workdir $QUILT_PATCH_OPTS \ + $(patch_args $patch) \ --no-backup-if-mismatch -E \ >/dev/null 2>/dev/null then @@ -142,19 +142,21 @@ check_for_pending_changes() fi fi - local remains=$(gen_tempfile) - for file in $(files_in_patch $patch) + local file failed + for file2 in $(files_in_patch $patch) do - diff_file $file $workdir/$file $file >> $remains + file=$workdir/$file2 + [ -e $file ] || file=/dev/null + [ -e $file2 ] || file2=/dev/null + @DIFF@ -q $file $file2 > /dev/null || failed=1 done - if [ -s $remains ] + if [ -n "$failed" ] then printf $"Patch %s does not remove cleanly (refresh it or enforce with -f)\n" \ "$(print_patch $patch)" >&2 status=1 fi - rm -f $remains rm -rf $workdir return $status diff --git a/scripts/patchfns.in b/scripts/patchfns.in index 25e92af..4454499 100644 --- a/scripts/patchfns.in +++ b/scripts/patchfns.in @@ -763,7 +763,8 @@ print_patch() { setup_colors() { - local C=${QUILT_COLORS:-diff_hdr=32:diff_add=36:diff_mod=35:diff_rem=35:diff_hunk=33:diff_ctx=35:diff_cctx=33:patch_offs=33:patch_fuzz=35:patch_fail=31}:clear=00 + local C=diff_hdr=32:diff_add=36:diff_mod=35:diff_rem=35:diff_hunk=33:diff_ctx=35:diff_cctx=33:patch_offs=33:patch_fuzz=35:patch_fail=31:clear=00 + [ -n "$QUILT_COLORS" ] && C="$C:$QUILT_COLORS" C=${C//=/=\'$'\e'[} C=color_${C//:/m\'; color_}m\' |