quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Quilt-dev] [PATCH] quilt diff: Check for snapshot presence before using


From: Jean Delvare
Subject: [Quilt-dev] [PATCH] quilt diff: Check for snapshot presence before using it
Date: Mon, 14 Mar 2011 13:54:19 +0100
User-agent: KMail/1.12.4 (Linux/2.6.32.27-0.2-pae; KDE/4.3.5; i686; ; )

If diffing against snapshot, ensure that snapshot is actually
present. If not, bail out with an error message.

Signed-off-by: Jean Delvare <address@hidden>
---
 quilt/diff.in |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/quilt/diff.in
+++ b/quilt/diff.in
@@ -235,6 +235,13 @@ case "$opt_strip_level" in
        ;;
 esac
 
+# If diffing against snapshot, ensure that snapshot is actually present
+if [ -n "$opt_snapshot" ] && [ ! -d "$QUILT_PC/$snap_subdir" ]
+then
+       printf $"No snapshot to diff against\n" >&2
+       die 1
+fi
+
 trap "die 1" SIGTERM
 
 tmp_files=$(gen_tempfile)

-- 
Jean Delvare
Suse L3



reply via email to

[Prev in Thread] Current Thread [Next in Thread]