% self["tree_message"])
-class FetchLKGR(Step):
- MESSAGE = "Fetching V8 LKGR."
+class FetchCandidate(Step):
+ MESSAGE = "Fetching V8 roll candidate ref."
def RunStep(self):
- lkgr_url = "https://v8-status.appspot.com/lkgr"
- # Retry several times since app engine might have issues.
- self["lkgr"] = self.ReadURL(lkgr_url, wait_plan=[5, 20, 300, 300])
+ self.Git("fetch origin +refs/heads/candidate:refs/heads/candidate")
+ self["candidate"] = self.Git("show-ref -s refs/heads/candidate")
class CheckLastPush(Step):
self.Die("Could not retrieve bleeding edge revision for trunk push %s"
% last_push)
- if self["lkgr"] == last_push_be:
- print "Already pushed current lkgr %s" % last_push_be
+ if self["candidate"] == last_push_be:
+ print "Already pushed current candidate %s" % last_push_be
return True
MESSAGE = "Pushing to candidates if specified."
def RunStep(self):
- print "Pushing lkgr %s to candidates." % self["lkgr"]
+ print "Pushing candidate %s to candidates." % self["candidate"]
args = [
"--author", self._options.author,
"--reviewer", self._options.reviewer,
- "--revision", self["lkgr"],
+ "--revision", self["candidate"],
"--force",
]
Preparation,
CheckAutoPushSettings,
CheckTreeStatus,
- FetchLKGR,
+ FetchCandidate,
CheckLastPush,
PushToCandidates,
]
"Version 3.4.5 (based on abc123)\n"),
])
- self._state["lkgr"] = "abc123"
+ self._state["candidate"] = "abc123"
self.assertEquals(0, self.RunStep(
auto_push.AutoPush, CheckLastPush, AUTO_PUSH_ARGS))
Cmd("git fetch", ""),
URL("https://v8-status.appspot.com/current?format=json",
"{\"message\": \"Tree is throttled\"}"),
- URL("https://v8-status.appspot.com/lkgr", Exception("Network problem")),
- URL("https://v8-status.appspot.com/lkgr", "abc123"),
+ Cmd("git fetch origin +refs/heads/candidate:refs/heads/candidate", ""),
+ Cmd("git show-ref -s refs/heads/candidate", "abc123"),
Cmd(("git log -1 --format=%H --grep=\""
"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\""
" origin/candidates"), "push_hash\n"),
state = json.loads(FileToText("%s-state.json"
% TEST_CONFIG["PERSISTFILE_BASENAME"]))
- self.assertEquals("abc123", state["lkgr"])
+ self.assertEquals("abc123", state["candidate"])
def testAutoPushStoppedBySettings(self):
TextToFile("", os.path.join(TEST_CONFIG["DEFAULT_CWD"], ".git"))