Commit ffbd92d7 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[release] Drop rietveld-reload feature from release tools

The release tools used to reload CL descriptions from rietveld to consider
late edits. This makes no sense anymore with gerrit, so we drop the feature.

NOTRY=true
TBR=hablich@chromium.org

Bug: chromium:685318
Change-Id: I08231795ba3b25c0939aa2b4428973086548484d
Reviewed-on: https://chromium-review.googlesource.com/558915Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46389}
parent 8840d622
......@@ -77,24 +77,6 @@ class DetectLastRelease(Step):
class PrepareChangeLog(Step):
MESSAGE = "Prepare raw ChangeLog entry."
def Reload(self, body):
"""Attempts to reload the commit message from rietveld in order to allow
late changes to the LOG flag. Note: This is brittle to future changes of
the web page name or structure.
"""
match = re.search(r"^Review URL: https://codereview\.chromium\.org/(\d+)$",
body, flags=re.M)
if match:
cl_url = ("https://codereview.chromium.org/%s/description"
% match.group(1))
try:
# Fetch from Rietveld but only retry once with one second delay since
# there might be many revisions.
body = self.ReadURL(cl_url, wait_plan=[1])
except urllib2.URLError: # pragma: no cover
pass
return body
def RunStep(self):
self["date"] = self.GetDate()
output = "%s: Version %s\n\n" % (self["date"], self["version"])
......@@ -107,7 +89,7 @@ class PrepareChangeLog(Step):
commit_messages = [
[
self.GitLog(n=1, format="%s", git_hash=commit),
self.Reload(self.GitLog(n=1, format="%B", git_hash=commit)),
self.GitLog(n=1, format="%B", git_hash=commit),
self.GitLog(n=1, format="%an", git_hash=commit),
] for commit in commits.splitlines()
]
......
......@@ -119,24 +119,6 @@ class DetectLastRelease(Step):
class PrepareChangeLog(Step):
MESSAGE = "Prepare raw ChangeLog entry."
def Reload(self, body):
"""Attempts to reload the commit message from rietveld in order to allow
late changes to the LOG flag. Note: This is brittle to future changes of
the web page name or structure.
"""
match = re.search(r"^Review URL: https://codereview\.chromium\.org/(\d+)$",
body, flags=re.M)
if match:
cl_url = ("https://codereview.chromium.org/%s/description"
% match.group(1))
try:
# Fetch from Rietveld but only retry once with one second delay since
# there might be many revisions.
body = self.ReadURL(cl_url, wait_plan=[1])
except urllib2.URLError: # pragma: no cover
pass
return body
def RunStep(self):
self["date"] = self.GetDate()
output = "%s: Version %s\n\n" % (self["date"], self["version"])
......@@ -149,7 +131,7 @@ class PrepareChangeLog(Step):
commit_messages = [
[
self.GitLog(n=1, format="%s", git_hash=commit),
self.Reload(self.GitLog(n=1, format="%B", git_hash=commit)),
self.GitLog(n=1, format="%B", git_hash=commit),
self.GitLog(n=1, format="%an", git_hash=commit),
] for commit in commits.splitlines()
]
......
......@@ -586,11 +586,7 @@ class ScriptTest(unittest.TestCase):
Cmd("git log -1 --format=%B rev3", "Title\n\nBUG=321\nLOG=true\n"),
Cmd("git log -1 --format=%an rev3", "author3@chromium.org"),
Cmd("git log -1 --format=%s rev4", "Title text 4"),
Cmd("git log -1 --format=%B rev4",
("Title\n\nBUG=456\nLOG=Y\n\n"
"Review URL: https://codereview.chromium.org/9876543210\n")),
URL("https://codereview.chromium.org/9876543210/description",
"Title\n\nBUG=456\nLOG=N\n\n"),
Cmd("git log -1 --format=%B rev4", "Title\n\nBUG=456\nLOG=N"),
Cmd("git log -1 --format=%an rev4", "author4@chromium.org"),
])
......
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