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
There is 2 changes while moving the code:
- Making externals handling an option.
- Not trapping EnvironmentError.
This code will be reused by the commit queue.
TEST=unit tests
BUG=none
Review URL: http://codereview.chromium.org/6250177
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@74181 0039d316-1c4b-4281-b951-d872f2087c98
For example, TODO(foo) is ok, but TODO: do something is not.
BUG=none
TEST=included
Review URL: http://codereview.chromium.org/6413004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@74032 0039d316-1c4b-4281-b951-d872f2087c98
Otherwise the following presubmit checks where never called.
TBR=nsylvain
BUG=
TEST=fixes unit tests
Review URL: http://codereview.chromium.org/5995003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@69844 0039d316-1c4b-4281-b951-d872f2087c98
Change RunPylint to parse all .py files when one is modified.
Make all depot_tools/tests pass on pylint. That mostly meant fixing some
builtins aliasing, wrong alignment and turning off most remaining warnings.
BUG=none
TEST=unit tests
Review URL: http://codereview.chromium.org/5695007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@69159 0039d316-1c4b-4281-b951-d872f2087c98
Adding it as I figured out how to make it run correctly on ubuntu 10.4 and it's
used in enough places it warrants a canned check.
BUG=none
TEST=it self tests itself.
Review URL: http://codereview.chromium.org/5682011
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@69051 0039d316-1c4b-4281-b951-d872f2087c98
Most of them are style issues or variable aliasing.
TEST=Can almost enable pylint warnings
BUG=none
Review URL: http://codereview.chromium.org/4360002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@64908 0039d316-1c4b-4281-b951-d872f2087c98
This is especially annoying on empty __init__.py files.
TEST=new unit test
BUG=none
Review URL: http://codereview.chromium.org/4310001
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@64904 0039d316-1c4b-4281-b951-d872f2087c98
These are the same that the one in chromium's src/PRESUBMIT.py but slightly more
resilitent to exceptions.
Empirical studies have shown that exceptions in presubmit checks result in
disorientation and lack of willingness to commit.
TEST=OMG new unit tests!
Review URL: http://codereview.chromium.org/1119003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@42102 0039d316-1c4b-4281-b951-d872f2087c98
Moved tests/pymox to third_party/pymox
Moved upload.py to third_party/upload.py
Fixed tests so they can run standalone
Fixed the executable bit on some scripts
TEST=none
BUG=34376
Review URL: http://codereview.chromium.org/562031
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@37987 0039d316-1c4b-4281-b951-d872f2087c98
This makes it easier to apply commands to a set of files. For example:
Run the command: svn pset svn:eol-style LF \
chrome/browser/extensions/extension_accessibility_apitest.cc \
chrome/browser/extensions/extension_accessibility_api_constants.cc \
chrome/browser/extensions/extension_accessibility_api.h \
chrome/browser/extensions/extension_accessibility_api.cc \
chrome/browser/extensions/extension_accessibility_api_constants.h \
chrome/browser/gtk/accessible_widget_helper_gtk.h \
chrome/browser/gtk/accessible_widget_helper_gtk.cc \
chrome/browser/gtk/accessibility_event_router_gtk.h \
chrome/browser/gtk/accessibility_event_router_gtk.cc \
chrome/common/accessibility_events.cc \
chrome/common/accessibility_events.h
requires just 1 copy-paste.
Review URL: http://codereview.chromium.org/552202
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@37350 0039d316-1c4b-4281-b951-d872f2087c98
It does a regexp search on the file contents to make sure it contains expected license boiler plate.
It is a generalization to implement the equivalent of ubuntu's license check script into the corresponding PRESUBMIT.py files.
TEST=unit tests
BUG=28291
Review URL: http://codereview.chromium.org/558007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@37338 0039d316-1c4b-4281-b951-d872f2087c98
add this to PRESUBMIT.py in the chromium tree later).
- Update cpplint.py to the latest version from the style guide.
Review URL: http://codereview.chromium.org/395022
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32180 0039d316-1c4b-4281-b951-d872f2087c98
the root of the source tree. It is similar to "gclient diff", and
shares much of the implementation, but it seems that developers may
want the semantics of each in different situations, which is why it is
being added as a new command.
Generalized SubprocessCallAndCapture into SubprocessCallAndFilter.
Added RunSVNAndFilterOutput; changed RunSVNAndGetFileList to use it.
Fixed problem in presubmit_canned_checks.py where it was not working
on Windows. Updated unit tests for gclient.
Review URL: http://codereview.chromium.org/193004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@25410 0039d316-1c4b-4281-b951-d872f2087c98
It was totally broken until I actually tried it. Fix the test accordingly.
TEST=unit test
BUG=none
Review URL: http://codereview.chromium.org/149096
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@19433 0039d316-1c4b-4281-b951-d872f2087c98
The unit tests could modify global state in hard-to-revert ways and would make the PRESUBMIT.py check flaky.
Having the test running out of process alleviate any potential issue at the cost of speed (more noticeable on Windows).
TEST=unit tests
BUG=none
Review URL: http://codereview.chromium.org/147035
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@19248 0039d316-1c4b-4281-b951-d872f2087c98
The output is only shown when it's failing. It makes the presubmit check much cleaner.
Also rename TestDescription and TestContent that were ill named.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/118415
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@18055 0039d316-1c4b-4281-b951-d872f2087c98
ReadFile limits to reading files inside the repository.
CheckChangeHasNoCR reads the text files looking for \r and fails if found.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/118370
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@17857 0039d316-1c4b-4281-b951-d872f2087c98
It's less annoying to type Y than to have to rerun the scripts with --no_presubmit for certain checks.
TEST=none
BUG=none
TBR=joi
Review URL: http://codereview.chromium.org/119284
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@17838 0039d316-1c4b-4281-b951-d872f2087c98
BUG=11287
TEST=gcl commit should fail unless BUG= & TEST= exist in change list description or --no_presubmit is used.
Review URL: http://codereview.chromium.org/113294
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15905 0039d316-1c4b-4281-b951-d872f2087c98