X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/blobdiff_plain/27ac2b7eee3cc39e29c470cd5b5889e93091d9be..6972fd6b0cc82580fb94b3388e4d4879f69b09a8:/stgit/commands/clean.py diff --git a/stgit/commands/clean.py b/stgit/commands/clean.py index 7b57526..4484ecd 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'), @@ -59,7 +61,7 @@ def func(parser, options, args): check_local_changes() check_conflicts() - check_head_top_equal() + check_head_top_equal(crt_series) if not (options.applied or options.unapplied): options.applied = options.unapplied = True @@ -72,4 +74,4 @@ def func(parser, options, args): unapplied = crt_series.get_unapplied() __delete_empty(unapplied, False) - print_crt_patch() + print_crt_patch(crt_series)