| Index: commit-queue/commit_queue.py
|
| ===================================================================
|
| --- commit-queue/commit_queue.py (revision 217622)
|
| +++ commit-queue/commit_queue.py (working copy)
|
| @@ -267,10 +267,9 @@
|
|
|
| db_path = os.path.join(work_dir, pc.context.checkout.project_name + '.json')
|
| if os.path.isfile(db_path):
|
| - try:
|
| - pc.load(db_path)
|
| - except ValueError:
|
| - os.remove(db_path)
|
| + # Do not load state, and in fact remove it when seen. This will hopefully
|
| + # help avoid issues with CQ committing changes without verification.
|
| + os.remove(db_path)
|
|
|
| sig_handler.installHandlers(
|
| signal.SIGINT,
|
| @@ -299,10 +298,8 @@
|
| pc.scan_results()
|
| if sig_handler.getTriggeredSignals():
|
| raise KeyboardInterrupt()
|
| - # Save the db at each loop. The db can easily be in the 1mb range so
|
| - # it's slowing down the CQ a tad but it in the 100ms range even for that
|
| - # size.
|
| - pc.save(db_path)
|
| + # We'd save the state here but its suspected to cause CQ to land changes
|
| + # without verification.
|
|
|
| # More than a second to wait and due to sync.
|
| now = time.time()
|
| @@ -337,10 +334,9 @@
|
| sys.stdout.flush()
|
| next_loop = time.time() + options.poll_interval
|
| finally:
|
| - print >> sys.stderr, 'Saving db... '
|
| - pc.save(db_path)
|
| + # We'd save the state here but its suspected to cause CQ to land changes
|
| + # without verification.
|
| pc.close()
|
| - print >> sys.stderr, 'Done! '
|
| except KeyboardInterrupt as e:
|
| print 'Bye bye'
|
| # 23 is an arbitrary value to signal loop.sh that it must stop looping.
|
|
|