|
Lines 430-443
def set_reviewer(self, reviewer):
a/Tools/Scripts/webkitpy/common/checkout/changelog.py_sec1
|
| 430 |
self._filesystem.write_text_file(self.path, newdata) |
430 |
self._filesystem.write_text_file(self.path, newdata) |
| 431 |
|
431 |
|
| 432 |
def set_short_description_and_bug_url(self, short_description, bug_url): |
432 |
def set_short_description_and_bug_url(self, short_description, bug_url): |
| 433 |
message = "%s\n%s%s" % (short_description, self._changelog_indent, bug_url) |
|
|
| 434 |
bug_boilerplate = "%sNeed the bug URL (OOPS!).\n" % self._changelog_indent |
| 435 |
result = StringIO() |
433 |
result = StringIO() |
| 436 |
with self._filesystem.open_text_file_for_reading(self.path) as file: |
434 |
with self._filesystem.open_text_file_for_reading(self.path) as file: |
|
|
435 |
short_description_placeholder = "Need a short description (OOPS!)." |
| 436 |
bug_url_placeholder = "Need the bug URL (OOPS!)." |
| 437 |
for line in file: |
437 |
for line in file: |
| 438 |
line = line.replace("Need a short description (OOPS!).", message) |
438 |
stripped = line.strip() |
| 439 |
if line != bug_boilerplate: |
439 |
if stripped == short_description_placeholder: |
| 440 |
result.write(line) |
440 |
line = self._changelog_indent + short_description + "\n" |
|
|
441 |
if stripped == bug_url_placeholder: |
| 442 |
line = self._changelog_indent + bug_url + "\n" |
| 443 |
result.write(line) |
| 441 |
self._filesystem.write_text_file(self.path, result.getvalue()) |
444 |
self._filesystem.write_text_file(self.path, result.getvalue()) |
| 442 |
|
445 |
|
| 443 |
def delete_entries(self, num_entries): |
446 |
def delete_entries(self, num_entries): |