Commit Graph

7 Commits (2560ea76c5703ebbbc1160138797a69c9db05337)

Author SHA1 Message Date
maruel@chromium.org 075c639a4a Enforce inserting the depot_tools path as the first path in sys.path.
Otherwise if there is a file named breakpad.py for instance in the current
directory, it will be loaded instead of the one in depot_tools.

BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@73165 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org c98b047266 Strip newline/whitespace from 'which' output when
looking for non-standard-named depot_tools directory
in git cl hooks python script.  Otherwise, python
ignores the path.

Patch contributed by James Jones @ nvidia.

BUG=chromium-os:7007

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@60499 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
zbehan@chromium.org f6613be37a git-cl-upload-hook: improved finding depot_tools algorithm
* also allow PATH entry to end in / (which is valid)
* in case depot_tools cannot be located in PATH, search for them using which
* added dependency on subprocess (new in python 2.4)

M      git-cl-upload-hook

TEST=run the hook manually with:
1) PATH containing the depot_tools, depot_tools/ (success)
2) checkout of depot_tools into ~/x, and PATH containing that (success)
3) PATH not containing any copy of depot_tools (fail)
4) Several PATH entries containing gclient, not called depot_tools (success)

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@51207 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
chase@chromium.org 94ba024845 Fixes based on maruel's comments.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/281007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@29194 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
chase@chromium.org f3c9280850 Fail gracefully when we can't import hooks library.
BUG=5339
TEST=excluding depot_tools from PATH shows an
instructive error, trying to run the hook with
git_cl_hooks.py missing shows an instructive error
Review URL: http://codereview.chromium.org/264069

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@29156 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
chase@chromium.org 7658eb3c12 Alter hooks to call into depot_tools lib.
This new method allows us to install pre-cl-upload
and pre-cl-dcommit hook files which should rarely need
to be updated (with luck).  These hooks load the real
hooks lib from depot_tools which takes over execution
of the presubmit tests.

BUG=5339
TEST=hooks are run by git cl upload/dcommit and behave
as expected
Review URL: http://codereview.chromium.org/243118

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@28409 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
chase@chromium.org 41310064b1 Add git-cl upload hooks.
Provide git-cl upload and dcommit hooks based on this
single hooks file.  Installed via git-cl config.
Loads and calls the PresubmitSupport library.
Test failure before a dcommit halts the check-in.

BUG=5339
TEST=hooks file runs presubmit checks and halts
checkin (dcommit) or repeats error messages (upload).
hooks file runs and doesn't interrupt process if no
errors present.
Review URL: http://codereview.chromium.org/256075

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