-
Notifications
You must be signed in to change notification settings - Fork 36
Dart Roll
Ultra short version is:
Checkout this branch:
https://github.com/dart-lang/sdk/tree/_temporary_fletch_patches
Identify the commit on the master branch you want, most likely a release branch:
COMMIT_ID=`git rev-parse 1.12.1^{commit}`
or maybe master
:
COMMIT_ID=`git rev-parse origin/master`
Merge _temporary_fletch_patches with this commit using --no-edit:
git merge -X theirs --no-commit $COMMIT_ID
Make the diff empty:
git checkout $COMMIT_ID -- .
Verify that the diff is empty:
git diff $COMMIT_ID
If it is not empty, make it empty (run git rm
on files that where deleted in the commit).
Commit the merge without altering the commit message:
git commit --no-edit
To find the additional patches needed you need to find the last merge. One way to do that is to run the following command:
$ git log --oneline --merges origin/master.._temporary_fletch_patches
This will produce output like this:
f63d923 Merge commit 'af705ac989a359ef369df66de455ef934bb40634' into _temporary_fletch_patches
af705ac Version 1.12.1
3211fb1 Version 1.12.0
d6ecdcf Version 1.12.0-dev.5.10
9d06193 Version 1.12.0-dev.5.9
60db428 Version 1.12.0-dev.5.6
a7b86fe Merge tag '1.12.0-dev.5.5' into _temporary_fletch_patches
a679d28 Version 1.12.0-dev.5.5
ec0f479 Version 1.12.0-dev.5.4
Each of the lines starting with Merge commit
is a merge commit. If you have already performed the steps above, the second Merge commit
is the merge that was the basis for our last Dart roll, in this case, a7b86fe
. If you Have not yet performed the steps above, the first Merge commit
is the merge that was the basis for our last Dart roll, in this case f63d923
.
Let's remember that revision:
$ last_dart_roll=a7b86fe
We can now produce a list of changes that needs to be cherry picked:
$ git log --oneline $last_dart_roll..origin/_temporary_fletch_patches 822ff59 Add fletch to task_kill.py c619107 Shorten and prettify build bot information. 92e3e0d Update download link to use 'proper' URL. 2cb8330 Use correct syntax for STEP_LINK command. d2c9cd8 Map 'mac' to 'macos'. 14b5d3d Start auto-uploading binaries for the Dart VM to GCS. 257523b First version of the bot script for building the Dart SDK with Fletch-specific patches. 0c39c78 Use vfork instead of fork on Linux. 1c621f6 Unix Domain Sockets d4f3a89 Remove WATCHLISTS.
We need to apply these revisions reversed, but "Remove WATCHLISTS." is likely to cause a conflict, so we'll handle that first:
$ git cherry-pick d4f3a89
If there's a conflict, just remove the file and commit the result:
$ git rm -f WATCHLISTS $ git commit --no-edit
You need the rest of the commits in reverse order (this works on Mac OS):
$ git log --oneline $last_dart_roll..origin/_temporary_fletch_patches | tail -r | tail +2 1c621f6 Unix Domain Sockets 0c39c78 Use vfork instead of fork on Linux. 257523b First version of the bot script for building the Dart SDK with Fletch-specific patches. 14b5d3d Start auto-uploading binaries for the Dart VM to GCS. d2c9cd8 Map 'mac' to 'macos'. 2cb8330 Use correct syntax for STEP_LINK command. 92e3e0d Update download link to use 'proper' URL. c619107 Shorten and prettify build bot information. 822ff59 Add fletch to task_kill.py
On Linux use this command:
$ git log --oneline $last_dart_roll..origin/_temporary_fletch_patches | perl -e 'print reverse <>' | tail -n+2
It's best to save the list of commits in a file rather than having two git commands in a pipeline as they both may attempt to get a lock on the repository. So let's say we stored the above commits in a file named changes.txt
, and edited it to remove any we don't want. We can now run cherry-pick:
$ cut -d' ' -f1 changes.txt | xargs git cherry-pick [_temporary_fletch_patches 548b92f] Use vfork instead of fork on Linux. Date: Thu Jun 18 13:14:37 2015 +0200 1 file changed, 50 insertions(+), 59 deletions(-) [_temporary_fletch_patches 40fee5a] First version of the bot script for building the Dart SDK with Fletch-specific patches. Author: Kasper Lund Date: Fri Jul 3 11:08:23 2015 +0200 1 file changed, 46 insertions(+) create mode 100644 tools/bots/sdk_fletch_patched.py [_temporary_fletch_patches 052f3f4] Start auto-uploading binaries for the Dart VM to GCS. Author: Kasper Lund Date: Fri Jul 3 13:04:19 2015 +0200 1 file changed, 17 insertions(+), 8 deletions(-) [_temporary_fletch_patches 1f13cb8] Map 'mac' to 'macos'. Author: Kasper Lund Date: Fri Jul 3 13:39:14 2015 +0200 1 file changed, 11 insertions(+), 10 deletions(-) [_temporary_fletch_patches 6afc972] Use correct syntax for STEP_LINK command. Author: Kasper Lund Date: Fri Jul 3 14:26:16 2015 +0200 1 file changed, 1 insertion(+), 1 deletion(-) [_temporary_fletch_patches 0777e44] Update download link to use 'proper' URL. Author: Kasper Lund Date: Fri Jul 3 14:33:00 2015 +0200 1 file changed, 1 insertion(+), 1 deletion(-) [_temporary_fletch_patches 715e3d1] Shorten and prettify build bot information. Author: Kasper Lund Date: Fri Jul 3 14:44:09 2015 +0200 1 file changed, 2 insertions(+), 2 deletions(-) [_temporary_fletch_patches 5020b4b] Add fletch to task_kill.py Date: Thu Aug 13 16:19:05 2015 +0200 1 file changed, 18 insertions(+), 3 deletions(-)
In the above example I removed 1c621f6 because I'm testing out a new version of that patch.
git push origin _temporary_fletch_patches
Then wait for the bot building these binaries to finish. Then update the DEPS
file and the referred binaries as described in https://github.com/dart-lang/fletch/blob/master/third_party/bin/README.md