Index: quilt/pop.in =================================================================== RCS file: /cvsroot/quilt/quilt/quilt/pop.in,v retrieving revision 1.29 diff -u -r1.29 pop.in --- quilt/pop.in 2 Feb 2005 00:32:48 -0000 1.29 +++ quilt/pop.in 21 Jun 2005 20:35:37 -0000 @@ -181,6 +181,13 @@ status=$? remove_from_db $patch rm -f $QUILT_PC/$patch~refresh + + if [ "$(shopt -s nullglob ; echo "$QUILT_PC/$patch/"*)" = "" ] + then + printf $"Patch %s appears to be empty, removed\n" \ + "$(print_patch $patch)" + status=0 + fi fi trap - SIGINT return $status Index: quilt/push.in =================================================================== RCS file: /cvsroot/quilt/quilt/quilt/push.in,v retrieving revision 1.34 diff -u -r1.34 push.in --- quilt/push.in 12 May 2005 13:03:59 -0000 1.34 +++ quilt/push.in 21 Jun 2005 20:35:37 -0000 @@ -91,6 +91,12 @@ local patch=$1 local patch_file=$(patch_file_name $patch) output + if ! [ -f $patch_file ] + then + printf $"Patch %s does not exist\n" "$patch_file" + return 0 + fi + if ! [ -s $patch_file ] then printf $"Patch %s appears to be empty\n" "$patch_file"