Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1433)

Unified Diff: commit-queue/tools/watch.py

Issue 135363007: Delete public commit queue to avoid confusion after move to internal repo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « commit-queue/tools/stats.py ('k') | commit-queue/verification/authors_white_list.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: commit-queue/tools/watch.py
===================================================================
--- commit-queue/tools/watch.py (revision 249146)
+++ commit-queue/tools/watch.py (working copy)
@@ -1,67 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-"""Watch for rietveld issues with the commit bit set but no activity."""
-
-import datetime
-import logging
-import optparse
-import os
-import re
-import sys
-import time
-
-sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-
-import find_depot_tools # pylint: disable=W0611
-import breakpad
-import rietveld
-
-
-def seconds(td):
- return td.seconds + td.days * 24 * 3600
-
-
-def to_epoch(date_str):
- dt = datetime.datetime(*map(int, re.split('[^\d]', date_str)[:-1]))
- return seconds(dt - datetime.datetime(1970, 1, 1))
-
-
-def main():
- parser = optparse.OptionParser(
- description=sys.modules['__main__'].__doc__)
- parser.add_option('-d', '--delay', default=3*60*60, type='int')
- parser.add_option('-u', '--user')
- parser.add_option('-v', '--verbose', action='store_true')
- options, args = parser.parse_args(None)
- if options.verbose:
- logging.basicConfig(level=logging.DEBUG)
- else:
- logging.basicConfig(level=logging.ERROR)
- if len(args) != 1:
- parser.error('Need 1 arg')
-
- url = args[0].rstrip('/') + '/'
- if not 'http' in url:
- url = 'http://' + url
- obj = rietveld.Rietveld(args[0], options.user, None)
- notified = []
- while True:
- now = time.time()
- earliest = now - options.delay
- for issue in obj.search(commit='1', closed='2'):
- print '%d' % issue['issue']
- if issue['issue'] in notified:
- continue
- if (not issue['base_url'] or
- to_epoch(issue['modified']) < earliest):
- data = ['%s%d' % (url, issue['issue']), issue['base_url']]
- breakpad.SendStack(str(now), data)
- notified.append(issue['issue'])
- time.sleep(5*60)
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main())
« no previous file with comments | « commit-queue/tools/stats.py ('k') | commit-queue/verification/authors_white_list.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698