summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0dd3d1a)
With this patch, the 'clean' command only pops to the first empty
patch.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
-def __delete_empty(patches, push = False):
+def __delete_empty(patches, applied):
"""Delete the empty patches
"""
for p in patches:
if crt_series.empty_patch(p):
print 'Deleting patch "%s"...' % p,
sys.stdout.flush()
"""Delete the empty patches
"""
for p in patches:
if crt_series.empty_patch(p):
print 'Deleting patch "%s"...' % p,
sys.stdout.flush()
+
+ if applied and crt_series.patch_applied(p):
+ crt_series.pop_patch(p)
crt_series.delete_patch(p)
crt_series.delete_patch(p)
+ elif applied and crt_series.patch_unapplied(p):
crt_series.push_patch(p)
def func(parser, options, args):
crt_series.push_patch(p)
def func(parser, options, args):
if options.applied:
applied = crt_series.get_applied()
if options.applied:
applied = crt_series.get_applied()
- if applied != []:
- crt_series.pop_patch(applied[0])
__delete_empty(applied, True)
if options.unapplied:
__delete_empty(applied, True)
if options.unapplied: