summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2008-09-10 12:02:50 +1000
committerJeremy Kerr <jk@ozlabs.org>2008-09-10 12:02:50 +1000
commita2d3b37e2fb9255486cdfdab13646cc9814eef97 (patch)
tree37f69a73d62bfef81263a145eab45ea7c8300c79 /apps
parentd075be0a249133942434c8ea1f936ec9b055327a (diff)
downloadpatchwork-a2d3b37e2fb9255486cdfdab13646cc9814eef97.tar.bz2
patchwork-a2d3b37e2fb9255486cdfdab13646cc9814eef97.tar.xz
Allow rehash for specific patches
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps')
-rwxr-xr-xapps/patchwork/bin/rehash.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/patchwork/bin/rehash.py b/apps/patchwork/bin/rehash.py
index 1b3e3e9..92cfb20 100755
--- a/apps/patchwork/bin/rehash.py
+++ b/apps/patchwork/bin/rehash.py
@@ -20,9 +20,15 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
from patchwork.models import Patch
+import sys
if __name__ == '__main__':
- for patch in Patch.objects.all():
+ if len(sys.argv) > 1:
+ patches = Patch.objects.filter(id__in = sys.argv[1:])
+ else:
+ patches = Patch.objects.all()
+
+ for patch in patches:
print patch.id, patch.name
patch.hash = None
patch.save()