If an OWNERS file used the file: directive with a relative file
path, but was using a root other than '/' (e.g.
'/path/to/my/real/root'), then the include resolver would incorrectly
leave a leading '/' on the include path. When os_path.join was then
called, the leading '/' meant the path was treated as an absolute path
and the join did not behave as expected.
Review-Url: https://codereview.chromium.org/2148683003
This CL implements support for file: include lines in OWNERS files,
both as top-level directives and as per-file directives. The
paths can be either relative or absolute.
Examples of lines in OWNERS files:
file:test/OWNERS (relative, top-level)
file://content/OWNERS (absolute, top-level)
per-file mock_impl.h=file:test/OWNERS (relative, per-file)
per-file mock_impl.h=file://content/OWNERS (absolute, per-file)
A whole series of tests to cover this feature have been added
to owners_unittest.py as well.
BUG=119396, 147633
Review URL: https://codereview.chromium.org/1085993004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294854 0039d316-1c4b-4281-b951-d872f2087c98
If you were creating a new OWNERS file that only had per-file owners
in it (and no catch-all owners for the whole directory), then we
would not look for suggested owners in parent directories, and end up
suggesting nothing. See https://chromiumcodereview.appspot.com/11555036/
for the CL that revealed this.
Also, the unit tests were incorrectly using absolute paths in some cases,
making the code less predictable; I've fixed the unit tests and added
a check for this into owners.py (real changes never used absolute paths,
just paths relative to the checkout root).
R=maruel@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11569018
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@173000 0039d316-1c4b-4281-b951-d872f2087c98
It will simplify importing utility modules from other projects. Otherwise I was getting name conflicts with 'test'.
Reenable W0403 that was disabled in the previous CL.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8508015
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@109636 0039d316-1c4b-4281-b951-d872f2087c98