OLD | NEW |
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 class Context(object): | 6 class Context(object): |
7 """Class to hold context about a the current code review and checkout.""" | 7 """Class to hold context about a the current code review and checkout.""" |
8 def __init__(self, rietveld, checkout, status, server_hooks_missing=False): | 8 def __init__(self, rietveld, checkout, status, check_for_reverts=False, |
| 9 server_hooks_missing=False): |
9 """ | 10 """ |
10 Args: | 11 Args: |
11 rietveld: Instance of rietveld.Rietveld. | 12 rietveld: Instance of rietveld.Rietveld. |
12 checkout: Instance of checkout.SvnCheckout | 13 checkout: Instance of checkout.SvnCheckout |
13 status: Instance of async_push.AsyncPush. | 14 status: Instance of async_push.AsyncPush. |
| 15 check_for_reverts: True if the project's CQ should check for reverted |
| 16 changes on Rietveld. |
14 server_hooks_missing: True if the project's SVN repository does not have | 17 server_hooks_missing: True if the project's SVN repository does not have |
15 server-side hooks configured. | 18 server-side hooks configured. |
16 """ | 19 """ |
17 self.rietveld = rietveld | 20 self.rietveld = rietveld |
18 self.checkout = checkout | 21 self.checkout = checkout |
19 self.status = status | 22 self.status = status |
| 23 self.check_for_reverts = check_for_reverts |
20 self.server_hooks_missing = server_hooks_missing | 24 self.server_hooks_missing = server_hooks_missing |
OLD | NEW |