| 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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 "Review URL: https://codereview.chromium.org/9876543210\n")], | 483 "Review URL: https://codereview.chromium.org/9876543210\n")], |
| 484 ["log -1 rev4 --format=\"%an\"", "author4@chromium.org"], | 484 ["log -1 rev4 --format=\"%an\"", "author4@chromium.org"], |
| 485 ]) | 485 ]) |
| 486 | 486 |
| 487 # The cl for rev4 on rietveld has an updated LOG flag. | 487 # The cl for rev4 on rietveld has an updated LOG flag. |
| 488 self.ExpectReadURL([ | 488 self.ExpectReadURL([ |
| 489 ["https://codereview.chromium.org/9876543210/description", | 489 ["https://codereview.chromium.org/9876543210/description", |
| 490 "Title\n\nBUG=456\nLOG=N\n\n"], | 490 "Title\n\nBUG=456\nLOG=N\n\n"], |
| 491 ]) | 491 ]) |
| 492 | 492 |
| 493 self.MakeStep().Persist("last_push", "1234") | 493 self.MakeStep().Persist("last_push_bleeding_edge", "1234") |
| 494 self.MakeStep(PrepareChangeLog).Run() | 494 self.MakeStep(PrepareChangeLog).Run() |
| 495 | 495 |
| 496 actual_cl = FileToText(TEST_CONFIG[CHANGELOG_ENTRY_FILE]) | 496 actual_cl = FileToText(TEST_CONFIG[CHANGELOG_ENTRY_FILE]) |
| 497 | 497 |
| 498 expected_cl = """1999-07-31: Version 3.22.5 | 498 expected_cl = """1999-07-31: Version 3.22.5 |
| 499 | 499 |
| 500 Title text 1. | 500 Title text 1. |
| 501 | 501 |
| 502 Title text 3 (Chromium issue 321). | 502 Title text 3 (Chromium issue 321). |
| 503 | 503 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 review_suffix = "\n\nTBR=reviewer@chromium.org" if not manual else "" | 669 review_suffix = "\n\nTBR=reviewer@chromium.org" if not manual else "" |
| 670 self.ExpectGit([ | 670 self.ExpectGit([ |
| 671 ["status -s -uno", ""], | 671 ["status -s -uno", ""], |
| 672 ["status -s -b -uno", "## some_branch\n"], | 672 ["status -s -b -uno", "## some_branch\n"], |
| 673 ["svn fetch", ""], | 673 ["svn fetch", ""], |
| 674 ["branch", " branch1\n* branch2\n"], | 674 ["branch", " branch1\n* branch2\n"], |
| 675 ["checkout -b %s" % TEST_CONFIG[TEMP_BRANCH], ""], | 675 ["checkout -b %s" % TEST_CONFIG[TEMP_BRANCH], ""], |
| 676 ["branch", " branch1\n* branch2\n"], | 676 ["branch", " branch1\n* branch2\n"], |
| 677 ["branch", " branch1\n* branch2\n"], | 677 ["branch", " branch1\n* branch2\n"], |
| 678 ["checkout -b %s svn/bleeding_edge" % TEST_CONFIG[BRANCHNAME], ""], | 678 ["checkout -b %s svn/bleeding_edge" % TEST_CONFIG[BRANCHNAME], ""], |
| 679 ["log -1 --format=%H ChangeLog", "1234\n"], | 679 [("log -1 --format=%H --grep=" |
| 680 ["log -1 1234", "Last push ouput\n"], | 680 "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\" " |
| 681 ["log 1234..HEAD --format=%H", "rev1\n"], | 681 "svn/trunk"), "hash2\n"], |
| 682 ["log -1 hash2", "Log message\n"], |
| 683 ["log -1 --format=%s hash2", |
| 684 "Version 3.4.5 (based on bleeding_edge revision r1234)\n"], |
| 685 ["svn find-rev r1234", "hash3\n"], |
| 686 ["log hash3..HEAD --format=%H", "rev1\n"], |
| 682 ["log -1 rev1 --format=\"%s\"", "Log text 1.\n"], | 687 ["log -1 rev1 --format=\"%s\"", "Log text 1.\n"], |
| 683 ["log -1 rev1 --format=\"%B\"", "Text\nLOG=YES\nBUG=v8:321\nText\n"], | 688 ["log -1 rev1 --format=\"%B\"", "Text\nLOG=YES\nBUG=v8:321\nText\n"], |
| 684 ["log -1 rev1 --format=\"%an\"", "author1@chromium.org\n"], | 689 ["log -1 rev1 --format=\"%an\"", "author1@chromium.org\n"], |
| 685 [("commit -a -m \"Prepare push to trunk. " | 690 [("commit -a -m \"Prepare push to trunk. " |
| 686 "Now working on version 3.22.6.%s\"" % review_suffix), | 691 "Now working on version 3.22.6.%s\"" % review_suffix), |
| 687 " 2 files changed\n", | 692 " 2 files changed\n", |
| 688 CheckPreparePush], | 693 CheckPreparePush], |
| 689 [("cl upload --email \"author@chromium.org\" " | 694 [("cl upload --email \"author@chromium.org\" " |
| 690 "-r \"reviewer@chromium.org\" --send-mail%s" % force_flag), | 695 "-r \"reviewer@chromium.org\" --send-mail%s" % force_flag), |
| 691 "done\n"], | 696 "done\n"], |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 ["https://v8-status.appspot.com/status", | 802 ["https://v8-status.appspot.com/status", |
| 798 ("username=v8-auto-roll%40chromium.org&" | 803 ("username=v8-auto-roll%40chromium.org&" |
| 799 "message=Tree+is+throttled&password=PW"), ""], | 804 "message=Tree+is+throttled&password=PW"), ""], |
| 800 ]) | 805 ]) |
| 801 | 806 |
| 802 self.ExpectGit([ | 807 self.ExpectGit([ |
| 803 ["status -s -uno", ""], | 808 ["status -s -uno", ""], |
| 804 ["status -s -b -uno", "## some_branch\n"], | 809 ["status -s -b -uno", "## some_branch\n"], |
| 805 ["svn fetch", ""], | 810 ["svn fetch", ""], |
| 806 ["svn log -1 --oneline", "r100 | Text"], | 811 ["svn log -1 --oneline", "r100 | Text"], |
| 807 ["svn log -1 --oneline ChangeLog", "r65 | Prepare push to trunk..."], | 812 [("log -1 --format=%H --grep=\"" |
| 813 "^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\"" |
| 814 " svn/trunk"), "push_hash\n"], |
| 815 ["svn find-rev push_hash", "65"], |
| 808 ]) | 816 ]) |
| 809 | 817 |
| 810 auto_roll.RunAutoRoll(TEST_CONFIG, AutoRollOptions( | 818 auto_roll.RunAutoRoll(TEST_CONFIG, AutoRollOptions( |
| 811 MakeOptions(status_password=status_password)), self) | 819 MakeOptions(status_password=status_password)), self) |
| 812 | 820 |
| 813 self.assertEquals("100", self.MakeStep().Restore("lkgr")) | 821 self.assertEquals("100", self.MakeStep().Restore("lkgr")) |
| 814 self.assertEquals("100", self.MakeStep().Restore("latest")) | 822 self.assertEquals("100", self.MakeStep().Restore("latest")) |
| 815 | 823 |
| 816 def testAutoRollStoppedBySettings(self): | 824 def testAutoRollStoppedBySettings(self): |
| 817 TEST_CONFIG[DOT_GIT_LOCATION] = self.MakeEmptyTempFile() | 825 TEST_CONFIG[DOT_GIT_LOCATION] = self.MakeEmptyTempFile() |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 982 | 990 |
| 983 Review URL: https://codereview.chromium.org/83173002 | 991 Review URL: https://codereview.chromium.org/83173002 |
| 984 | 992 |
| 985 ------------------------------------------------------------------------""") | 993 ------------------------------------------------------------------------""") |
| 986 self.assertEquals( | 994 self.assertEquals( |
| 987 """Prepare push to trunk. Now working on version 3.23.11. | 995 """Prepare push to trunk. Now working on version 3.23.11. |
| 988 | 996 |
| 989 R=danno@chromium.org | 997 R=danno@chromium.org |
| 990 | 998 |
| 991 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) | 999 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) |
| OLD | NEW |