OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # Copyright (C) 2008 Evan Martin <martine@danga.com> | 6 # Copyright (C) 2008 Evan Martin <martine@danga.com> |
7 | 7 |
8 """A git-command for integrating reviews on Rietveld and Gerrit.""" | 8 """A git-command for integrating reviews on Rietveld and Gerrit.""" |
9 | 9 |
10 from distutils.version import LooseVersion | 10 from distutils.version import LooseVersion |
(...skipping 2157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2168 url = data['revisions'][current_rev]['fetch']['http']['url'] | 2168 url = data['revisions'][current_rev]['fetch']['http']['url'] |
2169 return gerrit_util.GetChangeDescriptionFromGitiles(url, current_rev) | 2169 return gerrit_util.GetChangeDescriptionFromGitiles(url, current_rev) |
2170 | 2170 |
2171 def UpdateDescriptionRemote(self, description): | 2171 def UpdateDescriptionRemote(self, description): |
2172 # TODO(tandrii) | 2172 # TODO(tandrii) |
2173 raise NotImplementedError() | 2173 raise NotImplementedError() |
2174 | 2174 |
2175 def CloseIssue(self): | 2175 def CloseIssue(self): |
2176 gerrit_util.AbandonChange(self._GetGerritHost(), self.GetIssue(), msg='') | 2176 gerrit_util.AbandonChange(self._GetGerritHost(), self.GetIssue(), msg='') |
2177 | 2177 |
| 2178 def GetApprovingReviewers(self): |
| 2179 """Returns a list of reviewers approving the change. |
| 2180 |
| 2181 Note: not necessarily committers. |
| 2182 """ |
| 2183 raise NotImplementedError() |
| 2184 |
2178 def SubmitIssue(self, wait_for_merge=True): | 2185 def SubmitIssue(self, wait_for_merge=True): |
2179 gerrit_util.SubmitChange(self._GetGerritHost(), self.GetIssue(), | 2186 gerrit_util.SubmitChange(self._GetGerritHost(), self.GetIssue(), |
2180 wait_for_merge=wait_for_merge) | 2187 wait_for_merge=wait_for_merge) |
2181 | 2188 |
2182 def _GetChangeDetail(self, options=None, issue=None): | 2189 def _GetChangeDetail(self, options=None, issue=None): |
2183 options = options or [] | 2190 options = options or [] |
2184 issue = issue or self.GetIssue() | 2191 issue = issue or self.GetIssue() |
2185 assert issue, 'issue required to query Gerrit' | 2192 assert issue, 'issue required to query Gerrit' |
2186 return gerrit_util.GetChangeDetail(self._GetGerritHost(), str(issue), | 2193 return gerrit_util.GetChangeDetail(self._GetGerritHost(), str(issue), |
2187 options) | 2194 options) |
(...skipping 2642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4830 if __name__ == '__main__': | 4837 if __name__ == '__main__': |
4831 # These affect sys.stdout so do it outside of main() to simplify mocks in | 4838 # These affect sys.stdout so do it outside of main() to simplify mocks in |
4832 # unit testing. | 4839 # unit testing. |
4833 fix_encoding.fix_encoding() | 4840 fix_encoding.fix_encoding() |
4834 setup_color.init() | 4841 setup_color.init() |
4835 try: | 4842 try: |
4836 sys.exit(main(sys.argv[1:])) | 4843 sys.exit(main(sys.argv[1:])) |
4837 except KeyboardInterrupt: | 4844 except KeyboardInterrupt: |
4838 sys.stderr.write('interrupted\n') | 4845 sys.stderr.write('interrupted\n') |
4839 sys.exit(1) | 4846 sys.exit(1) |
OLD | NEW |