You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Slashes and backslashes are interchangeable on Windows in many contexts. But not all. In particular, if you add a path to a dictionary and then try looking it up with an equivalent path that has different slashes then - not surprisingly - the lookup will fail. Therefore it is important to always use slashes when populating _paths_to_owners. This is now done, and documented. Additionally, while fnmatch.fnmatch handles comparing slash separated paths to backslash separated paths, fnmatch.translate does not. This is arguably a bug in fnmatch.translate, or at least something that should be documented. This bug is worked around by having _fnmatch sanitize file names to always use slashes, and asserting that the patterns do not contain backslashes. With these changes this command: git cl owners --ignore-current --show-all chrome/browser/BUILD.gn now correctly gives the same results as this command on Windows: git cl owners --ignore-current --show-all chrome\browser\BUILD.gn The modified test fails without the other changes, passes with them. Bug: 1009104 Change-Id: I416c7131281f00e352c1d2b85c30fcc463417fa5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1915410 Commit-Queue: Bruce Dawson <brucedawson@chromium.org> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org> |
6 years ago | |
|---|---|---|
| .. | ||
| gstools | ||
| OWNERS | 8 years ago | |
| auth_test.py | 6 years ago | |
| bot_update_coverage_test.py | 7 years ago | |
| cipd_bootstrap_test.py | 6 years ago | |
| detect_host_arch_test.py | 7 years ago | |
| download_from_google_storage_unittest.py | 7 years ago | |
| fetch_test.py | 6 years ago | |
| fix_encoding_test.py | 7 years ago | |
| gclient_cipd_smoketest.py | 6 years ago | |
| gclient_eval_unittest.py | 6 years ago | |
| gclient_git_smoketest.py | 6 years ago | |
| gclient_paths_test.py | 7 years ago | |
| gclient_scm_test.py | 6 years ago | |
| gclient_smoketest.py | 6 years ago | |
| gclient_smoketest_base.py | 6 years ago | |
| gclient_test.py | 6 years ago | |
| gclient_transitions_smoketest.py | 6 years ago | |
| gclient_utils_test.py | 6 years ago | |
| gerrit_client_test.py | 6 years ago | |
| gerrit_util_test.py | 6 years ago | |
| git_cache_test.py | 6 years ago | |
| git_cl_creds_check_report.txt | 6 years ago | |
| git_cl_test.py | 6 years ago | |
| git_common_test.py | 7 years ago | |
| git_dates_test.py | 7 years ago | |
| git_drover_test.py | 6 years ago | |
| git_find_releases_test.py | 6 years ago | |
| git_footers_test.py | 6 years ago | |
| git_hyper_blame_test.py | 6 years ago | |
| git_map_test.py | 7 years ago | |
| git_number_test.py | 7 years ago | |
| git_rebase_update_test.py | 7 years ago | |
| gsutil_test.py | 7 years ago | |
| metrics_test.py | 6 years ago | |
| my_activity_test.py | 6 years ago | |
| ninjalog_uploader_test.py | 8 years ago | |
| owners_finder_test.py | 6 years ago | |
| owners_unittest.py | 6 years ago | |
| presubmit_unittest.py | 6 years ago | |
| recipes_test.py | 8 years ago | |
| roll_dep_test.py | 6 years ago | |
| scm_unittest.py | 6 years ago | |
| subcommand_test.py | 6 years ago | |
| subprocess2_test.py | 6 years ago | |
| upload_to_google_storage_unittest.py | 7 years ago | |
| watchlists_unittest.py | 7 years ago | |