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

Side by Side Diff: tools/push-to-trunk/chromium_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
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 os 7 import os
8 import sys 8 import sys
9 9
10 from common_includes import * 10 from common_includes import *
11 11
12 DEPS_FILE = "DEPS_FILE" 12 DEPS_FILE = "DEPS_FILE"
13 CHROMIUM = "CHROMIUM" 13 CHROMIUM = "CHROMIUM"
14 14
15 CONFIG = { 15 CONFIG = {
16 PERSISTFILE_BASENAME: "/tmp/v8-chromium-roll-tempfile", 16 PERSISTFILE_BASENAME: "/tmp/v8-chromium-roll-tempfile",
17 DOT_GIT_LOCATION: ".git", 17 DOT_GIT_LOCATION: ".git",
18 DEPS_FILE: "DEPS", 18 DEPS_FILE: "DEPS",
19 } 19 }
20 20
21 21
22 class Preparation(Step): 22 class Preparation(Step):
23 MESSAGE = "Preparation." 23 MESSAGE = "Preparation."
24 24
25 def RunStep(self): 25 def RunStep(self):
26 self.CommonPrepare() 26 # Update v8 remote tracking branches.
27 self.GitFetchOrigin()
27 28
28 29
29 class DetectLastPush(Step): 30 class DetectLastPush(Step):
30 MESSAGE = "Detect commit ID of last push to trunk." 31 MESSAGE = "Detect commit ID of last push to trunk."
31 32
32 def RunStep(self): 33 def RunStep(self):
33 self["last_push"] = self._options.last_push or self.FindLastTrunkPush( 34 self["last_push"] = self._options.last_push or self.FindLastTrunkPush(
34 include_patches=True) 35 branch="origin/master", include_patches=True)
35 self["trunk_revision"] = self.GitSVNFindSVNRev(self["last_push"]) 36 self["trunk_revision"] = self.GetCommitPositionNumber(self["last_push"])
36 self["push_title"] = self.GitLog(n=1, format="%s", 37 self["push_title"] = self.GitLog(n=1, format="%s",
37 git_hash=self["last_push"]) 38 git_hash=self["last_push"])
38 39
39 40
40 class SwitchChromium(Step): 41 class SwitchChromium(Step):
41 MESSAGE = "Switch to Chromium checkout." 42 MESSAGE = "Switch to Chromium checkout."
42 43
43 def RunStep(self): 44 def RunStep(self):
44 self["v8_path"] = os.getcwd() 45 self["v8_path"] = os.getcwd()
45 os.chdir(self._options.chromium) 46 os.chdir(self._options.chromium)
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 SwitchChromium, 148 SwitchChromium,
148 UpdateChromiumCheckout, 149 UpdateChromiumCheckout,
149 UploadCL, 150 UploadCL,
150 SwitchV8, 151 SwitchV8,
151 CleanUp, 152 CleanUp,
152 ] 153 ]
153 154
154 155
155 if __name__ == "__main__": # pragma: no cover 156 if __name__ == "__main__": # pragma: no cover
156 sys.exit(ChromiumRoll(CONFIG).Run()) 157 sys.exit(ChromiumRoll(CONFIG).Run())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698