quilt-dev
[Top][All Lists]
Advanced

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

[Quilt-dev] [PATCH] diff: Report diff failures


From: Jean Delvare
Subject: [Quilt-dev] [PATCH] diff: Report diff failures
Date: Thu, 15 Sep 2016 14:10:12 +0200

"quilt refresh" reports diff failures to the user. "quilt diff"
should do the same.
---
 quilt/refresh.in          |    1 -
 quilt/scripts/patchfns.in |    1 +
 test/faildiff.test        |    1 +
 3 files changed, 2 insertions(+), 1 deletion(-)

--- quilt.orig/test/faildiff.test       2016-09-15 14:02:37.690285842 +0200
+++ quilt/test/faildiff.test    2016-09-15 14:06:50.201806819 +0200
@@ -29,6 +29,7 @@ What happens on binary files?
        $ printf "\\003\\000\\001" > test.bin
        $ quilt diff -pab --no-index
        >~ (Files|Binary files) a/test\.bin and b/test\.bin differ
+       > Diff failed on file 'test.bin', aborting
        $ echo %{?}
        > 1
 
--- quilt.orig/quilt/scripts/patchfns.in        2016-09-15 14:05:29.624997948 
+0200
+++ quilt/quilt/scripts/patchfns.in     2016-09-15 14:06:50.202806829 +0200
@@ -759,6 +759,7 @@ diff_file()
        # Test the return value of diff, and propagate the error retcode if any
        if [ ${PIPESTATUS[0]} == 2 -o ${PIPESTATUS[1]} == 1 ]
        then
+               printf $"Diff failed on file '%s', aborting\n" "$new_file" >&2
                return 1
        fi
 }
--- quilt.orig/quilt/refresh.in 2016-09-15 14:02:37.690285842 +0200
+++ quilt/quilt/refresh.in      2016-09-15 14:06:50.202806829 +0200
@@ -232,7 +232,6 @@ do
        fi
        if ! diff_file "$file" "$old_file" "$new_file"
        then
-               printf $"Diff failed on file '%s', aborting\n" "$new_file" >&2
                die 1
        fi
 


-- 
Jean Delvare
SUSE L3 Support



reply via email to

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