2 from django.core.management.base import BaseCommand, CommandError
3 from patchwork.models import Patch
6 class Command(BaseCommand):
7 help = 'Update the tag (Ack/Review/Test) counts on existing patches'
8 args = '[<patch_id>...]'
10 def handle(self, *args, **options):
15 qs = qs.filter(id__in=args)
22 for patch in qs.iterator():
23 patch.refresh_tag_counts()
25 if (i % 10) == 0 or i == count:
26 sys.stdout.write('%06d/%06d\r' % (i, count))
28 sys.stderr.write('\ndone\n')