OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2013 the V8 project authors. All rights reserved. | 2 # Copyright 2013 the V8 project authors. All rights reserved. |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following | 10 # copyright notice, this list of conditions and the following |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 if re.search(r"nopush|no push", self["tree_message"], flags=re.I): | 68 if re.search(r"nopush|no push", self["tree_message"], flags=re.I): |
69 self.Die("Push to trunk disabled by tree state: %s" | 69 self.Die("Push to trunk disabled by tree state: %s" |
70 % self["tree_message"]) | 70 % self["tree_message"]) |
71 | 71 |
72 | 72 |
73 class FetchCandidate(Step): | 73 class FetchCandidate(Step): |
74 MESSAGE = "Fetching V8 roll candidate ref." | 74 MESSAGE = "Fetching V8 roll candidate ref." |
75 | 75 |
76 def RunStep(self): | 76 def RunStep(self): |
77 self.Git("fetch origin +refs/heads/candidate:refs/heads/candidate") | 77 self.Git("fetch origin +refs/heads/candidate:refs/heads/candidate") |
78 self["candidate"] = self.Git("show-ref -s refs/heads/candidate") | 78 self["candidate"] = self.Git("show-ref -s refs/heads/candidate").strip() |
79 | 79 |
80 | 80 |
81 class CheckLastPush(Step): | 81 class CheckLastPush(Step): |
82 MESSAGE = "Checking last V8 push to trunk." | 82 MESSAGE = "Checking last V8 push to trunk." |
83 | 83 |
84 def RunStep(self): | 84 def RunStep(self): |
85 last_push = self.FindLastTrunkPush() | 85 last_push = self.FindLastTrunkPush() |
86 | 86 |
87 # Retrieve the bleeding edge revision of the last push from the text in | 87 # Retrieve the bleeding edge revision of the last push from the text in |
88 # the push commit message. | 88 # the push commit message. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 CheckAutoPushSettings, | 144 CheckAutoPushSettings, |
145 CheckTreeStatus, | 145 CheckTreeStatus, |
146 FetchCandidate, | 146 FetchCandidate, |
147 CheckLastPush, | 147 CheckLastPush, |
148 PushToCandidates, | 148 PushToCandidates, |
149 ] | 149 ] |
150 | 150 |
151 | 151 |
152 if __name__ == "__main__": # pragma: no cover | 152 if __name__ == "__main__": # pragma: no cover |
153 sys.exit(AutoPush().Run()) | 153 sys.exit(AutoPush().Run()) |
OLD | NEW |