  * Make sure that quilt returns 2 when there is nothing to do so that
    patchsys-quilt.mk works again. Upstream regression since 0.33.
    (Closes: #358792).

Upstream status: Submitted 060427

---
 quilt/push.in             |    2 +-
 quilt/scripts/patchfns.in |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

Index: b/quilt/push.in
===================================================================
--- a/quilt/push.in
+++ b/quilt/push.in
@@ -340,7 +340,7 @@
 	[ -z "$opt_all" ] && number=1
 fi
 
-stop_at_patch=$(find_unapplied_patch "$stop_at_patch") || exit 1
+stop_at_patch=$(find_unapplied_patch "$stop_at_patch") || exit $?
 
 [ -n "$opt_quiet" ] && silent=-s
 [ -z "$opt_verbose" ] && silent_unless_verbose=-s
Index: b/quilt/scripts/patchfns.in
===================================================================
--- a/quilt/scripts/patchfns.in
+++ b/quilt/scripts/patchfns.in
@@ -481,7 +481,7 @@
 	if [ -z "$patch" ]
 	then
 		printf $"No patches in series\n" >&2
-		return 1
+		return 2
 	fi
 
 	echo "$patch"
@@ -592,7 +592,7 @@
 	        then
 			printf $"Patch %s is currently applied\n" \
 				"$(print_patch $patch)" >&2
-               		return 1
+               		return 2
 	        fi
 		echo "$patch"
 	else
@@ -602,13 +602,13 @@
 		then
 			patch_after "$start"
 		else
-			find_first_patch || return 1
+			find_first_patch || return 2
 		fi
 		if [ $? -ne 0 ]
 		then
 			printf $"File series fully applied, ends at patch %s\n" \
 				"$(print_patch $start)" >&2
-			return 1
+			return 2
 		fi
 	fi
 }
