Let push-to-trunk script retry failing svn writes.

BUG=
TEST=python -m unittest test_scripts
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c159485f
...@@ -256,7 +256,8 @@ class CommitRepository(Step): ...@@ -256,7 +256,8 @@ class CommitRepository(Step):
if self.Git("cl presubmit", "PRESUBMIT_TREE_CHECK=\"skip\"") is None: if self.Git("cl presubmit", "PRESUBMIT_TREE_CHECK=\"skip\"") is None:
self.Die("'git cl presubmit' failed, please try again.") self.Die("'git cl presubmit' failed, please try again.")
if self.Git("cl dcommit -f --bypass-hooks") is None: if self.Git("cl dcommit -f --bypass-hooks",
retry_on=lambda x: x is None) is None:
self.Die("'git cl dcommit' failed, please try again.") self.Die("'git cl dcommit' failed, please try again.")
...@@ -366,7 +367,7 @@ class CommitSVN(Step): ...@@ -366,7 +367,7 @@ class CommitSVN(Step):
MESSAGE = "Commit to SVN." MESSAGE = "Commit to SVN."
def RunStep(self): def RunStep(self):
result = self.Git("svn dcommit 2>&1") result = self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None)
if not result: if not result:
self.Die("'git svn dcommit' failed.") self.Die("'git svn dcommit' failed.")
result = filter(lambda x: re.search(r"^Committed r[0-9]+", x), result = filter(lambda x: re.search(r"^Committed r[0-9]+", x),
...@@ -395,7 +396,8 @@ class TagRevision(Step): ...@@ -395,7 +396,8 @@ class TagRevision(Step):
ver = "%s.%s.%s" % (self._state["major"], ver = "%s.%s.%s" % (self._state["major"],
self._state["minor"], self._state["minor"],
self._state["build"]) self._state["build"])
if self.Git("svn tag %s -m \"Tagging version %s\"" % (ver, ver)) is None: if self.Git("svn tag %s -m \"Tagging version %s\"" % (ver, ver),
retry_on=lambda x: x is None) is None:
self.Die("'git svn tag' failed.") self.Die("'git svn tag' failed.")
......
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