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

Side by Side Diff: tools/push-to-trunk/push_to_trunk.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 | « tools/push-to-trunk/merge_to_branch.py ('k') | tools/push-to-trunk/releases.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 urllib2 33 import urllib2
34 34
35 from common_includes import * 35 from common_includes import *
36 36
37 TRUNKBRANCH = "TRUNKBRANCH" 37 TRUNKBRANCH = "TRUNKBRANCH"
38 38
39 CONFIG = { 39 CONFIG = {
40 BRANCHNAME: "prepare-push", 40 BRANCHNAME: "prepare-push",
41 TRUNKBRANCH: "trunk-push", 41 TRUNKBRANCH: "trunk-push",
42 PERSISTFILE_BASENAME: "/tmp/v8-push-to-trunk-tempfile", 42 PERSISTFILE_BASENAME: "/tmp/v8-push-to-trunk-tempfile",
43 DOT_GIT_LOCATION: ".git",
44 VERSION_FILE: "src/version.cc", 43 VERSION_FILE: "src/version.cc",
45 CHANGELOG_FILE: "ChangeLog", 44 CHANGELOG_FILE: "ChangeLog",
46 CHANGELOG_ENTRY_FILE: "/tmp/v8-push-to-trunk-tempfile-changelog-entry", 45 CHANGELOG_ENTRY_FILE: "/tmp/v8-push-to-trunk-tempfile-changelog-entry",
47 PATCH_FILE: "/tmp/v8-push-to-trunk-tempfile-patch-file", 46 PATCH_FILE: "/tmp/v8-push-to-trunk-tempfile-patch-file",
48 COMMITMSG_FILE: "/tmp/v8-push-to-trunk-tempfile-commitmsg", 47 COMMITMSG_FILE: "/tmp/v8-push-to-trunk-tempfile-commitmsg",
49 } 48 }
50 49
51 PUSH_MESSAGE_SUFFIX = " (based on bleeding_edge revision r%d)" 50 PUSH_MESSAGE_SUFFIX = " (based on bleeding_edge revision r%d)"
52 PUSH_MESSAGE_RE = re.compile(r".* \(based on bleeding_edge revision r(\d+)\)$") 51 PUSH_MESSAGE_RE = re.compile(r".* \(based on bleeding_edge revision r(\d+)\)$")
53 52
54 53
55 class Preparation(Step): 54 class Preparation(Step):
56 MESSAGE = "Preparation." 55 MESSAGE = "Preparation."
57 56
58 def RunStep(self): 57 def RunStep(self):
59 self.InitialEnvironmentChecks() 58 self.InitialEnvironmentChecks(self.default_cwd)
60 self.CommonPrepare() 59 self.CommonPrepare()
61 60
62 if(self["current_branch"] == self.Config(TRUNKBRANCH) 61 if(self["current_branch"] == self.Config(TRUNKBRANCH)
63 or self["current_branch"] == self.Config(BRANCHNAME)): 62 or self["current_branch"] == self.Config(BRANCHNAME)):
64 print "Warning: Script started on branch %s" % self["current_branch"] 63 print "Warning: Script started on branch %s" % self["current_branch"]
65 64
66 self.PrepareBranch() 65 self.PrepareBranch()
67 self.DeleteBranch(self.Config(TRUNKBRANCH)) 66 self.DeleteBranch(self.Config(TRUNKBRANCH))
68 67
69 68
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 CommitTrunk, 458 CommitTrunk,
460 SanityCheck, 459 SanityCheck,
461 CommitSVN, 460 CommitSVN,
462 TagRevision, 461 TagRevision,
463 CleanUp, 462 CleanUp,
464 ] 463 ]
465 464
466 465
467 if __name__ == "__main__": # pragma: no cover 466 if __name__ == "__main__": # pragma: no cover
468 sys.exit(PushToTrunk(CONFIG).Run()) 467 sys.exit(PushToTrunk(CONFIG).Run())
OLDNEW
« no previous file with comments | « tools/push-to-trunk/merge_to_branch.py ('k') | tools/push-to-trunk/releases.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698