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

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

Issue 585893002: Refactoring: Use fake cwd in release script tests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove git location legacy. 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/auto_tag.py » ('j') | no next file with comments »
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 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 22 matching lines...) Expand all
33 import sys 33 import sys
34 import urllib 34 import urllib
35 35
36 from common_includes import * 36 from common_includes import *
37 import push_to_trunk 37 import push_to_trunk
38 38
39 SETTINGS_LOCATION = "SETTINGS_LOCATION" 39 SETTINGS_LOCATION = "SETTINGS_LOCATION"
40 40
41 CONFIG = { 41 CONFIG = {
42 PERSISTFILE_BASENAME: "/tmp/v8-auto-push-tempfile", 42 PERSISTFILE_BASENAME: "/tmp/v8-auto-push-tempfile",
43 DOT_GIT_LOCATION: ".git",
44 SETTINGS_LOCATION: "~/.auto-roll", 43 SETTINGS_LOCATION: "~/.auto-roll",
45 } 44 }
46 45
47 PUSH_MESSAGE_RE = re.compile(r".* \(based on bleeding_edge revision r(\d+)\)$") 46 PUSH_MESSAGE_RE = re.compile(r".* \(based on bleeding_edge revision r(\d+)\)$")
48 47
49 48
50 class Preparation(Step): 49 class Preparation(Step):
51 MESSAGE = "Preparation." 50 MESSAGE = "Preparation."
52 51
53 def RunStep(self): 52 def RunStep(self):
54 self.InitialEnvironmentChecks() 53 self.InitialEnvironmentChecks(self.default_cwd)
55 self.CommonPrepare() 54 self.CommonPrepare()
56 55
57 56
58 class CheckAutoPushSettings(Step): 57 class CheckAutoPushSettings(Step):
59 MESSAGE = "Checking settings file." 58 MESSAGE = "Checking settings file."
60 59
61 def RunStep(self): 60 def RunStep(self):
62 settings_file = os.path.realpath(self.Config(SETTINGS_LOCATION)) 61 settings_file = os.path.realpath(self.Config(SETTINGS_LOCATION))
63 if os.path.exists(settings_file): 62 if os.path.exists(settings_file):
64 settings_dict = json.loads(FileToText(settings_file)) 63 settings_dict = json.loads(FileToText(settings_file))
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 CheckAutoPushSettings, 146 CheckAutoPushSettings,
148 CheckTreeStatus, 147 CheckTreeStatus,
149 FetchLKGR, 148 FetchLKGR,
150 CheckLastPush, 149 CheckLastPush,
151 PushToTrunk, 150 PushToTrunk,
152 ] 151 ]
153 152
154 153
155 if __name__ == "__main__": # pragma: no cover 154 if __name__ == "__main__": # pragma: no cover
156 sys.exit(AutoPush(CONFIG).Run()) 155 sys.exit(AutoPush(CONFIG).Run())
OLDNEW
« no previous file with comments | « no previous file | tools/push-to-trunk/auto_tag.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698