New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 676588 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocked on:
issue 676669
issue 710322
issue 711127
issue 711128

Blocking:
issue 578344


Participants' hotlists:
blink-rename


Sign in to add a comment

rewrite_to_chrome_style: Implement rebase helper to reduce pitchfork and torch demand

Project Member Reported by dcheng@chromium.org, Dec 22 2016

Issue description

Implementing primiano's strategy (maintain a per-file list of edits) as a merge driver, so it should Just Work... if we're lucky. Ideally, this will only kick in if you're merging over the rename commit.

There will be some complication with moved files. Oh well.

Bonus: make it so rebasing / merging over the commit automatically first merges up to rename^, then rebases to rename, then to the head of the tracked branch.
 

Comment 1 by dcheng@chromium.org, Dec 22 2016

Blockedon: 676669
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2bd7f8bf68e7f57558106183333d7763c8def486

commit 2bd7f8bf68e7f57558106183333d7763c8def486
Author: Daniel Cheng <dcheng@chromium.org>
Date: Thu Dec 22 20:52:53 2016

rewrite_to_chrome_style: associate replacements with the affected file

To make the rebase helper more accurate, track edits on a per-file
basis. The theory is that within a file, a simple search-and-replace
approach can work more reliably without depending on as much contextual
information (e.g. detecting whether something is a method call or not).

BUG= 676588 
R=lukasza@chromium.org

Review-Url: https://codereview.chromium.org/2597863002 .
Cr-Commit-Position: refs/heads/master@{#440496}

[modify] https://crrev.com/2bd7f8bf68e7f57558106183333d7763c8def486/tools/clang/rewrite_to_chrome_style/CMakeLists.txt
[add] https://crrev.com/2bd7f8bf68e7f57558106183333d7763c8def486/tools/clang/rewrite_to_chrome_style/EditTracker.cpp
[add] https://crrev.com/2bd7f8bf68e7f57558106183333d7763c8def486/tools/clang/rewrite_to_chrome_style/EditTracker.h
[modify] https://crrev.com/2bd7f8bf68e7f57558106183333d7763c8def486/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
[modify] https://crrev.com/2bd7f8bf68e7f57558106183333d7763c8def486/tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc
[modify] https://crrev.com/2bd7f8bf68e7f57558106183333d7763c8def486/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Apr 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2752771ce493bd0ee1bb35bf0ddc6fd4b9e3b802

commit 2752771ce493bd0ee1bb35bf0ddc6fd4b9e3b802
Author: dcheng <dcheng@chromium.org>
Date: Wed Apr 05 23:49:42 2017

blink_rename_merge_helper: Implement run.py loader stub

The entire tool will be committed in git; however, only the run.py
loader stub will run directly from the git repository. run.py only
exists to bootstrap the remainder of the toolchain, which will be
dynamically pulled from Google Storage as needed.

The reason for splitting up the tool this way is so that the tool
itself can be updated as needed after the Blink rename (e.g. by
marking the commit where the Blink rename was performed), while
still having these changes visible during a merge/rebase (when
the repository may be temporarily synced to an older commit).

BUG= 676588 
R=thakis@chromium.org

Review-Url: https://codereview.chromium.org/2802743003
Cr-Commit-Position: refs/heads/master@{#462276}

[add] https://crrev.com/2752771ce493bd0ee1bb35bf0ddc6fd4b9e3b802/tools/blink_rename_merge_helper/.gitignore
[add] https://crrev.com/2752771ce493bd0ee1bb35bf0ddc6fd4b9e3b802/tools/blink_rename_merge_helper/COMPONENTS
[add] https://crrev.com/2752771ce493bd0ee1bb35bf0ddc6fd4b9e3b802/tools/blink_rename_merge_helper/OWNERS
[add] https://crrev.com/2752771ce493bd0ee1bb35bf0ddc6fd4b9e3b802/tools/blink_rename_merge_helper/README.md
[add] https://crrev.com/2752771ce493bd0ee1bb35bf0ddc6fd4b9e3b802/tools/blink_rename_merge_helper/pylib/__init__.py
[add] https://crrev.com/2752771ce493bd0ee1bb35bf0ddc6fd4b9e3b802/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/__init__.py
[add] https://crrev.com/2752771ce493bd0ee1bb35bf0ddc6fd4b9e3b802/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/driver.py
[add] https://crrev.com/2752771ce493bd0ee1bb35bf0ddc6fd4b9e3b802/tools/blink_rename_merge_helper/run.py

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9294c4d4bf42d0b3658be583b0603f1cf3715009

commit 9294c4d4bf42d0b3658be583b0603f1cf3715009
Author: Daniel Cheng <dcheng@chromium.org>
Date: Sat Apr 08 00:31:12 2017

blink_rename_merge_helper: package clang includes as well.

Without this, the clang tool will complain about missing headers from
the standard library. On Mac, this includes libc++ as well.

BUG= 676588 
R=lukasza@chromium.org

Review-Url: https://codereview.chromium.org/2806033003 .
Cr-Commit-Position: refs/heads/master@{#463073}

[modify] https://crrev.com/9294c4d4bf42d0b3658be583b0603f1cf3715009/tools/blink_rename_merge_helper/COMPONENTS

Project Member

Comment 8 by bugdroid1@chromium.org, Apr 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8e086de61c2d37fc7b65ada3aba104c7cd792f90

commit 8e086de61c2d37fc7b65ada3aba104c7cd792f90
Author: Daniel Cheng <dcheng@chromium.org>
Date: Sat Apr 08 01:36:05 2017

blink_rename_merge_helper: Roll clang tool to pick up fixes.

c05e44858874 Adding a missing comma between "counterMaps" and "document".
3f4f524dcb87 Requiring Get prefix for 2 more methods (to avoid conflicts after Blink rename).
7ce718fb7d7e Requiring Get prefix for 13 more methods (to avoid conflicts after Blink rename)
0f822b53c059 Requiring Get prefix for 5 more methods (to avoid conflicts after Blink rename).
5ecbba9425df Stop renaming |at| method to maintain compatibility with STL algorithms.

BUG= 676588 
TBR=lukasza@chromium.org

Review-Url: https://codereview.chromium.org/2806943002 .
Cr-Commit-Position: refs/heads/master@{#463100}

[modify] https://crrev.com/8e086de61c2d37fc7b65ada3aba104c7cd792f90/tools/blink_rename_merge_helper/COMPONENTS

Project Member

Comment 9 by bugdroid1@chromium.org, Apr 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/690bc6c1e3286fd3e02cf6d342287e6159d08b04

commit 690bc6c1e3286fd3e02cf6d342287e6159d08b04
Author: Daniel Cheng <dcheng@chromium.org>
Date: Sun Apr 09 01:19:21 2017

blink_rename_merge_helper: Roll clang tool and data files.

- Rolls the clang tool for Mac and Linux to also use the parent map hack.
- Adds a data dependency for things like the IDL blocklist

BUG= 676588 
R=avi@chromium.org

Change-Id: I20e6102a39572dee4a5634cbfb0a89e060c140d4
Reviewed-on: https://chromium-review.googlesource.com/472387
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#463135}
[modify] https://crrev.com/690bc6c1e3286fd3e02cf6d342287e6159d08b04/tools/blink_rename_merge_helper/COMPONENTS

Project Member

Comment 10 by bugdroid1@chromium.org, Apr 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d5df028c94de16ee0903b1c2f9ab5d39179d38af

commit d5df028c94de16ee0903b1c2f9ab5d39179d38af
Author: Daniel Cheng <dcheng@chromium.org>
Date: Sun Apr 09 02:10:51 2017

blink_rename_merge_helper: roll fixes for win clang tool and idl blocklist

- Fixes generated file detection on Windows
- Adds toString and toJSONForBinding to the IDL blocklist

BUG= 676588 

Change-Id: I2cda30f9260607e168e2dcf7958419b13d58fa0f
Reviewed-on: https://chromium-review.googlesource.com/472526
Reviewed-by: Lukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#463137}
[modify] https://crrev.com/d5df028c94de16ee0903b1c2f9ab5d39179d38af/tools/blink_rename_merge_helper/COMPONENTS

Note: the rebase helper is more or less ready (it's in review at https://chromium-review.googlesource.com/c/472569/), but there's a few things that need investigation before I'm comfortable announcing this to blink-dev/chromium-dev.
Blockedon: 710322
Blockedon: 711127
Blockedon: 711128
Project Member

Comment 15 by bugdroid1@chromium.org, Apr 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7ab5b442bf2f5d90ebfc15818b26b92c85a1e3ca

commit 7ab5b442bf2f5d90ebfc15818b26b92c85a1e3ca
Author: Daniel Cheng <dcheng@chromium.org>
Date: Thu Apr 13 18:12:38 2017

Rebase helper for Blink rename

The general workflow is:
- switch to a branch that needs to be rebased
- run the script with --prepare
- run the script with --update

Internally, what the tool does is it runs the clang tool
across the local branch and records the result. During
the actual conflict resolution for rebasing across the
rename commit, it uses the previously recorded result
to help resolve conflicts.

This is a fairly heavyweight process, and for simpler
patches, it's likely more efficient to just rebase the
patch manually.

While this script should be able to help with chained
branches, usage is tricky: all the dependent branches,
from root to child, should be prepared with --prepare
first before running --update from root to child.

Bug:  676588 
Change-Id: I67790467f341ffeb5a696636fe3e43bb7f663f40
Reviewed-on: https://chromium-review.googlesource.com/472569
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#464471}
[modify] https://crrev.com/7ab5b442bf2f5d90ebfc15818b26b92c85a1e3ca/tools/blink_rename_merge_helper/COMPONENTS
[add] https://crrev.com/7ab5b442bf2f5d90ebfc15818b26b92c85a1e3ca/tools/blink_rename_merge_helper/data/idl_blocklist.txt
[add] https://crrev.com/7ab5b442bf2f5d90ebfc15818b26b92c85a1e3ca/tools/blink_rename_merge_helper/data/manual.patch
[add] https://crrev.com/7ab5b442bf2f5d90ebfc15818b26b92c85a1e3ca/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/auto_squasher.py
[modify] https://crrev.com/7ab5b442bf2f5d90ebfc15818b26b92c85a1e3ca/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/driver.py
[add] https://crrev.com/7ab5b442bf2f5d90ebfc15818b26b92c85a1e3ca/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/merge.py
[modify] https://crrev.com/7ab5b442bf2f5d90ebfc15818b26b92c85a1e3ca/tools/blink_rename_merge_helper/run.py
[modify] https://crrev.com/7ab5b442bf2f5d90ebfc15818b26b92c85a1e3ca/tools/clang/scripts/apply_edits.py
[modify] https://crrev.com/7ab5b442bf2f5d90ebfc15818b26b92c85a1e3ca/tools/clang/scripts/extract_edits.py

Status: Fixed (was: Started)
As done as it will get.
Project Member

Comment 17 by bugdroid1@chromium.org, Feb 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/345fe03c2430e9d4b94810c15a469c3624ac186b

commit 345fe03c2430e9d4b94810c15a469c3624ac186b
Author: Daniel Cheng <dcheng@chromium.org>
Date: Fri Feb 23 22:36:52 2018

Remove Blink rename merge helper.

Bug:  676588 ,  711127 
Change-Id: I4ee8c447379f924c55410805ebc9fbc219fc7864
Reviewed-on: https://chromium-review.googlesource.com/924651
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538929}
[delete] https://crrev.com/70af5e98e7dabca59b8e42cbc3d99e3fdf6d0117/tools/blink_rename_merge_helper/.gitignore
[delete] https://crrev.com/70af5e98e7dabca59b8e42cbc3d99e3fdf6d0117/tools/blink_rename_merge_helper/COMPONENTS
[delete] https://crrev.com/70af5e98e7dabca59b8e42cbc3d99e3fdf6d0117/tools/blink_rename_merge_helper/OWNERS
[delete] https://crrev.com/70af5e98e7dabca59b8e42cbc3d99e3fdf6d0117/tools/blink_rename_merge_helper/README.md
[delete] https://crrev.com/70af5e98e7dabca59b8e42cbc3d99e3fdf6d0117/tools/blink_rename_merge_helper/data/idl_blocklist.txt
[delete] https://crrev.com/70af5e98e7dabca59b8e42cbc3d99e3fdf6d0117/tools/blink_rename_merge_helper/data/manual.patch
[delete] https://crrev.com/70af5e98e7dabca59b8e42cbc3d99e3fdf6d0117/tools/blink_rename_merge_helper/pylib/__init__.py
[delete] https://crrev.com/70af5e98e7dabca59b8e42cbc3d99e3fdf6d0117/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/__init__.py
[delete] https://crrev.com/70af5e98e7dabca59b8e42cbc3d99e3fdf6d0117/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/auto_squasher.py
[delete] https://crrev.com/70af5e98e7dabca59b8e42cbc3d99e3fdf6d0117/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/driver.py
[delete] https://crrev.com/70af5e98e7dabca59b8e42cbc3d99e3fdf6d0117/tools/blink_rename_merge_helper/pylib/blink_rename_merge_helper/merge.py
[delete] https://crrev.com/70af5e98e7dabca59b8e42cbc3d99e3fdf6d0117/tools/blink_rename_merge_helper/run.py

Sign in to add a comment