Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 self.InitialEnvironmentChecks(self.default_cwd) | 44 self.InitialEnvironmentChecks(self.default_cwd) |
| 45 self.CommonPrepare() | 45 self.CommonPrepare() |
| 46 | 46 |
| 47 if(self["current_branch"] == self.Config("TRUNKBRANCH") | 47 if(self["current_branch"] == self.Config("TRUNKBRANCH") |
| 48 or self["current_branch"] == self.Config("BRANCHNAME")): | 48 or self["current_branch"] == self.Config("BRANCHNAME")): |
| 49 print "Warning: Script started on branch %s" % self["current_branch"] | 49 print "Warning: Script started on branch %s" % self["current_branch"] |
| 50 | 50 |
| 51 self.PrepareBranch() | 51 self.PrepareBranch() |
| 52 self.DeleteBranch(self.Config("TRUNKBRANCH")) | 52 self.DeleteBranch(self.Config("TRUNKBRANCH")) |
| 53 | 53 |
| 54 # Allow directly pushing to candidates. | |
| 55 if not self.Git("config --get remote.origin.push").strip(): | |
| 56 self.Git("config --add remote.origin.push " | |
| 57 "refs/remotes/origin/candidates:refs/pending/heads/candidates") | |
|
tandrii(chromium)
2014/11/13 13:18:50
yeah :(
| |
| 58 | |
| 59 | 54 |
| 60 class FreshBranch(Step): | 55 class FreshBranch(Step): |
| 61 MESSAGE = "Create a fresh branch." | 56 MESSAGE = "Create a fresh branch." |
| 62 | 57 |
| 63 def RunStep(self): | 58 def RunStep(self): |
| 64 self.GitCreateBranch(self.Config("BRANCHNAME"), | 59 self.GitCreateBranch(self.Config("BRANCHNAME"), |
| 65 self.vc.RemoteMasterBranch()) | 60 self.vc.RemoteMasterBranch()) |
| 66 | 61 |
| 67 | 62 |
| 68 class PreparePushRevision(Step): | 63 class PreparePushRevision(Step): |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 348 if not self.Confirm("Please check if your local checkout is sane: Inspect " | 343 if not self.Confirm("Please check if your local checkout is sane: Inspect " |
| 349 "%s, compile, run tests. Do you want to commit this new trunk " | 344 "%s, compile, run tests. Do you want to commit this new trunk " |
| 350 "revision to the repository?" % VERSION_FILE): | 345 "revision to the repository?" % VERSION_FILE): |
| 351 self.Die("Execution canceled.") # pragma: no cover | 346 self.Die("Execution canceled.") # pragma: no cover |
| 352 | 347 |
| 353 | 348 |
| 354 class Land(Step): | 349 class Land(Step): |
| 355 MESSAGE = "Land the patch." | 350 MESSAGE = "Land the patch." |
| 356 | 351 |
| 357 def RunStep(self): | 352 def RunStep(self): |
| 358 self.vc.Land() | 353 self.vc.CLLand() |
| 359 | 354 |
| 360 | 355 |
| 361 class TagRevision(Step): | 356 class TagRevision(Step): |
| 362 MESSAGE = "Tag the new revision." | 357 MESSAGE = "Tag the new revision." |
| 363 | 358 |
| 364 def RunStep(self): | 359 def RunStep(self): |
| 365 self.vc.Tag( | 360 self.vc.Tag( |
| 366 self["version"], self.vc.RemoteCandidateBranch(), self["commit_title"]) | 361 self["version"], self.vc.RemoteCandidateBranch(), self["commit_title"]) |
| 367 | 362 |
| 368 | 363 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 437 CommitTrunk, | 432 CommitTrunk, |
| 438 SanityCheck, | 433 SanityCheck, |
| 439 Land, | 434 Land, |
| 440 TagRevision, | 435 TagRevision, |
| 441 CleanUp, | 436 CleanUp, |
| 442 ] | 437 ] |
| 443 | 438 |
| 444 | 439 |
| 445 if __name__ == "__main__": # pragma: no cover | 440 if __name__ == "__main__": # pragma: no cover |
| 446 sys.exit(PushToTrunk().Run()) | 441 sys.exit(PushToTrunk().Run()) |
| OLD | NEW |