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)
20 for patch in qs.iterator():
21 patch.refresh_tag_counts()
23 if (i % 10) == 0 or i == count:
24 sys.stdout.write('%06d/%06d\r' % (i, count))
26 sys.stderr.write('\ndone\n')