Reviewers: tandrii,
Message:
PTAL. Currently it would ignore deleted files.
Description:
Fix svn commit for deleted files in release scripts.
BUG=408523
LOG=n
TEST=script_test.py
[email protected]
Please review this at https://codereview.chromium.org/685623004/
Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+17, -4 lines):
M tools/push-to-trunk/common_includes.py
M tools/push-to-trunk/test_scripts.py
Index: tools/push-to-trunk/common_includes.py
diff --git a/tools/push-to-trunk/common_includes.py
b/tools/push-to-trunk/common_includes.py
index
e95d55518322994d39de9e506d048e216f99b699..bb040f510fbfbd137335a01df5e63976c6652cec
100644
--- a/tools/push-to-trunk/common_includes.py
+++ b/tools/push-to-trunk/common_includes.py
@@ -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\"" %
Index: tools/push-to-trunk/test_scripts.py
diff --git a/tools/push-to-trunk/test_scripts.py
b/tools/push-to-trunk/test_scripts.py
index
6eeb323e43a3d7add3ea23dfbcb72b58ce240993..6d1aec5af9ef92506f8e8105399fe1d7f92b1c8b
100644
--- a/tools/push-to-trunk/test_scripts.py
+++ b/tools/push-to-trunk/test_scripts.py
@@ -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 [email protected] "
"--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 [email protected] "
"--config-dir=[CONFIG_DIR] "
"-m \"[Auto-roll] Bump up version to 3.11.6.0\"",
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.