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

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

Issue 693333002: Teach push script to commit with roll account. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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/common_includes.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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 print "Already pushed current lkgr %s" % last_push_be 98 print "Already pushed current lkgr %s" % last_push_be
99 return True 99 return True
100 100
101 101
102 class PushToCandidates(Step): 102 class PushToCandidates(Step):
103 MESSAGE = "Pushing to candidates if specified." 103 MESSAGE = "Pushing to candidates if specified."
104 104
105 def RunStep(self): 105 def RunStep(self):
106 print "Pushing lkgr %s to candidates." % self["lkgr"] 106 print "Pushing lkgr %s to candidates." % self["lkgr"]
107 107
108 args = [
109 "--author", self._options.author,
110 "--reviewer", self._options.reviewer,
111 "--revision", self["lkgr"],
112 "--force",
113 ]
114
115 if self._options.svn:
116 args.extend(["--svn", self._options.svn])
117 if self._options.svn_config:
118 args.extend(["--svn-config", self._options.svn_config])
119 if self._options.vc_interface:
120 args.extend(["--vc-interface", self._options.vc_interface])
121
108 # TODO(machenbach): Update the script before calling it. 122 # TODO(machenbach): Update the script before calling it.
109 if self._options.push: 123 if self._options.push:
110 self._side_effect_handler.Call( 124 self._side_effect_handler.Call(push_to_trunk.PushToTrunk().Run, args)
111 push_to_trunk.PushToTrunk().Run,
112 ["--author", self._options.author,
113 "--reviewer", self._options.reviewer,
114 "--revision", self["lkgr"],
115 "--force"])
116 125
117 126
118 class AutoPush(ScriptsBase): 127 class AutoPush(ScriptsBase):
119 def _PrepareOptions(self, parser): 128 def _PrepareOptions(self, parser):
120 parser.add_argument("-p", "--push", 129 parser.add_argument("-p", "--push",
121 help="Push to trunk. Dry run if unspecified.", 130 help="Push to trunk. Dry run if unspecified.",
122 default=False, action="store_true") 131 default=False, action="store_true")
123 132
124 def _ProcessOptions(self, options): 133 def _ProcessOptions(self, options):
125 if not options.author or not options.reviewer: # pragma: no cover 134 if not options.author or not options.reviewer: # pragma: no cover
(...skipping 14 matching lines...) Expand all
140 CheckAutoPushSettings, 149 CheckAutoPushSettings,
141 CheckTreeStatus, 150 CheckTreeStatus,
142 FetchLKGR, 151 FetchLKGR,
143 CheckLastPush, 152 CheckLastPush,
144 PushToCandidates, 153 PushToCandidates,
145 ] 154 ]
146 155
147 156
148 if __name__ == "__main__": # pragma: no cover 157 if __name__ == "__main__": # pragma: no cover
149 sys.exit(AutoPush().Run()) 158 sys.exit(AutoPush().Run())
OLDNEW
« no previous file with comments | « no previous file | tools/push-to-trunk/common_includes.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698