0
Commit Graph

4 Commits

Author SHA1 Message Date
Josip Sokcevic
825b1e98c3 [tools] Don't remove empty directories
Git creates empty directories for uninitilized git submodules. If such
directory gets removed (e.g. via rmdir), git will identify that as
removing git submodule.

When tools/remove_stale_pyc_files.py runs on tools/, and if src_internal
checkout is set to false, it results in removing tools/perf/data and
having dirty state (deleted: tools/perf/data).

Bug: 1475387
Change-Id: Ia6693e0d1682d29b46d330bac426baf6c2f38b13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4808459
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1187531}
2023-08-23 22:29:22 +00:00
Avi Drissman
dfd8808526 Update copyright headers in testing/, tools/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c95.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: I3a8a7b150e7bd64690534727150646081df50439
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3900697
Reviewed-by: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047644}
2022-09-15 20:11:09 +00:00
Kent Tamura
73552e8dd9 Remove pywebsocket in webkitpy/thirdparty/.
Use //third_party/pywebsocket instead.

* tools/remove_stale_pyc_files.py
 We should walk in bottom-up order in order to remove nested
 directories containing only *.pyc.

Change-Id: I7adff11285218025ab80f4f8e1a8fc9d039c4385
Reviewed-on: https://chromium-review.googlesource.com/1004567
Reviewed-by: Adam Rice <ricea@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550924}
2018-04-16 02:17:03 +00:00
dtu
94f4bd9c8b [telemetry] Move stale .pyc check from Python import to gclient hook.
This check turns out to be fairly expensive on Windows (~150ms), and having
it at import time means we're taking the hit every time we launch
memory_cache_http_server. We only need to do this if the Python files have
changed, so move it to runhooks.

The reason this check exists in the first place is that we've had problems in
the past where e.g. someone renames foo.py to foo/__init__.py. foo.pyc remains
on the filesystem of every Chromium checkout and causes a name conflict in
Python imports - foo can refer to the compiled module or the package.

BUG=388256
TEST=git rm a file in src/tools that has a .pyc; git commit; gclient runhooks; ensure .pyc doesn't exist; undo commit

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

Cr-Commit-Position: refs/heads/master@{#291825}
2014-08-26 03:08:51 +00:00