Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: tools/git/move_source_file.py

Issue 952893003: Update from https://crrev.com/317530 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix gn for nacl Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/clang/scripts/update.py ('k') | tools/relocation_packer/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/git/move_source_file.py
diff --git a/tools/git/move_source_file.py b/tools/git/move_source_file.py
index 1a25e4480a6ee3264199ced16169af7053ffe526..18ef1ce82721ce348948d57dccd85f63d5d9ff6c 100755
--- a/tools/git/move_source_file.py
+++ b/tools/git/move_source_file.py
@@ -31,6 +31,7 @@ if __name__ == '__main__':
# classpath.
sys.path.append(os.path.abspath(os.path.join(sys.path[0], '..')))
sort_headers = __import__('sort-headers')
+import sort_sources
HANDLED_EXTENSIONS = ['.cc', '.mm', '.h', '.hh', '.cpp']
@@ -142,11 +143,13 @@ def UpdatePostMove(from_path, to_path):
from_rest = from_path
to_rest = to_path
while True:
- mffr.MultiFileFindReplace(
+ files_with_changed_sources = mffr.MultiFileFindReplace(
r'([\'"])%s([\'"])' % from_rest,
r'\1%s\2' % to_rest,
[os.path.join(visiting_directory, 'BUILD.gn'),
os.path.join(visiting_directory, '*.gyp*')])
+ for changed_file in files_with_changed_sources:
+ sort_sources.ProcessFile(changed_file, should_confirm=False)
from_first, from_rest = SplitByFirstComponent(from_rest)
to_first, to_rest = SplitByFirstComponent(to_rest)
visiting_directory = os.path.join(visiting_directory, from_first)
« no previous file with comments | « tools/clang/scripts/update.py ('k') | tools/relocation_packer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698