Commit Graph

45 Commits

Author SHA1 Message Date
machenbach@chromium.org
23b0228614 Directly modify version file on trunk branch in push-to-trunk.
- This also shifts the push revision by one to prepare for the deprecation of the prepare push commit
- The version increment is still based on the bleeding_edge version.cc. This will be changed in a follow up CL.

BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-19 10:46:24 +00:00
machenbach@chromium.org
c06c9f8e1e Deprecate ChangeLog on bleeding_edge.
- This adds a sentinel to the ChangeLog on bleeding edge.
- Modifying the ChangeLog file directly when pushing to trunk is now no longer possible. If further modifications to the ChangeLog in manual push-to-trunk mode are required (e.g. after the prepare push LGTM), the change log entry temp file must be edited.
- Functionality that is no longer needed is removed.

BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20029 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-18 12:46:48 +00:00
machenbach@chromium.org
a868a74cfc Fix branch for resetting change log in push-to-trunk.
The patch is applied to ChangeLog with the "--index" option, which already updates the index of the file. For resetting the ChangeLog to the trunk revision, the trunk branch needs to be stated explicitly in the checkout, otherwise it checks out the already patched HEAD.

TEST=tools/push-to-trunk/script_test.py
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19996 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-17 13:52:33 +00:00
machenbach@chromium.org
fac6b67b2c Fix maintaining change log in push-to-trunk.
Applying the patch on ChangeLog causes local changes. To reset the ChangeLog to its original state, the "-f" option is required.

TBR=jarin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-17 08:51:27 +00:00
machenbach@chromium.org
acc2997b52 Reland "Maintain change log file directly on trunk branch in push-to-trunk."
This uses the following approach to modify the trunk change log:
- Calculate the new change log entries
- Apply changes to the bleeding edge change log (this will be removed in a follow up CL)
- Apply the diff between BE and trunk to trunk (this includes the diff of the change log)
- Reset the change log to the version on trunk
- Reapply the new change log entries

R=jarin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-15 13:06:08 +00:00
machenbach@chromium.org
f7fea5dd92 Revert "Maintain change log file directly on trunk branch in push-to-trunk." and related changes.
This reverts r19876, r19902 and r19903. The changes made git diff' in push-to-trunk unusable.

TBR=jarin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19905 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-13 15:48:24 +00:00
machenbach@chromium.org
fa4625c1a4 Maintain change log file directly on trunk branch in push-to-trunk.
This is another step for deprecating the change log file on bleeding edge.

BUG=
R=jarin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-13 15:12:18 +00:00
machenbach@chromium.org
078ecbb9c3 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
2014-03-13 07:57:07 +00:00
machenbach@chromium.org
8bcd43b8cf Refactoring: Use explicit mock expectations for testing push and merge scripts.
- Up to now, mock expectations were simple lists of arguments + return value
- These expectations are now modeled explicitly including the name of the mock (e.g. git or readline)
- The optional test callback function is now explicitly named
- This will allow merging all mock expectation types (e.g. git and readline) into a single list per test case (follow up CL)

TEST=tools/push-to-trunk/script_test.py
R=jarin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-12 14:39:04 +00:00
machenbach@chromium.org
7c778096b1 Suppress error handling for test coverage in push and merge scripts.
- This adds a suppression of lines concerning error handling for the test coverage analysis
- Fixes also calling push-to-trunk from auto-roll

TEST=tools/push-to-trunk/script_test.py
TBR=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-12 10:45:23 +00:00
machenbach@chromium.org
11b6daec84 Don't use a temp file for changelog in push-to-trunk.
This is part of getting rid of the ChangeLog on bleeding_edge and directly modifying it on trunk.

BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-12 07:39:56 +00:00
machenbach@chromium.org
bc21f42563 Refactoring: Make script dependencies more object-oriented in push and merge scripts.
- Connect the top-level scripts via inheritance and remove top-level functions
- Options and option processing can be extended from base to subclass script

This CL is split off from https://codereview.chromium.org/173983002/

BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-04 23:27:27 +00:00
machenbach@chromium.org
73bb6c6bd7 Add coverage analysis to push and merge script tests.
The coverage analysis must live in an extra file in order to analyze the scripts when being imported.

TEST=tools/push-to-trunk/script_test.py
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19640 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-03 20:17:03 +00:00
machenbach@chromium.org
5acdc942f6 Refactoring: Long option names in push and merge scripts.
This CL is split off from https://codereview.chromium.org/173983002/

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-28 21:49:51 +00:00
commit-bot@chromium.org
56060812f6 Fix line distance in push and merge scripts.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19628 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-28 19:45:28 +00:00
machenbach@chromium.org
f09b3db78c Fix patch creation in merge-to-branch script.
Patch white space got stripped, which lead to failures when applying the patch.

- Refine test to reveal the problem
- Create a separate method for retrieving the patch that doesn't strip white space

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-26 16:12:32 +00:00
machenbach@chromium.org
2e01427c3d Refactoring: Deprecate optparse in push and merge scripts.
- Deprecate optparse with argparse
- The tests include now options parsing by default: each test specifies the command-line args to parse rather than the options directly

This CL is split off from https://codereview.chromium.org/173983002/

TBR=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19565 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-26 15:13:31 +00:00
machenbach@chromium.org
01cf2f8eda Refactoring: Extract low-level git from push and merge scripts.
- This adds a python layer on top of the low-level git calls to control parameter passing and return values.
- This also fixes a bug in FindLastTrunkPush that only shows up in manual mode when the last push versions are iterated.
- The order of some parameters changed in some git calls in the tests to be uniform.

BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-20 16:39:41 +00:00
machenbach@chromium.org
fb0fb8e0cc Retrieve bleeding edge push revision from trunk commit message.
This is part of moving towards an lkgr-push script and prepares the deprecation of the prepare push commit.

BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-19 13:40:30 +00:00
machenbach@chromium.org
a56d0da623 Refactor persisting state in push and merge scripts.
- The backed state dict is now persisted and restored in the step template as a json file
- All explicit persist/restore calls are removed
- Added testing an unexpected script failure + restart with state recovery to the merge-to-branch test
- This CL is not changing external behavior of the scripts

BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19478 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-19 11:56:48 +00:00
machenbach@chromium.org
c2cd2083a3 Add merge-to-branch python port.
- To ease a line-by-line review, the script is intentionally close to the former bash version
- Disambiguate the existing "-r" option for reviewer in the other scripts
- The options design will be refactored in a follow up CL

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-18 13:09:14 +00:00
machenbach@chromium.org
e81eacfa74 Enable specification of author email in push-to-trunk.
If not specified, depot tools tend to ask for an email on the command line once in a while, which makes the automated script hang.

BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19223 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-10 12:48:36 +00:00
machenbach@chromium.org
15ecc108cb Show v8 bleeding edge revision in trunk and Chromium commit message.
This allows to map from a V8 Chromium roll to the bleeding_edge revision used for the roll.

This CL also improves some test code:
 - Don't loose assertion exceptions in mocked git on retry.
 - Remove an unused method

BUG=337167
LOG=n
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-23 13:44:52 +00:00
machenbach@chromium.org
780ae3146a Activate calling push-to-trunk in auto-roll script.
- Call push-to-trunk through python not through the shell
- Restore tree state on script errors
- Mock out python call in unit tests
- The actual call stays behind a flag

BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-17 11:29:43 +00:00
machenbach@chromium.org
0684eb14e6 Add tree control feature to auto-roll script.
This CL enables the auto-roll script to close and reopen the tree when pushing.

Modifies an auto-roll test so that the push-to-trunk part is executed in order to test the new tree control feature.

BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-15 15:55:23 +00:00
machenbach@chromium.org
c30421677d Fix tree check for push-to-trunk.
This is a work-around simulating a --bypass-tree-check.

BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-14 11:49:09 +00:00
machenbach@chromium.org
0030356cd0 Add better remote control to push-to-trunk auto-roll script.
This CL enables controlling the automatic push-to-trunk via a settings file .auto-roll in the home directory or via the v8 status app message.

Pushes can be disabled by setting .auto-roll to {"enable_auto_roll": false} or by adding the phrase "nopush" or "no push" to http://v8-status.appspot.com/.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-07 15:23:48 +00:00
machenbach@chromium.org
508f7d256a Add named options to push-to-trunk script.
Also make sure that on exceptions from the test infrastructure there is no retry.

BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18313 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-16 10:56:52 +00:00
machenbach@chromium.org
3c601ff5b5 Add last-push check to automatic push-to-trunk script.
Make sure the script is not trying a push-to-trunk twice in a row.

This also passes through some command line parameters.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18306 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-11 15:27:38 +00:00
machenbach@chromium.org
7a8a098a5e Make squash commits step more pythony in push-to-trunk script.
Get rid of linux-only shell commands. Solve issue with quotation marks in commit messages.

Further behavioral change: Strip white space on line endings. Strip trailing new lines.

Test=python -m unittest test_scripts

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18305 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-11 15:05:53 +00:00
machenbach@chromium.org
34943ca0c8 Add fully automated mode to push-to-trunk script.
Now there are three modes to run the script:
(1) default: semi-automated
(2) manual (-m option), like in the old script
(3) forced (-f option), no user input required no editor check

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-04 08:47:18 +00:00
machenbach@chromium.org
9087d5f865 Mock out date call in push-to-trunk script for testability.
TEST=python -m unittest test_scripts.ScriptTest.testPrepareChangeLog
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-03 12:38:25 +00:00
machenbach@chromium.org
0fd8169408 Fix change log generation in push-to-trunk script.
Fixed missing parenthesis in regular expression. The log checker matched on the word "true" and included a wrong change log entry.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-03 09:13:51 +00:00
machenbach@chromium.org
010756b427 Add retry feature for push-to-trunk script.
Make url accesses retry. Git retry requires some more analysis of git output first (follow up CL).

BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-02 09:53:28 +00:00
machenbach@chromium.org
5201e8c396 Improve and refactor push-to-trunk script.
Let change log formatter squash title and bug reference. Repair wrongly indented first line in change log. Add automatic rietveld reload of commit messages to enable late corrections.

BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18057 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-25 14:20:39 +00:00
machenbach@chromium.org
416e82bb24 Pythonification and refactoring of push-to-trunk.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17995 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-22 09:48:43 +00:00
machenbach@chromium.org
870c32e4b1 Make auto-roll testable.
Refactor the mock code for easier reuse. Mock out web requests.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17987 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-22 07:56:00 +00:00
machenbach@chromium.org
121ef80c10 Let ChangeLog get auto-generated in push-to-trunk script.
BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17951 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-21 09:35:25 +00:00
machenbach@chromium.org
718b38648f Force 'git cl upload' in push-to-trunk forced mode.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17926 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 13:53:11 +00:00
machenbach@chromium.org
8b38259728 Add forced mode to push-to-trunk script.
This CL depends on https://codereview.chromium.org/65933003/.

BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17893 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 08:49:42 +00:00
machenbach@chromium.org
6fcd94cc7c Refactor and improve bug line generation for push-to-trunk.
BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17892 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-20 08:25:17 +00:00
machenbach@chromium.org
775201dbd1 Add initial auto-roll script.
To be called with a cron job.

TEST=tools/push-to-trunk/auto_roll.py

TODO: Add a revision filter to allow "MIPS" related changes to take over the lkgr.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17833 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-18 14:10:47 +00:00
machenbach@chromium.org
a2c722a7b3 Fixed blocking dcommit in push-to-trunk script.
BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17750 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-14 14:50:17 +00:00
machenbach@chromium.org
f27eca66b3 Add more test coverage to push-to-trunk script.
Ensure that fetching commits works with huge change logs. The verbosity option will help debugging when dcommit hangs.

BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17645 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-12 13:11:15 +00:00
machenbach@chromium.org
a8f77a54cf Add push-to-trunk python port.
Preliminary version.

TODO: Add wrapper script in tools dir.
TODO: Some refactoring.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-08 14:27:16 +00:00