summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2005-02-10 10:59:24 +0000
committerAndreas Gruenbacher <agruen@suse.de>2005-02-10 10:59:24 +0000
commitd19ec29dec7210bc30dbd715a9a7a26bd2a1eee2 (patch)
treec4170a2c9bf5b880907763ca2982f446d27d44c9
parentc6e5788b1e0ee1de26779c37a489f24cbd4273e4 (diff)
downloadquilt-d19ec29dec7210bc30dbd715a9a7a26bd2a1eee2.tar.gz
- quilt remove: Update restored file's timestamp. Also, some usesv0.39
caused a subsequent ``quilt diff -z'' to fail: we must mark the patch as dirty after removing files. - test/run: adjust to terminal width. - Bump version to 0.39.
-rw-r--r--configure.ac4
-rw-r--r--quilt.changes9
-rw-r--r--quilt/remove.in10
-rw-r--r--test/remove.test49
-rwxr-xr-xtest/run6
5 files changed, 74 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 36862e4..8202f85 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.38],[quilt-dev@nongnu.org])
+AC_INIT([quilt],[0.39],[quilt-dev@nongnu.org])
AC_CONFIG_AUX_DIR(config)
AC_PREREQ(2.53)
-AC_REVISION ($Revision: 1.33 $)
+AC_REVISION ($Revision: 1.34 $)
PACKAGE_RELEASE=1
AC_SUBST(PACKAGE_RELEASE)
diff --git a/quilt.changes b/quilt.changes
index de1bc8e..ae66dbc 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,4 +1,13 @@
-------------------------------------------------------------------
+Thu Feb 10 12:02:21 CET 2005 - agruen@suse.de
+
+- quilt remove: Update restored file's timestamp. Also, some uses
+ caused a subsequent ``quilt diff -z'' to fail: we must mark
+ the patch as dirty after removing files.
+- test/run: adjust to terminal width.
+- Bump version to 0.39.
+
+-------------------------------------------------------------------
Sun Feb 6 01:15:03 CET 2005 - agruen@suse.de
- Update of the Japanese translation from Yasushi SHOJI
diff --git a/quilt/remove.in b/quilt/remove.in
index c193ea0..e7d2d71 100644
--- a/quilt/remove.in
+++ b/quilt/remove.in
@@ -104,13 +104,21 @@ do
fi
# Restore file from backup
- if ! @LIB@/backup-files -b -s -B $QUILT_PC/$patch/ -r $SUBDIR$file
+ if ! @LIB@/backup-files -r -t -s -B $QUILT_PC/$patch/ $SUBDIR$file
then
printf $"Failed to remove file %s from patch %s\n" \
"$SUBDIR$file" "$(print_patch $patch)" >&2
status=1
continue
fi
+
+ if [ -e $(dirname $QUILT_PC/$patch~refresh) -a \
+ -e $(patch_file_name $patch) ]
+ then
+ # The patch must be refreshed in order to get rid of the
+ # patch permanently.
+ touch $QUILT_PC/$patch~refresh
+ fi
printf $"File %s removed from patch %s\n" \
"$SUBDIR$file" "$(print_patch $patch)"
diff --git a/test/remove.test b/test/remove.test
new file mode 100644
index 0000000..f8026bd
--- /dev/null
+++ b/test/remove.test
@@ -0,0 +1,49 @@
+ $ mkdir -p d/patches
+ $ cd d
+
+ $ echo f1 > f
+ $ echo g1 > g
+ $ quilt new p.diff
+ > Patch patches/p.diff is now on top
+
+ $ quilt add f g h
+ > File f added to patch patches/p.diff
+ > File g added to patch patches/p.diff
+ > File h added to patch patches/p.diff
+
+ $ echo h1 > h
+ $ rm g
+ $ quilt refresh
+ > Refreshed patch patches/p.diff
+
+ $ quilt remove f
+ > File f removed from patch patches/p.diff
+
+ $ quilt diff -z
+ $ quilt pop -qf
+ > Removing patch patches/p.diff
+ > No patches applied
+
+ $ quilt push -q
+ > Applying patch patches/p.diff
+ > Now at patch patches/p.diff
+
+ $ quilt remove g
+ > File g removed from patch patches/p.diff
+
+ $ quilt diff -z
+ $ quilt pop -qf
+ > Removing patch patches/p.diff
+ > No patches applied
+
+ $ quilt push -q
+ > Applying patch patches/p.diff
+ > Now at patch patches/p.diff
+
+ $ quilt remove h
+ > File h removed from patch patches/p.diff
+
+ $ quilt diff -z
+
+ $ cd ..
+ $ rm -rf d
diff --git a/test/run b/test/run
index 09971d2..d0eac49 100755
--- a/test/run
+++ b/test/run
@@ -13,6 +13,7 @@ use strict;
use FileHandle;
use Getopt::Std;
use POSIX qw(isatty setuid);
+use Term::ReadKey;
use vars qw($opt_l $opt_v);
no warnings qw(taint);
@@ -32,6 +33,7 @@ my ($prog, $in, $out) = ([], [], []);
my $prog_line;
my ($tests, $failed) = (0,0);
my $lineno;
+my $width=((GetTerminalSize)[0] >> 1);
for (;;) {
my $line = <>; $lineno++;
@@ -103,7 +105,9 @@ sub process_test($$$$) {
chomp $l;
my $r = defined($result->[$n]) ? $result->[$n] : "~";
chomp $r;
- print sprintf("%-37s %s %-39s\n", $l, $l eq $r ? '|' : '?', $r);
+ print sprintf("%-" . ($width-3) .
+ "s %s %-" . ($width-1) .
+ "s\n", $l, $l eq $r ? '|' : '?', $r);
}
} elsif ($opt_v) {
print join('', @$result);