Commit Graph

29 Commits (1132f5f896e1efc5ff177bab377e34d5cd1a1ebd)

Author SHA1 Message Date
ikarienator@chromium.org faf3fdf736 An interactive tool to help find owners covering current change list.
BUG=77248

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@224264 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
dpranke@chromium.org dbf8b4edd4 Add a way to require approval from owners other than the author.
Right now we require approval from someone, and we require an owner
approval, but we don't require an approval from an owner *other than
the patch other*. It's conceivable that we might want this, so
I am making this a configurable argument to the presubmit check.

This will also be needed to ensure that we don't suggest you as an
owner for your own patches, when we actually know who you are.

R=maruel@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@185294 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
dpranke@chromium.org 6b1e3ee9e3 Change the OWNERS check to print files, not directories
Currently, when we run the OWNERS check, we print the list of directories
that contain the relevant OWNERS files for any modified files in a change
still needing approval. 

This has two problems:

1) if we bubble all the way up to the top level OWNERS, we print "" instead of
"src/" or something more useful (bug 157191)

2) for OWNERS files that contain per-file set-noparent entries (like changes to IPC messages), this can be really confusing because an owner of other stuff in the directory might've approved things already.

This change will now print the list of files in the CL that are still unapproved.
This might be a lot more verbose (since you get N lines rather than 1 for N files in a given directory), but hopefully it'll be clearer in the two cases above.

Also, this change takes care of some lingering clean-up in the code to rename some methods to be clearer.

R=maruel@chromium.org
BUG=157191




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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@184219 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
dpranke@chromium.org 9d66f480c8 handle OWNERS suggestions where anyone can approve better.
previously we would return "*" as one of the suggested owners when
a CL included a file that anyone could approve. If the change had
other owners, the "*" was unnecessary, and if the change only included
wildcard-owned files, "*" isn't very helpful, so I've changed the text slightly.

R=maruel@chromium.org
BUG=169168


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@177575 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
dpranke@chromium.org c591a700cc Try #3 to improve the owners suggesting algorithm.
This version handles the case where we need to suggest two reviewers
who have overlapping sets of directories they can review.

R=maruel@chromium.org
BUG=76727


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@174216 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
dpranke@chromium.org 5e5d37bf09 Revert "Try again to land the improved owners algorithm." again :).
TBR=maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@173990 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
dpranke@chromium.org 055a0dee07 Try again to land the improved owners algorithm.
Initially landed in r173784, reverted in r173808

R=maruel@chromium.org
BUG=76727


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@173979 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
dpranke@chromium.org 13f24eb0a8 Revert "Rework the owner-suggesting algorithm."
TBR=maruel@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@173808 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
dpranke@chromium.org 1a54c22b73 Rework the owner-suggesting algorithm.
It turns out that we were weighting all possible owners equally,
and picking the last one out of the list. Given the way we traversed
owners files, and given that we got rid of the "set noparent"s, this
meant that we were always suggesting Ben for just about everything.

This change implements a much smarter algorithm that attempts to balance
number of reviewers and closeness to the files under review. The unit
tests added show specific examples and explanations for why things are
chosen the way they are.

R=maruel@chromium.org
BUG=76727


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@173784 0039d316-1c4b-4281-b951-d872f2087c98
12 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 d16e48b285 allow spaces on the per-file directives in OWNERS files
R=maruel@chromium.org
BUG=163030


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@170819 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
dpranke@chromium.org 9e227d5bd5 use "/" instead of path.sep in owners glob check
R=maruel@chromium.org
BUG=157022


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@163198 0039d316-1c4b-4281-b951-d872f2087c98
13 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
zork@chromium.org 04704f7b4a Readd missing unittests for owners
TEST=Run tests/owners_unittest.py


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@137041 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
bauerb@chromium.org 82c8c210c3 Fix crash in owners.py.
BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@135806 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
zork@chromium.org 046e175ff0 Output a list of suggested OWNERS reviewers when needed.
BUG=None
TEST=Change files that need OWNERS review.  Upload the patch.  Check that the warning suggests a minimum set of reviewers.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@135619 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
pam@chromium.org f46aed992a Show a list of directories missing OWNER reviewers on upload, and show directories rather than files missing OWNER approvals on commit.
BUG=117166
TEST=covered by presubmit unittests

Review URL: http://codereview.chromium.org/9621012

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@125588 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
bauerb@chromium.org 20d1943ffb Ignore empty lines in OWNERS files.
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/7003057

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@88341 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 725f1c3b69 Add a warning if the current version of python is not 2.5
R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/6791018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80212 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org e6a4ab30db merge in fixes for python 2.5
R=maruel@chromium.org

Review URL: http://codereview.chromium.org/6740012

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79942 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 923950f75e Fix lint errors in owners file.
R=maruel@chromium.org,chase@chromium.org
Review URL: http://codereview.chromium.org/6667072

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78630 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org fdecfb77a2 Fix the owners implementation to validate method inputs.
R=chase@chromium.org,maruel@chromium.org
Review URL: http://codereview.chromium.org/6677090

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78454 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 627ea67f26 Actually check Rietveld for LGTMs ...
This change requires us to change the previous signature for the CheckOwners() hook to provide the server address and email regexp to use for parsing approvals from Rietveld.

Review URL: http://codereview.chromium.org/6657028

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77891 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 86bbf19ccf Add more tests for owners.py, remove unneeded code, make syntax errors more helpful
Review URL: http://codereview.chromium.org/6639010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77522 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 7eea259694 use PEP-8 naming for method names in owners.py, tests/owners_unittest.py
Review URL: http://codereview.chromium.org/6646007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77521 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 6dada4eef1 make tests work, implement 'set noparent', owners propagating down
Review URL: http://codereview.chromium.org/6627059

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77351 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 898a10e4bb rename OwnersFor() to ReviewersFor(), add SyntaxError exception, ANYONE wildcard constant
neither SyntaxError or ANYONE is used at, but they will be shortly.

Review URL: http://codereview.chromium.org/6609012

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@76978 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 2a00962421 Add first changes needed for OWNERS file support.
This changes adds the first pass of code needed for OWNERS files.
In total there should probably be maybe four user-visible changes:
  * new gcl/git-cl "suggest-reviewers" command
  * a presubmit hook on upload to automatically add the reviewers
  * an addition to gcl/git-cl status command that tells you
    which files still need review/approval.
  * a presubmit hook on commit to ensure all of the needed reviewers
    have approved the file.

This change implements a core "owners Database" object with the
dumbest possible algorithm for determining a covering set of reviewers,
and the skeleton of the presubmit hooks. This code will not be
used by anything yet, and is also missing unit tests.

Review URL: http://codereview.chromium.org/6581030

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@76342 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago