| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 the V8 project authors. All rights reserved. | 2 # Copyright 2014 the V8 project 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 import argparse | 6 import argparse |
| 7 import sys | 7 import sys |
| 8 | 8 |
| 9 from common_includes import * | 9 from common_includes import * |
| 10 | 10 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 MESSAGE = "Calculate the revision to tag." | 110 MESSAGE = "Calculate the revision to tag." |
| 111 | 111 |
| 112 def LastLKGR(self, min_rev, max_rev): | 112 def LastLKGR(self, min_rev, max_rev): |
| 113 """Finds the newest lkgr between min_rev (inclusive) and max_rev | 113 """Finds the newest lkgr between min_rev (inclusive) and max_rev |
| 114 (exclusive). | 114 (exclusive). |
| 115 """ | 115 """ |
| 116 for lkgr in self["lkgrs"]: | 116 for lkgr in self["lkgrs"]: |
| 117 # LKGRs are reverse sorted. | 117 # LKGRs are reverse sorted. |
| 118 if int(min_rev) <= int(lkgr) and int(lkgr) < int(max_rev): | 118 if int(min_rev) <= int(lkgr) and int(lkgr) < int(max_rev): |
| 119 return lkgr | 119 return lkgr |
| 120 return None | 120 return None |
| 121 | 121 |
| 122 def RunStep(self): | 122 def RunStep(self): |
| 123 # Get the lkgr after the tag candidate and before the next tag candidate. | 123 # Get the lkgr after the tag candidate and before the next tag candidate. |
| 124 candidate_svn = self.GitSVNFindSVNRev(self["candidate"]) | 124 candidate_svn = self.GitSVNFindSVNRev(self["candidate"]) |
| 125 if self["next"]: | 125 if self["next"]: |
| 126 next_svn = self.GitSVNFindSVNRev(self["next"]) | 126 next_svn = self.GitSVNFindSVNRev(self["next"]) |
| 127 else: | 127 else: |
| 128 # Don't include the version change commit itself if there is no upper | 128 # Don't include the version change commit itself if there is no upper |
| 129 # limit yet. | 129 # limit yet. |
| 130 candidate_svn = str(int(candidate_svn) + 1) | 130 candidate_svn = str(int(candidate_svn) + 1) |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 GetOldestUntaggedVersion, | 191 GetOldestUntaggedVersion, |
| 192 GetLKGRs, | 192 GetLKGRs, |
| 193 CalculateTagRevision, | 193 CalculateTagRevision, |
| 194 MakeTag, | 194 MakeTag, |
| 195 CleanUp, | 195 CleanUp, |
| 196 ] | 196 ] |
| 197 | 197 |
| 198 | 198 |
| 199 if __name__ == "__main__": # pragma: no cover | 199 if __name__ == "__main__": # pragma: no cover |
| 200 sys.exit(AutoTag(CONFIG).Run()) | 200 sys.exit(AutoTag(CONFIG).Run()) |
| OLD | NEW |