Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: tools/push-to-trunk/auto_roll.py

Issue 540513002: Make auto_roll run with a pure git checkout. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/push-to-trunk/chromium_roll.py » ('j') | tools/push-to-trunk/git_recipes.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 json 7 import json
8 import os 8 import os
9 import sys 9 import sys
10 import urllib 10 import urllib
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 result = self.ReadURL(search_url, params, wait_plan=[5, 20]) 43 result = self.ReadURL(search_url, params, wait_plan=[5, 20])
44 if self.ContainsChromiumRoll(json.loads(result)["results"]): 44 if self.ContainsChromiumRoll(json.loads(result)["results"]):
45 print "Stop due to existing Chromium roll." 45 print "Stop due to existing Chromium roll."
46 return True 46 return True
47 47
48 48
49 class DetectLastPush(Step): 49 class DetectLastPush(Step):
50 MESSAGE = "Detect commit ID of the last push to trunk." 50 MESSAGE = "Detect commit ID of the last push to trunk."
51 51
52 def RunStep(self): 52 def RunStep(self):
53 push_hash = self.FindLastTrunkPush(include_patches=True) 53 push_hash = self.FindLastTrunkPush(
54 self["last_push"] = self.GitSVNFindSVNRev(push_hash) 54 branch="origin/master", include_patches=True)
55 self["last_push"] = self.GetCommitPositionNumber(push_hash)
55 56
56 57
57 class DetectLastRoll(Step): 58 class DetectLastRoll(Step):
58 MESSAGE = "Detect commit ID of the last Chromium roll." 59 MESSAGE = "Detect commit ID of the last Chromium roll."
59 60
60 def RunStep(self): 61 def RunStep(self):
61 # Interpret the DEPS file to retrieve the v8 revision. 62 # Interpret the DEPS file to retrieve the v8 revision.
62 Var = lambda var: '%s' 63 Var = lambda var: '%s'
63 exec(self.ReadURL(CR_DEPS_URL)) 64 exec(self.ReadURL(CR_DEPS_URL))
64 last_roll = vars['v8_revision'] 65 last_roll = vars['v8_revision']
65 if last_roll >= self["last_push"]: 66 # FIXME(machenbach): When rolling from bleeding edge and from trunk there
67 # be different commit numbers here. Better use version?
68 if int(last_roll) >= int(self["last_push"]):
66 print("There is no newer v8 revision than the one in Chromium (%s)." 69 print("There is no newer v8 revision than the one in Chromium (%s)."
67 % last_roll) 70 % last_roll)
68 return True 71 return True
69 72
70 73
71 class CheckClusterFuzz(Step): 74 class CheckClusterFuzz(Step):
72 MESSAGE = "Check ClusterFuzz api for new problems." 75 MESSAGE = "Check ClusterFuzz api for new problems."
73 76
74 def RunStep(self): 77 def RunStep(self):
75 if not os.path.exists(self.Config(CLUSTERFUZZ_API_KEY_FILE)): 78 if not os.path.exists(self.Config(CLUSTERFUZZ_API_KEY_FILE)):
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 CheckActiveRoll, 133 CheckActiveRoll,
131 DetectLastPush, 134 DetectLastPush,
132 DetectLastRoll, 135 DetectLastRoll,
133 CheckClusterFuzz, 136 CheckClusterFuzz,
134 RollChromium, 137 RollChromium,
135 ] 138 ]
136 139
137 140
138 if __name__ == "__main__": # pragma: no cover 141 if __name__ == "__main__": # pragma: no cover
139 sys.exit(AutoRoll(CONFIG).Run()) 142 sys.exit(AutoRoll(CONFIG).Run())
OLDNEW
« no previous file with comments | « no previous file | tools/push-to-trunk/chromium_roll.py » ('j') | tools/push-to-trunk/git_recipes.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698