Switch release scripts to new git workflow.

BUG=410721
TBR=tandrii@chromium.org

Review URL: https://codereview.chromium.org/676713003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a280b89b
...@@ -868,7 +868,7 @@ class ScriptsBase(object): ...@@ -868,7 +868,7 @@ class ScriptsBase(object):
return None return None
if not options.vc_interface: if not options.vc_interface:
options.vc_interface = "git_svn" options.vc_interface = "git_read_svn_write"
return options return options
def RunSteps(self, step_classes, args=None): def RunSteps(self, step_classes, args=None):
......
...@@ -446,6 +446,7 @@ class ScriptTest(unittest.TestCase): ...@@ -446,6 +446,7 @@ class ScriptTest(unittest.TestCase):
self.Expect([ self.Expect([
Cmd("git status -s -uno", ""), Cmd("git status -s -uno", ""),
Cmd("git status -s -b -uno", "## some_branch"), Cmd("git status -s -b -uno", "## some_branch"),
Cmd("git fetch", ""),
Cmd("git svn fetch", ""), Cmd("git svn fetch", ""),
Cmd("git branch", " branch1\n* %s" % TEST_CONFIG["BRANCHNAME"]), Cmd("git branch", " branch1\n* %s" % TEST_CONFIG["BRANCHNAME"]),
RL("Y"), RL("Y"),
...@@ -459,6 +460,7 @@ class ScriptTest(unittest.TestCase): ...@@ -459,6 +460,7 @@ class ScriptTest(unittest.TestCase):
self.Expect([ self.Expect([
Cmd("git status -s -uno", ""), Cmd("git status -s -uno", ""),
Cmd("git status -s -b -uno", "## some_branch"), Cmd("git status -s -b -uno", "## some_branch"),
Cmd("git fetch", ""),
Cmd("git svn fetch", ""), Cmd("git svn fetch", ""),
Cmd("git branch", " branch1\n* %s" % TEST_CONFIG["BRANCHNAME"]), Cmd("git branch", " branch1\n* %s" % TEST_CONFIG["BRANCHNAME"]),
RL("n"), RL("n"),
...@@ -471,6 +473,7 @@ class ScriptTest(unittest.TestCase): ...@@ -471,6 +473,7 @@ class ScriptTest(unittest.TestCase):
self.Expect([ self.Expect([
Cmd("git status -s -uno", ""), Cmd("git status -s -uno", ""),
Cmd("git status -s -b -uno", "## some_branch"), Cmd("git status -s -b -uno", "## some_branch"),
Cmd("git fetch", ""),
Cmd("git svn fetch", ""), Cmd("git svn fetch", ""),
Cmd("git branch", " branch1\n* %s" % TEST_CONFIG["BRANCHNAME"]), Cmd("git branch", " branch1\n* %s" % TEST_CONFIG["BRANCHNAME"]),
RL("Y"), RL("Y"),
...@@ -628,7 +631,7 @@ class ScriptTest(unittest.TestCase): ...@@ -628,7 +631,7 @@ class ScriptTest(unittest.TestCase):
self.Expect([ self.Expect([
Cmd("git checkout -f hash1 -- src/version.cc", ""), Cmd("git checkout -f hash1 -- src/version.cc", ""),
Cmd("git checkout -f svn/bleeding_edge -- src/version.cc", Cmd("git checkout -f origin/master -- src/version.cc",
"", cb=lambda: self.WriteFakeVersionFile(22, 6)), "", cb=lambda: self.WriteFakeVersionFile(22, 6)),
RL("Y"), # Increment build number. RL("Y"), # Increment build number.
]) ])
...@@ -646,7 +649,7 @@ class ScriptTest(unittest.TestCase): ...@@ -646,7 +649,7 @@ class ScriptTest(unittest.TestCase):
f.write(change_log) f.write(change_log)
self.Expect([ self.Expect([
Cmd("git diff svn/trunk hash1", "patch content"), Cmd("git diff origin/candidates hash1", "patch content"),
Cmd("git svn find-rev hash1", "123455\n"), Cmd("git svn find-rev hash1", "123455\n"),
]) ])
...@@ -818,7 +821,8 @@ Performance and stability improvements on all platforms.""", commit) ...@@ -818,7 +821,8 @@ Performance and stability improvements on all platforms.""", commit)
] ]
self.Expect(expectations) self.Expect(expectations)
args = ["-a", "author@chromium.org", "--revision", "123455"] args = ["-a", "author@chromium.org", "--revision", "123455",
"--vc-interface", "git_svn",]
if force: args.append("-f") if force: args.append("-f")
if manual: args.append("-m") if manual: args.append("-m")
else: args += ["-r", "reviewer@chromium.org"] else: args += ["-r", "reviewer@chromium.org"]
...@@ -1042,7 +1046,7 @@ def get_list(): ...@@ -1042,7 +1046,7 @@ def get_list():
self.Expect([ self.Expect([
Cmd(("git log -1 --format=%H --grep=" Cmd(("git log -1 --format=%H --grep="
"\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\" " "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\" "
"svn/trunk"), "hash2\n"), "origin/candidates"), "hash2\n"),
Cmd("git log -1 --format=%s hash2", Cmd("git log -1 --format=%s hash2",
"Version 3.4.5 (based on bleeding_edge revision r99)\n"), "Version 3.4.5 (based on bleeding_edge revision r99)\n"),
]) ])
...@@ -1060,6 +1064,7 @@ def get_list(): ...@@ -1060,6 +1064,7 @@ def get_list():
self.Expect([ self.Expect([
Cmd("git status -s -uno", ""), Cmd("git status -s -uno", ""),
Cmd("git status -s -b -uno", "## some_branch\n"), Cmd("git status -s -b -uno", "## some_branch\n"),
Cmd("git fetch", ""),
Cmd("git svn fetch", ""), Cmd("git svn fetch", ""),
URL("https://v8-status.appspot.com/current?format=json", URL("https://v8-status.appspot.com/current?format=json",
"{\"message\": \"Tree is throttled\"}"), "{\"message\": \"Tree is throttled\"}"),
...@@ -1067,7 +1072,7 @@ def get_list(): ...@@ -1067,7 +1072,7 @@ def get_list():
URL("https://v8-status.appspot.com/lkgr", "100"), URL("https://v8-status.appspot.com/lkgr", "100"),
Cmd(("git log -1 --format=%H --grep=\"" Cmd(("git log -1 --format=%H --grep=\""
"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\"" "^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\""
" svn/trunk"), "push_hash\n"), " origin/candidates"), "push_hash\n"),
Cmd("git log -1 --format=%s push_hash", Cmd("git log -1 --format=%s push_hash",
"Version 3.4.5 (based on bleeding_edge revision r79)\n"), "Version 3.4.5 (based on bleeding_edge revision r79)\n"),
]) ])
...@@ -1088,6 +1093,7 @@ def get_list(): ...@@ -1088,6 +1093,7 @@ def get_list():
self.Expect([ self.Expect([
Cmd("git status -s -uno", ""), Cmd("git status -s -uno", ""),
Cmd("git status -s -b -uno", "## some_branch\n"), Cmd("git status -s -b -uno", "## some_branch\n"),
Cmd("git fetch", ""),
Cmd("git svn fetch", ""), Cmd("git svn fetch", ""),
]) ])
...@@ -1102,6 +1108,7 @@ def get_list(): ...@@ -1102,6 +1108,7 @@ def get_list():
self.Expect([ self.Expect([
Cmd("git status -s -uno", ""), Cmd("git status -s -uno", ""),
Cmd("git status -s -b -uno", "## some_branch\n"), Cmd("git status -s -b -uno", "## some_branch\n"),
Cmd("git fetch", ""),
Cmd("git svn fetch", ""), Cmd("git svn fetch", ""),
URL("https://v8-status.appspot.com/current?format=json", URL("https://v8-status.appspot.com/current?format=json",
"{\"message\": \"Tree is throttled (no push)\"}"), "{\"message\": \"Tree is throttled (no push)\"}"),
...@@ -1767,58 +1774,6 @@ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3456 0039-1c4b ...@@ -1767,58 +1774,6 @@ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3456 0039-1c4b
"--svn", svn_root, "--svn", svn_root,
"--svn-config", "[CONFIG_DIR]"]) "--svn-config", "[CONFIG_DIR]"])
def testAutoTag(self):
self.WriteFakeVersionFile()
def ResetVersion(minor, build, patch=0):
return lambda: self.WriteFakeVersionFile(minor=minor,
build=build,
patch=patch)
self.Expect([
Cmd("git status -s -uno", ""),
Cmd("git status -s -b -uno", "## some_branch\n"),
Cmd("git svn fetch", ""),
Cmd("git branch", " branch1\n* branch2\n"),
Cmd("git checkout -f master", ""),
Cmd("git svn rebase", ""),
Cmd("git checkout -b %s" % TEST_CONFIG["BRANCHNAME"], "",
cb=ResetVersion(4, 5)),
Cmd("git branch -r",
"svn/tags/3.4.2\nsvn/tags/3.2.1.0\nsvn/branches/3.4"),
Cmd(("git log --format=%H --grep="
"\"\\[Auto\\-roll\\] Bump up version to\""),
"hash125\nhash118\nhash111\nhash101"),
Cmd("git checkout -f hash125 -- %s" % VERSION_FILE, "",
cb=ResetVersion(4, 4)),
Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "",
cb=ResetVersion(4, 5)),
Cmd("git checkout -f hash118 -- %s" % VERSION_FILE, "",
cb=ResetVersion(4, 3)),
Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "",
cb=ResetVersion(4, 5)),
Cmd("git checkout -f hash111 -- %s" % VERSION_FILE, "",
cb=ResetVersion(4, 2)),
Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "",
cb=ResetVersion(4, 5)),
URL("https://v8-status.appspot.com/revisions?format=json",
"[{\"revision\": \"126\", \"status\": true},"
"{\"revision\": \"123\", \"status\": true},"
"{\"revision\": \"112\", \"status\": true}]"),
Cmd("git svn find-rev hash118", "118"),
Cmd("git svn find-rev hash125", "125"),
Cmd("git svn find-rev r123", "hash123"),
Cmd("git log -1 --format=%at hash123", "1"),
Cmd("git reset --hard hash123", ""),
Cmd("git svn fetch", ""),
Cmd("git rebase svn/bleeding_edge", ""),
Cmd("git svn tag 3.4.3 -m \"Tagging version 3.4.3\"", ""),
Cmd("git checkout -f some_branch", ""),
Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""),
])
AutoTag(TEST_CONFIG, self).Run(["-a", "author@chromium.org"])
# Test that we bail out if the last change was a version change. # Test that we bail out if the last change was a version change.
def testBumpUpVersionBailout1(self): def testBumpUpVersionBailout1(self):
self._state["latest"] = "latest_hash" self._state["latest"] = "latest_hash"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment