Add file exclusion to trunk patch creation in push-to-trunk.

This is another step towards getting rid of the bleeding edge change log file. Now it can be omitted in a follow up CL.

R=jarin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d7ec9ab0
......@@ -133,8 +133,11 @@ class GitRecipesMixin(object):
def GitDCommit(self):
self.Git("cl dcommit -f --bypass-hooks", retry_on=lambda x: x is None)
def GitDiff(self, loc1, loc2):
return self.Git(MakeArgs(["diff", loc1, loc2]))
def GitDiff(self, loc1, loc2, exclude=None):
exclude = exclude or []
files = self.Git(MakeArgs(["diff", "--name-only", loc1, loc2]))
files = filter(lambda f: f not in exclude, files.strip().splitlines())
return self.Git(MakeArgs(["diff", loc1, loc2] + files))
def GitPull(self):
self.Git("pull")
......
......@@ -589,7 +589,8 @@ class ScriptTest(unittest.TestCase):
f.write(change_log)
self.ExpectGit([
Git("diff svn/trunk hash1", "patch content"),
Git("diff --name-only svn/trunk hash1", "file1\nfile2\n"),
Git("diff svn/trunk hash1 file1 file2", "patch content"),
Git("svn find-rev hash1", "123455\n"),
])
......@@ -710,7 +711,8 @@ Performance and stability improvements on all platforms.""", commit)
Git(("log -1 --format=%H --grep=\"Prepare push to trunk. "
"Now working on version 3.22.6.\""),
"hash1\n"),
Git("diff svn/trunk hash1", "patch content\n"),
Git("diff --name-only svn/trunk hash1", "file1\nfile2\n"),
Git("diff svn/trunk hash1 file1 file2", "patch content"),
Git("svn find-rev hash1", "123455\n"),
Git("checkout -b %s svn/trunk" % TEST_CONFIG[TRUNKBRANCH], ""),
Git("apply --index --reject \"%s\"" % TEST_CONFIG[PATCH_FILE], ""),
......
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