Commit Graph

9 Commits (chrome/3987)

Author SHA1 Message Date
Edward Lemur 14705d8ce0 depot_tools: Make owners tests run on Python 3
Bug: 1009814
Change-Id: Ifb073dc0b54a3291f1f874866da3c0fbbeab2db9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1888443
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Michael Achenbach ff46da8d9c Presubmit: Fix relative owners check
This ensures relative file: directives in OWNERS files also work if
the directory of the owners file gets deleted.

Bug: 1015444
Change-Id: I9471a28a7246513120dd3ebb924f6d64eb50c2df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1870249
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
5 years ago
Daniel Cheng 24bca4e741 owners.py: Use os.path.split to handle file separators correctly
The script gets confused on Windows, because the path delimieter is \,
not /.

Bug: 899724
Change-Id: Id907aceb4f7bb6fcc0460245890b9e4716054ff9
Reviewed-on: https://chromium-review.googlesource.com/c/1308897
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
6 years ago
mbjorge f2d73522b8 Fix relative file: paths in OWNERS with roots other than '/'
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
9 years ago
peter@chromium.org 2ce13130dd Implement support for file: includes in OWNERS files.
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
10 years ago
dpranke@chromium.org b54a78ed9d Suggest owners for OWNERS files that only have per-file owners.
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
12 years ago
dpranke@chromium.org e3b1c3d1e3 Fix swapping of args in call to relpath() that was causing
OWNERS checks on DEPS to fail.

TBR=maruel@chromium.org
BUG=157022



git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@163192 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
dpranke@chromium.org 17cc244cdb implement per-file OWNERS support
R=maruel@chromium.org
BUG=119394


Review URL: https://chromiumcodereview.appspot.com/11114005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@162529 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 0927b7eef8 Create a new testing_support module to move utility modules there
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
13 years ago