Fix svn commit for deleted files in release scripts.

BUG=408523
LOG=n
TEST=script_test.py
TBR=tandrii@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25070}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
machenbach@chromium.org 2014-11-03 13:17:02 +00:00
parent 84355c8295
commit 37092e40b9
2 changed files with 17 additions and 4 deletions

View File

@ -736,8 +736,18 @@ class Step(GitRecipesMixin):
(root, self._config["PATCH_FILE"]),
cwd=self._options.svn):
self.Die("Could not apply patch.")
# Recursively add possibly newly added files.
self.Command("svn", "add --force %s" % root, cwd=self._options.svn)
for line in self.Command(
"svn", "status", cwd=self._options.svn).splitlines():
# Check for added and removed items. Svn status has seven status columns.
# The first contains ? for unknown and ! for missing.
match = re.match(r"^(.)...... (.*)$", line)
if match and match.group(1) == "?":
self.Command("svn", "add --force %s" % match.group(2),
cwd=self._options.svn)
if match and match.group(1) == "!":
self.Command("svn", "delete --force %s" % match.group(2),
cwd=self._options.svn)
self.Command(
"svn",
"commit --non-interactive --username=%s --config-dir=%s -m \"%s\"" %

View File

@ -963,7 +963,10 @@ Performance and stability improvements on all platforms.""", commit)
Cmd("svn status", "", cwd=svn_root),
Cmd("patch -d trunk -p1 -i %s" %
TEST_CONFIG["PATCH_FILE"], "Applied patch...", cwd=svn_root),
Cmd("svn add --force trunk", "", cwd=svn_root),
Cmd("svn status", "M OWNERS\n? new_file\n! AUTHORS",
cwd=svn_root),
Cmd("svn add --force new_file", "", cwd=svn_root),
Cmd("svn delete --force AUTHORS", "", cwd=svn_root),
Cmd("svn commit --non-interactive --username=author@chromium.org "
"--config-dir=[CONFIG_DIR] "
"-m \"Version 3.22.5 (based on push_hash)\"",
@ -1786,7 +1789,7 @@ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3456 0039-1c4b
Cmd("svn status", "", cwd=svn_root),
Cmd("patch -d branches/bleeding_edge -p1 -i %s" %
TEST_CONFIG["PATCH_FILE"], "Applied patch...", cwd=svn_root),
Cmd("svn add --force branches/bleeding_edge", "", cwd=svn_root),
Cmd("svn status", "M src/version.cc", cwd=svn_root),
Cmd("svn commit --non-interactive --username=author@chromium.org "
"--config-dir=[CONFIG_DIR] "
"-m \"[Auto-roll] Bump up version to 3.11.6.0\"",