| OLD | NEW | 
|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python | 
| 2 # Copyright 2013 the V8 project authors. All rights reserved. | 2 # Copyright 2013 the V8 project authors. All rights reserved. | 
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without | 
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are | 
| 5 # met: | 5 # met: | 
| 6 # | 6 # | 
| 7 #     * Redistributions of source code must retain the above copyright | 7 #     * Redistributions of source code must retain the above copyright | 
| 8 #       notice, this list of conditions and the following disclaimer. | 8 #       notice, this list of conditions and the following disclaimer. | 
| 9 #     * Redistributions in binary form must reproduce the above | 9 #     * Redistributions in binary form must reproduce the above | 
| 10 #       copyright notice, this list of conditions and the following | 10 #       copyright notice, this list of conditions and the following | 
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 582 | 582 | 
| 583     cl = GetLastChangeLogEntries(TEST_CONFIG[CHANGELOG_FILE]) | 583     cl = GetLastChangeLogEntries(TEST_CONFIG[CHANGELOG_FILE]) | 
| 584     self.assertEquals(cl_chunk, cl) | 584     self.assertEquals(cl_chunk, cl) | 
| 585 | 585 | 
| 586   def _TestSquashCommits(self, change_log, expected_msg): | 586   def _TestSquashCommits(self, change_log, expected_msg): | 
| 587     TEST_CONFIG[CHANGELOG_ENTRY_FILE] = self.MakeEmptyTempFile() | 587     TEST_CONFIG[CHANGELOG_ENTRY_FILE] = self.MakeEmptyTempFile() | 
| 588     with open(TEST_CONFIG[CHANGELOG_ENTRY_FILE], "w") as f: | 588     with open(TEST_CONFIG[CHANGELOG_ENTRY_FILE], "w") as f: | 
| 589       f.write(change_log) | 589       f.write(change_log) | 
| 590 | 590 | 
| 591     self.ExpectGit([ | 591     self.ExpectGit([ | 
| 592       Git("diff svn/trunk hash1", "patch content"), | 592       Git("diff --name-only svn/trunk hash1", "file1\nfile2\n"), | 
|  | 593       Git("diff svn/trunk hash1 file1 file2", "patch content"), | 
| 593       Git("svn find-rev hash1", "123455\n"), | 594       Git("svn find-rev hash1", "123455\n"), | 
| 594     ]) | 595     ]) | 
| 595 | 596 | 
| 596     self._state["prepare_commit_hash"] = "hash1" | 597     self._state["prepare_commit_hash"] = "hash1" | 
| 597     self._state["date"] = "1999-11-11" | 598     self._state["date"] = "1999-11-11" | 
| 598 | 599 | 
| 599     self.RunStep(PushToTrunk, SquashCommits) | 600     self.RunStep(PushToTrunk, SquashCommits) | 
| 600     self.assertEquals(FileToText(TEST_CONFIG[COMMITMSG_FILE]), expected_msg) | 601     self.assertEquals(FileToText(TEST_CONFIG[COMMITMSG_FILE]), expected_msg) | 
| 601 | 602 | 
| 602     patch = FileToText(TEST_CONFIG[ PATCH_FILE]) | 603     patch = FileToText(TEST_CONFIG[ PATCH_FILE]) | 
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 703       Git(("cl upload --send-mail --email \"author@chromium.org\" " | 704       Git(("cl upload --send-mail --email \"author@chromium.org\" " | 
| 704            "-r \"reviewer@chromium.org\"%s" % force_flag), | 705            "-r \"reviewer@chromium.org\"%s" % force_flag), | 
| 705           "done\n"), | 706           "done\n"), | 
| 706       Git("cl presubmit", "Presubmit successfull\n"), | 707       Git("cl presubmit", "Presubmit successfull\n"), | 
| 707       Git("cl dcommit -f --bypass-hooks", "Closing issue\n"), | 708       Git("cl dcommit -f --bypass-hooks", "Closing issue\n"), | 
| 708       Git("svn fetch", "fetch result\n"), | 709       Git("svn fetch", "fetch result\n"), | 
| 709       Git("checkout -f svn/bleeding_edge", ""), | 710       Git("checkout -f svn/bleeding_edge", ""), | 
| 710       Git(("log -1 --format=%H --grep=\"Prepare push to trunk.  " | 711       Git(("log -1 --format=%H --grep=\"Prepare push to trunk.  " | 
| 711            "Now working on version 3.22.6.\""), | 712            "Now working on version 3.22.6.\""), | 
| 712           "hash1\n"), | 713           "hash1\n"), | 
| 713       Git("diff svn/trunk hash1", "patch content\n"), | 714       Git("diff --name-only svn/trunk hash1", "file1\nfile2\n"), | 
|  | 715       Git("diff svn/trunk hash1 file1 file2", "patch content"), | 
| 714       Git("svn find-rev hash1", "123455\n"), | 716       Git("svn find-rev hash1", "123455\n"), | 
| 715       Git("checkout -b %s svn/trunk" % TEST_CONFIG[TRUNKBRANCH], ""), | 717       Git("checkout -b %s svn/trunk" % TEST_CONFIG[TRUNKBRANCH], ""), | 
| 716       Git("apply --index --reject \"%s\"" % TEST_CONFIG[PATCH_FILE], ""), | 718       Git("apply --index --reject \"%s\"" % TEST_CONFIG[PATCH_FILE], ""), | 
| 717       Git("add \"%s\"" % TEST_CONFIG[VERSION_FILE], ""), | 719       Git("add \"%s\"" % TEST_CONFIG[VERSION_FILE], ""), | 
| 718       Git("commit -aF \"%s\"" % TEST_CONFIG[COMMITMSG_FILE], "", | 720       Git("commit -aF \"%s\"" % TEST_CONFIG[COMMITMSG_FILE], "", | 
| 719           cb=CheckSVNCommit), | 721           cb=CheckSVNCommit), | 
| 720       Git("svn dcommit 2>&1", "Some output\nCommitted r123456\nSome output\n"), | 722       Git("svn dcommit 2>&1", "Some output\nCommitted r123456\nSome output\n"), | 
| 721       Git("svn tag 3.22.5 -m \"Tagging version 3.22.5\"", ""), | 723       Git("svn tag 3.22.5 -m \"Tagging version 3.22.5\"", ""), | 
| 722       Git("status -s -uno", ""), | 724       Git("status -s -uno", ""), | 
| 723       Git("checkout -f master", ""), | 725       Git("checkout -f master", ""), | 
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1013 | 1015 | 
| 1014 Review URL: https://codereview.chromium.org/83173002 | 1016 Review URL: https://codereview.chromium.org/83173002 | 
| 1015 | 1017 | 
| 1016 ------------------------------------------------------------------------""") | 1018 ------------------------------------------------------------------------""") | 
| 1017     self.assertEquals( | 1019     self.assertEquals( | 
| 1018 """Prepare push to trunk.  Now working on version 3.23.11. | 1020 """Prepare push to trunk.  Now working on version 3.23.11. | 
| 1019 | 1021 | 
| 1020 R=danno@chromium.org | 1022 R=danno@chromium.org | 
| 1021 | 1023 | 
| 1022 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) | 1024 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) | 
| OLD | NEW | 
|---|