quilt-dev
[Top][All Lists]
Advanced

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

[Quilt-dev] Fix quilt pop behaviour with empty patch


From: Arnaud Patard
Subject: [Quilt-dev] Fix quilt pop behaviour with empty patch
Date: Tue, 25 Apr 2006 23:33:31 +0200

Hi,

When you create a new patch and then pop it, quilt is detecting that the
patch is empty. This behaviour is fine except that quilt doesn't remove
the .pc/$patch directory. So, if you delete the empty patch, you'll
still have the .pc/$patch.

The following two patches are a fix for this and a test case.

Regards,
Arnaud

Index: quilt-0.45/quilt/pop.in
===================================================================
--- quilt-0.45.orig/quilt/pop.in
+++ quilt-0.45/quilt/pop.in
@@ -164,6 +164,7 @@ remove_patch()
                then
                        printf $"Patch %s appears to be empty, removing\n" \
                               "$(print_patch $patch)"
+                       rm -rf $QUILT_PC/$patch/
                        status=0
                else
                        printf $"Removing patch %s\n" "$(print_patch $patch)"
Index: quilt-0.45/test/pop_empty_patch.test
===================================================================
--- /dev/null
+++ quilt-0.45/test/pop_empty_patch.test
@@ -0,0 +1,20 @@
+       $ mkdir toto
+       $ cd toto
+       $ mkdir patches
+       $ quilt new toto.patch
+       > Patch %{P}toto.patch is now on top
+
+       $ quilt pop
+       > Patch %{P}toto.patch appears to be empty, removing
+       > 
+       > No patches applied
+
+       $ quilt delete toto.patch
+       > Removed patch %{P}toto.patch
+
+       $ quilt new titi.patch
+       > Patch %{P}titi.patch is now on top
+
+       $ quilt rename toto.patch
+       > Patch %{P}titi.patch renamed to %{P}toto.patch
+

reply via email to

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