Allow local changes if the patch deleted is not current
authorCatalin Marinas <catalin.marinas@gmail.com>
Mon, 11 Jul 2005 17:45:40 +0000 (18:45 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Mon, 11 Jul 2005 17:45:40 +0000 (18:45 +0100)
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
ChangeLog
stgit/main.py

index 5b7e9d6..3b2fc75 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
 
        * stgit/main.py (export): Add --template option to use a different
        file as the export template rather than the default one
+       (delete): Check for local changes only of the current patch is
+       removed
 
 2005-07-09  Catalin Marinas  <catalin.marinas@gmail.com>
 
index d93f2eb..ebbff64 100644 (file)
@@ -363,9 +363,10 @@ def delete(parser, options, args):
     if len(args) != 1:
         parser.error('incorrect number of arguments')
 
-    __check_local_changes()
-    __check_conflicts()
-    __check_head_top_equal()
+    if args[0] == crt_series.get_current():
+        __check_local_changes()
+        __check_conflicts()
+        __check_head_top_equal()
 
     crt_series.delete_patch(args[0])
     print 'Patch "%s" successfully deleted' % args[0]