Commit Graph

181 Commits (064186cfb98116540a0cc512da7f8ae993b84f61)

Author SHA1 Message Date
asvitkine@chromium.org 1516995e79 Support for |change| argument to |GetPreferredTrySlaves()|, try 2.
Needed to make it so changes containing only *.mm are only sent to Mac trybots by default.

BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102930 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 6fb14d906b Revert r102783 "Support for |change| argument to |GetPreferredTrySlaves()|."
Cause an infinite recursion in some context.

TBR=asvitkine@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102836 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 7af6c4dc80 Use universal EOL conversion when calling the text editor in gcl.
This was causing issues for windows user with notepad2.

Fix trychange.py on python2.5.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102797 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
asvitkine@chromium.org c0c424bca4 Support for |change| argument to |GetPreferredTrySlaves()|.
Needed to make it so changes containing only *.mm are only sent to Mac trybots by default.

BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102783 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
jam@chromium.org f1c2f43cad Fix gcl sometimes stripping the new line characters when changing the issue description on the server. This change replaces \n with \r\n before giving the description to the editor on Windows (not through cygwin though), and then replaces \r\n with \n when saving it locally or sending it to reitveld.
BUG=95618
Review URL: http://codereview.chromium.org/7875004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101863 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org e13e12a8ad Reorder gcl.py imports and remove gclient_utils.Popen() usage
R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100172 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
asvitkine@chromium.org 8b8d8bef35 Add lint check against "Foo *bar" and "Foo &bar" declarations.
Depends on extension mechanism for cpplint.py: http://codereview.appspot.com/4950069/

Pulls r74 of cpplint.py from:
http://google-styleguide.googlecode.com/svn-history/r74/trunk/cpplint/cpplint.py

Taken from WebKit's fork of cpplint.py.

WebKit patch was: http://trac.webkit.org/changeset/46856

Credit Torch Mobile, Inc. who have contributed the WebKit patch in question.

BUG=none
TEST=Run gcl lint on a CL that has a Foo *bar style declaration.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100151 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org cc73ad68ff Remove manual --tbr support and convert it into automatic TBR= detection.
It result in less code, forces uploading the change for eventual review and most
importantly enables the commit queue to correctly handle this.

BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@91575 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 239f411a1d Add --rietveld_XXX arguments to presubmit_support to the commit queue can use it.
presubmit_support.py can now creates a Rietveld object on its own.

This is necessary since the object needs to be recreated out of process. The
commit queue runs the presubmit check out of process for sanity reasons.

Added TODO to push the cookie instead of the password.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@87842 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 2a471073e8 Make gcl and git-cl don't throw when a vim user does :cg
That's just noise for the maintainer.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@84803 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 6493ed1980 Fix rietveld_url parameter, remove default argument and realign code.
TBR=dpranke@chromium.org
BUG=
TEST=

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81579 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 58407af8be Add author to Change object. Don't set it yet.
It's mostly to be used with the commit queue.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81326 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org cab38e994e First stab at using Rietveld wrapper object in both gcl.py and git-cl.
Exposes InputApi.rietveld and deprecate host_url.

This is useful since it places authentication at a single place.

BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81019 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 31cb48a436 First pass to transition away for gclient_utils.Error and gclient_utils.CheckedCallError.
Make sure every site that catches gclient_utils.Error also catch
subprocess2.CalledProcessError.

BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80339 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 9ce0dff69d upload.py has a raw_input() that keeps on throwing crap, try to trap it as much as possible.
Otherwise I get useless stack traces and the user too.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80338 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org a2d7edf8fc gcl delete <non-existent change> won't throw an exception anymore
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80337 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
maruel@chromium.org 8cceb18f4b Forcibly uses a non-standard port for local svn and git servers.
This reduces the likehood of conflict with local server and makes possible to
run this check two times in parallel.

R=dpranke@chromium.org
TEST=moar unit tests
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79281 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 18f99c2865 For now, stop suggesting reviewers during 'gcl change'.
This fixes an issue where we would suggest '*' and then choke on the text
down the road. Also, the suggestions were not yet very useful.

R=maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79227 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 35625c7e56 Fix locale.getlocale() exception.
Reapply r79006 with fixes for ubuntu 10.4.

The only change is in fix_default_encoding() to trap an exception
locale.getlocale() may throw.

R=dpranke@chromium.org
BUG=none
TEST=unit test

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79144 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org f946b22f96 Revert r79006: "Add code to 'fix' python encoding and it's unit test."
It is causing exception for some users on ubuntu 10.4 with:
"category LC_ALL is not supported"

TBR=dpranke

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79012 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 8e741d3bb1 Add code to 'fix' python encoding and it's unit test.
With this code in action, I can successfully print arabic and chinese on linux
and cygwin. It fails to print chinese on my Mac but prints arabic. It prints '?'
on Windows console but it *doesn't throw* which is the biggest improvement here.
It was particularly a problem on windows because WindowsError's description text
is in the current ANSI code page so it failed to print if the text was not pure
ASCII, like error message when using Windows' French UI.

R=dpranke@chromium.org
BUG=none
TEST=manual unit test ./tests/fix_encoding_test.py and it shouldn't throw

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79006 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 20254fc742 Revert r79002 - bug processing reviewer lists
TBR=maruel@chromium.org

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79005 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 0c20c2fc23 The parsing of change descriptions had a lot of overlap and inconsistencies between gcl and git-cl. In particular, we weren't handling TBR= consistently, or probably a few other things.
This change moves most of the code into presubmit_support and gclient_utils and just leaves the formatting differences for the messages between the two tools.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79002 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 73ac0f11e3 Apparently when I changed OptionallyDoPresubmitChecks() to return the
output object, I forgot to modify the commit command, and so now we're
ignoring failures complete. That's not good :( 

Landing w/o review (but with unit tests!) to minimize damage.
Review URL: http://codereview.chromium.org/6688017

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78627 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 624973b7d8 Fix some of the spacing in the description.
R=chase@chromium.org,maruel@chromium.org
Review URL: http://codereview.chromium.org/6674049

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78601 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org b68786e8b1 Add tests that were annoyingly missed on the previous checkin, and fix
bugs that for some reason the presubmit missed the first time around.

TBR=chase@chromium.org,maruel@chromium.org

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78497 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 30becc2d1a Fix gcl to pass in the suggested owners properly in order to fix the bug introduced in r78329 (we were passing in a generator to the owners object and it needed to be a list). Fix a couple of other minor bugs related to suggesting reviewers while we're at it.
R=chase@chromium.org,maruel@chromium.org
Review URL: http://codereview.chromium.org/6673104

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78486 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 96b6b3bffd Revert both r78355 and r78329
"Fix regression introduced in r78329."
"Modify gcl to use suggested_reviewer output from presubmit_support."

My quick fix was insufficient.

TBR=dpranke

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78356 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org dbe4058f51 Fix regression introduced in r78329.
This really needs a unit test.

TBR=dpranke
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78355 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
mhm@chromium.org 7a09961f47 Reland again Msysgit Support for gcl and git-cl.
EDITOR environment variable shouldn't be required anymore
can contain quotes and multiple arguments.

Uses shell=True to let the shell parse the quoted string
instead of handling all forms of quotes ourselves. 

By default, msysgit ships with the TERM environment variable
set, when set to 'msys', we prepend 'env' to the executed
command. That is required so msys knows which program
to run the given file.

BUG=none
TEST=On many platforms. Win7, WinXP, Ubuntu.
Review URL: http://codereview.chromium.org/6685062

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78332 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 158f438fd2 Modify gcl to use suggested_reviewer output from presubmit_support.
Review URL: http://codereview.chromium.org/6696010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78329 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 5ac2101164 This change moves the code I added to git-cl to parse the results of the presubmit hooks into presubmit_support itself. It also removes a lot of the text-file parsing that is no longer necessary since everything is in process.
It also simplifies all of the PresubmitResult* objects and the way we're using output streams since we can assume more about how the callers are calling us.

Note that I uses PEP-8 style method names where I was adding entirely new classes (or rewriting existing classes completely) since per maruel@ he is trying to new that style for new code.

This change also contains two small changes to git_cl to fix bugs and restore the previous behavior of --force skipping the presubmit checks.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78328 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
bauerb@chromium.org d3e5754b26 Reland 77470: Don't ignore first argument in TryChange
Original review: http://codereview.chromium.org/6650025/

BUG=none
TEST=`git try foo` gives a proper error message.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78180 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
thomasvl@chromium.org ca7953a5e8 Revert part of 77946 and 77978 so things work against when EDITOR is set to
something with spaces in it.

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6686046

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78027 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
mhm@chromium.org 3e48aa74c0 Reland Usage of TERM to distinguish between msys and cygwin.
BUG=70548
TEST=check $TERM in windows
Review URL: http://codereview.chromium.org/6683035

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77978 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
jam@chromium.org 7888d9796b Revert 77954 - Use TERM to distinguish between console and msysgit.
It is cleaner this way since in Win32 console, the
value is always "dumb" while in msysgit it is always
"msys" The user shouldn't change the value of $TERM
in msysgit otherwise their whole copy of msysgit
will be flaky.

BUG=70548
TEST=check $TERM in windows

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

TBR=mhm@chromium.org
Review URL: http://codereview.chromium.org/6683033

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77972 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
mhm@chromium.org eceda5af1e Use TERM to distinguish between console and msysgit.
It is cleaner this way since in Win32 console, the
value is always "dumb" while in msysgit it is always
"msys" The user shouldn't change the value of $TERM
in msysgit otherwise their whole copy of msysgit
will be flaky.

BUG=70548
TEST=check $TERM in windows

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77954 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
mhm@chromium.org d161d848cf Reland - Support msysgit in gcl and git-cl
An explicit msysgit check is needed since it requires
the usage of 'env' to open the editor.

BUG=70550, 70548
TEST=Win,Linux 
Review URL: http://codereview.chromium.org/6680019

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77946 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
jam@chromium.org 7b8d18f0f0 Revert 77909 - msysgit - Fix issue where gcl doesn't recognize the editor.
gcl is now fully compatible with msysgit.

BUG=70550
TEST=gcl change through msysgit.

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

TBR=mhm@chromium.org
Review URL: http://codereview.chromium.org/6679026

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77929 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
jam@chromium.org 93efa03156 Revert 77913 - Regression: Editor Linux Fix for gcl.
Editor doesn't come up due to Shell=True

BUG=none
TEST=linux and win works
Review URL: http://codereview.chromium.org/6679023

TBR=mhm@chromium.org
Review URL: http://codereview.chromium.org/6684022

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77928 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
mhm@chromium.org 3843692019 Regression: Editor Linux Fix for gcl.
Editor doesn't come up due to Shell=True

BUG=none
TEST=linux and win works
Review URL: http://codereview.chromium.org/6679023

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77913 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
mhm@chromium.org 0f9ee77b9a msysgit - Fix issue where gcl doesn't recognize the editor.
gcl is now fully compatible with msysgit.

BUG=70550
TEST=gcl change through msysgit.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77909 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org d945f368d2 suppress some unimportant lint warnings
Review URL: http://codereview.chromium.org/6658013

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77882 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
bauerb@chromium.org b88c38bc4b Revert "Don't ignore first argument in TryChange."
This reverts commit 39d5bf3d5f.

TBR=maruel

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77475 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
bauerb@chromium.org 39d5bf3d5f Don't ignore first argument in TryChange.
BUG=none
TEST=`git try foo` gives a proper error message.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77470 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
evan@chromium.org dcd1522a6c patch from issue 5575008
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@69888 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org c3a15a2381 Add an alert for python < 2.5.
Don't block execution.

Python 2.4 has been untested for a while and may break unexpectedly.

TEST=manual testing
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@66870 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 41db6ef3af Fix XSRF token in gcl so we don't need to hack rietveld anymore.
Improve SendToRietveld to hardcode less function arguments.

TEST=manually tested that gcl works on both chromium and non-chromium rietveld instances
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@66499 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org b17b55beca Disable the remaining pylint warnings locally and enable pylint warnings in PRESUBMIT.
This causes some code clutter.

TEST=Increased pylint warning level
BUG=none

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

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