self.Expect([
Cmd("git status -s -uno", ""),
Cmd("git status -s -b -uno", "## some_branch"),
+ Cmd("git fetch", ""),
Cmd("git svn fetch", ""),
Cmd("git branch", " branch1\n* %s" % TEST_CONFIG["BRANCHNAME"]),
RL("Y"),
self.Expect([
Cmd("git status -s -uno", ""),
Cmd("git status -s -b -uno", "## some_branch"),
+ Cmd("git fetch", ""),
Cmd("git svn fetch", ""),
Cmd("git branch", " branch1\n* %s" % TEST_CONFIG["BRANCHNAME"]),
RL("n"),
self.Expect([
Cmd("git status -s -uno", ""),
Cmd("git status -s -b -uno", "## some_branch"),
+ Cmd("git fetch", ""),
Cmd("git svn fetch", ""),
Cmd("git branch", " branch1\n* %s" % TEST_CONFIG["BRANCHNAME"]),
RL("Y"),
self.Expect([
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)),
RL("Y"), # Increment build number.
])
f.write(change_log)
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"),
])
]
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 manual: args.append("-m")
else: args += ["-r", "reviewer@chromium.org"]
self.Expect([
Cmd(("git log -1 --format=%H --grep="
"\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\" "
- "svn/trunk"), "hash2\n"),
+ "origin/candidates"), "hash2\n"),
Cmd("git log -1 --format=%s hash2",
"Version 3.4.5 (based on bleeding_edge revision r99)\n"),
])
self.Expect([
Cmd("git status -s -uno", ""),
Cmd("git status -s -b -uno", "## some_branch\n"),
+ Cmd("git fetch", ""),
Cmd("git svn fetch", ""),
URL("https://v8-status.appspot.com/current?format=json",
"{\"message\": \"Tree is throttled\"}"),
URL("https://v8-status.appspot.com/lkgr", "100"),
Cmd(("git log -1 --format=%H --grep=\""
"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\""
- " svn/trunk"), "push_hash\n"),
+ " origin/candidates"), "push_hash\n"),
Cmd("git log -1 --format=%s push_hash",
"Version 3.4.5 (based on bleeding_edge revision r79)\n"),
])
self.Expect([
Cmd("git status -s -uno", ""),
Cmd("git status -s -b -uno", "## some_branch\n"),
+ Cmd("git fetch", ""),
Cmd("git svn fetch", ""),
])
self.Expect([
Cmd("git status -s -uno", ""),
Cmd("git status -s -b -uno", "## some_branch\n"),
+ Cmd("git fetch", ""),
Cmd("git svn fetch", ""),
URL("https://v8-status.appspot.com/current?format=json",
"{\"message\": \"Tree is throttled (no push)\"}"),
"--svn", svn_root,
"--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.
def testBumpUpVersionBailout1(self):
self._state["latest"] = "latest_hash"