From 199ba41c061c67c8a31c750931352412abe6a9e0 Mon Sep 17 00:00:00 2001 From: "machenbach@chromium.org" Date: Sun, 7 Sep 2014 08:11:32 +0000 Subject: [PATCH] Keep svn checkout up-to-date in roll scripts. BUG=chromium:408523 LOG=n TBR=jarin@chromium.org TEST=script_test.py Review URL: https://codereview.chromium.org/551573002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- tools/push-to-trunk/common_includes.py | 3 +++ tools/push-to-trunk/test_scripts.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/tools/push-to-trunk/common_includes.py b/tools/push-to-trunk/common_includes.py index b10f7df5b2..571cb181bb 100644 --- a/tools/push-to-trunk/common_includes.py +++ b/tools/push-to-trunk/common_includes.py @@ -532,6 +532,9 @@ class Step(GitRecipesMixin): def SVNCommit(self, root, commit_message): patch = self.GitDiff("HEAD^", "HEAD") TextToFile(patch, self._config[PATCH_FILE]) + self.Command("svn", "update", cwd=self._options.svn) + if self.Command("svn", "status", cwd=self._options.svn) != "": + self.Die("SVN checkout not clean.") if not self.Command("patch", "-d %s -p1 -i %s" % (root, self._config[PATCH_FILE]), cwd=self._options.svn): diff --git a/tools/push-to-trunk/test_scripts.py b/tools/push-to-trunk/test_scripts.py index 57b2dc664a..0837326c31 100644 --- a/tools/push-to-trunk/test_scripts.py +++ b/tools/push-to-trunk/test_scripts.py @@ -1425,6 +1425,8 @@ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3456 0039-1c4b expectations = self._bumpUpVersion() expectations += [ Cmd("git diff HEAD^ HEAD", "patch content"), + Cmd("svn update", "", cwd="[SVN_ROOT]"), + 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 commit --non-interactive --username=author@chromium.org "