X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/5dfb1afc61066532c8ae2b88be2dbafb31317ea1..6dd8fafabb5b8e266a85f13c8851ca8a66a1a405:/stgit/commands/clean.py diff --git a/stgit/commands/clean.py b/stgit/commands/clean.py index 8f5c606..d8bbe71 100644 --- a/stgit/commands/clean.py +++ b/stgit/commands/clean.py @@ -20,6 +20,7 @@ from optparse import OptionParser, make_option from stgit.commands.common import * from stgit.utils import * +from stgit.out import * from stgit import stack, git @@ -30,6 +31,7 @@ Delete the empty patches in the whole series or only those applied or unapplied. A patch is considered empty if the two commit objects representing its boundaries refer to the same tree object.""" +directory = DirectoryHasRepository() options = [make_option('-a', '--applied', help = 'delete the empty applied patches', action = 'store_true'), @@ -43,14 +45,11 @@ def __delete_empty(patches, applied): """ for p in patches: if crt_series.empty_patch(p): - print 'Deleting patch "%s"...' % p, - sys.stdout.flush() - + out.start('Deleting patch "%s"' % p) if applied and crt_series.patch_applied(p): crt_series.pop_patch(p) crt_series.delete_patch(p) - - print 'done' + out.done() elif applied and crt_series.patch_unapplied(p): crt_series.push_patch(p)