chiark / gitweb /
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 5b7e9d6315e45a2d01542149c316933d887e94d1..3b2fc75312088f23b548a660d687a892016b438f 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 d93f2eb412777085f918f9dd3434962ecb73febc..ebbff64953d6f153f22100179a22f9c33b71ff05 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]