Lines Matching refs:self

41   def RunStep(self):
42 if os.path.exists(self.Config("ALREADY_MERGING_SENTINEL_FILE")):
43 if self._options.force:
44 os.remove(self.Config("ALREADY_MERGING_SENTINEL_FILE"))
45 elif self._options.step == 0: # pragma: no cover
46 self.Die("A merge is already in progress")
47 open(self.Config("ALREADY_MERGING_SENTINEL_FILE"), "a").close()
49 self.InitialEnvironmentChecks(self.default_cwd)
50 if self._options.branch:
51 self["merge_to_branch"] = self._options.branch
53 self.Die("Please specify a branch to merge to")
55 self.CommonPrepare()
56 self.PrepareBranch()
62 def RunStep(self):
63 self.GitCreateBranch(self.Config("BRANCHNAME"),
64 self.vc.RemoteBranch(self["merge_to_branch"]))
70 def RunStep(self):
71 self["full_revision_list"] = list(OrderedDict.fromkeys(
72 self._options.revisions))
74 for revision in self["full_revision_list"]:
76 git_hashes = self.GitLog(reverse=True, format="%H",
78 branch=self.vc.RemoteMainBranch())
80 revision_title = self.GitLog(n=1, format="%s", git_hash=git_hash)
83 if git_hash in self["full_revision_list"]:
93 if self.Confirm("Automatically add corresponding ports (%s)?"
96 self["full_revision_list"].extend(port_revision_list)
102 def RunStep(self):
105 self["revision_list"] = ", ".join(self["full_revision_list"])
107 if not self["revision_list"]: # pragma: no cover
108 self.Die("Revision list is empty.")
114 "\n".join(action_text % s for s in self["full_revision_list"]),
118 for commit_hash in self["full_revision_list"]:
119 patch_merge_desc = self.GitLog(n=1, format="%s", git_hash=commit_hash)
123 for commit_hash in self["full_revision_list"]:
124 msg = self.GitLog(n=1, git_hash=commit_hash)
131 self["new_commit_msg"] = "".join(msg_pieces)
137 def RunStep(self):
138 for commit_hash in self["full_revision_list"]:
140 % (commit_hash, self["merge_to_branch"]))
141 patch = self.GitGetPatch(commit_hash)
142 TextToFile(patch, self.Config("TEMPORARY_PATCH_FILE"))
143 self.ApplyPatch(self.Config("TEMPORARY_PATCH_FILE"))
144 if self._options.patch:
145 self.ApplyPatch(self._options.patch)
151 def RunStep(self):
153 self.ReadAndPersistVersion()
159 def RunStep(self):
160 new_patch = str(int(self["patch"]) + 1)
161 if self.Confirm("Automatically increment V8_PATCH_LEVEL? (Saying 'n' will "
165 text = FileToText(os.path.join(self.default_cwd, VERSION_FILE))
169 TextToFile(text, os.path.join(self.default_cwd, VERSION_FILE))
171 self.Editor(os.path.join(self.default_cwd, VERSION_FILE))
172 self.ReadAndPersistVersion("new_")
173 self["version"] = "%s.%s.%s.%s" % (self["new_major"],
174 self["new_minor"],
175 self["new_build"],
176 self["new_patch"])
182 def RunStep(self):
184 self["commit_title"] = "Version %s (cherry-pick)" % self["version"]
185 self["new_commit_msg"] = "%s\n\n%s" % (self["commit_title"],
186 self["new_commit_msg"])
187 TextToFile(self["new_commit_msg"], self.Config("COMMITMSG_FILE"))
188 self.GitCommit(file_name=self.Config("COMMITMSG_FILE"))
194 def RunStep(self):
195 self.GitCheckout(self.Config("BRANCHNAME"))
196 self.WaitForLGTM()
197 self.GitPresubmit()
198 self.vc.CLLand()
204 def RunStep(self):
205 print("Creating tag %s" % self["version"])
206 self.vc.Tag(self["version"],
207 self.vc.RemoteBranch(self["merge_to_branch"]),
208 self["commit_title"])
214 def RunStep(self):
215 self.CommonCleanup()
217 print("version: %s" % self["version"])
218 print("branch: %s" % self["merge_to_branch"])
219 if self["revision_list"]:
220 print("patches: %s" % self["revision_list"])
224 def _Description(self):
228 def _PrepareOptions(self, parser):
241 def _ProcessOptions(self, options):
260 def _Config(self):
272 def _Steps(self):