Commit Graph

957 Commits (45d8db04f9926e6a0edcd223e0b3e4e485641150)
 

Author SHA1 Message Date
maruel@chromium.org 45d8db04f9 Add more python 2.5 compatibility.
Makes all the tests runnable on python 2.5.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80068 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org df3302b382 Update upload.py to r690 and include fix for "support for git mv in rietveld"
I just don't want to wait for http://codereview.appspot.com/4333051 to be committed.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80045 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
bradnelson@google.com d57771d024 Make owners check optional.
BUG=None
TEST=None
R=thomasvl@google.com
Review URL: http://codereview.chromium.org/6728031

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80043 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 2b5ce56a97 Add RunUnitTests() and RunUnitTestsInDirectory() canned checks.
Deprecate RunPythonUnitTests() since it is a bit awkward.

Add os_listdir, os_walk and platform to InputApi.

GOAL=Slowly adds python 2.5 support for unit tests
BUG=none
TEST=new unit test
R=dpranke@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80009 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
maruel@chromium.org b35c00ce1d Fix simplejson import for Mac OSX 10.5 users
BUG=none
TEST=Poor mac users should be able to use git-cl back again.

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79932 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 5a376ed328 Revert r79779: "Removed gclient_utils.Popen() and use subprocess2's version instead."
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79781 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 242549409f Removed gclient_utils.Popen() and use subprocess2's version instead.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79779 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org e77ebbf8e1 Make git cl patch authenticate the request for the diff.
This make possible to apply private issues or rietveld instances requiring
authentication.

Forces simplejson to be installed or uses python 2.6's json

Make local_rietveld.py usable standalone.

R=dpranke@chromium.org
TEST=unit tests + manual testing, owners.sh is currentl broken, unrelated to this change.
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79734 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 2a74d37e28 Move git_cl back into depot_tools.
Remove git_cl_hooks.py since it's now unnecessary.

BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79715 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org de568681f1 Disable owners.sh for now since it's known to fail.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79682 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
bradnelson@google.com 393460b7b3 Making license presubmit check more verbose.
BUG=None
TEST=None
R=dpranke@chromium.org
Review URL: http://codereview.chromium.org/6768006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79644 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 711a70bf5e add myself to watchlist
Review URL: http://codereview.chromium.org/6757013

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79597 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
mark@chromium.org edf744da57 Relax |const NSClass*| PRESUBMIT check to not detect false positives when
encountering Foundation types that are not id-derived, including NSPoint, 
NSRange, NSRect, and NSSize. 

BUG=77438
TEST=Modify chrome/browser/renderer_host/render_widget_host_view_mac.mm
Review URL: http://codereview.chromium.org/6755007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79564 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 8062cc3a49 Align local_rietveld.py at +2 like the rest of the code.
No behavior change.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79522 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 03cc6ee972 Update rietveld to r681.
Remove django since it's not necessary anymore, rietveld now uses django 1.2 and
it's included in GAE SDK.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79521 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
thomasvl@chromium.org d6f89d862e Let the unittest avoid the upstream change.
Review URL: http://codereview.chromium.org/6696080

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79452 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 4860f0527a Copy subprocess2 from commit-queue so it can be reused here.
A lot of functions in gclient_utils and elsewhere will be deleted.

Not used yet, committed as a separate change so it can be rubberstamped. :)

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79449 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 0a2bb37a5f improve logging slightly
Review URL: http://codereview.chromium.org/6736018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79356 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org cfa826c984 Catch exception thrown on certain locale setup
Mostly happening on Mac. Will investigate later.

TBR=dpranke
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79354 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 3e331bdf16 Clean up the parsing of approvals for OWNERS checks.
This fixes bugs 76724. We will now allow approvals from
only non-owners to be sufficient if the patch is from an OWNER.

Also, this strips out the code for suggesting reviewers during upload completely. I've come to believe that this should be done by gcl and git-cl directly rather than through a presubmit hook, when the change is being initially created. CheckOwners() is now a no-op on upload.

(We might need to add a new value to the codereview.settings file instead to indicate if we want this to happen).

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79339 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 2295005511 Make sure the GAE SDK don't look for SDK updates while running presubmit checks
Otherwise the local Rietveld instance could mysteriously hang.

TEST=presubmit check won't fail even if an old version of the SDK is used
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79338 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 0d1bdeadb7 fix a few minor lint and test issues. Note that presubmit_canned_checks
should never import any modules directly but always access modules
through input_api.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79337 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
bradnelson@google.com 56e48bcb48 Moving several chromium presubmit checks into the common pool for use in other
projects.

BUG=None
TEST=None

R=erikkay@chromium.org,dpranke@chromium.org,maruel@chromium.org
Review URL: http://codereview.chromium.org/6713101

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79316 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
thomasvl@chromium.org 668667c0b9 Move where the check is to handle things not being checked out yet.
Review URL: http://codereview.chromium.org/6676119

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79301 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
thomasvl@chromium.org 858d645a31 Add support to check if the url has changed for a git dep and create a new clone.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6732023

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79298 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org fbe3d3015c Update upload.py to r680 from upstream.
Removed all the local hacks as they are not necessary anymore.

R=dpranke@chromium.org
BUG=none
TEST=manually verified that HTTP 302 redirect works fine.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79296 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org f8b3f94571 When diffing against an old revision, handle the case if a file didn't exists.
Generate a fake diff instance of crashing.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79290 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 604a5895ef Fix presubmit check output when the items are AffectedFile instances.
R=dpranke@chromium.org
BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79217 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
tony@chromium.org e155bcdd1d Fix an exception raised when trying to gclient sync on a Mac
with python 2.5.1.

Traceback (most recent call last):
  File "/Users/tc/depot_tools/gclient.py", line 1270, in <module>
    fix_encoding.fix_encoding()
  File "/Users/tc/depot_tools/fix_encoding.py", line 350, in fix_encoding
    ret &= fix_default_encoding()
  File "/Users/tc/depot_tools/fix_encoding.py", line 51, in
fix_default_encoding
    lang = locale.getlocale(aref)[0]
  File
"/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/locale.py",
line 460, in getlocale
    return _parse_localename(localename)
  File
"/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/locale.py",
line 373, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: C/UTF-8/C/C/C/C

R=dpranke@chromium.org,chase@chromium.org,bradnelson@google.com,maruel@chromium.org,evan@chromium.org,nsylvain@chromium.org,nsylvain@google.com
Review URL: http://codereview.chromium.org/6730008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79213 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 972c6acdee add test with an OWNERS file that has names plus a wildcard
Review URL: http://codereview.chromium.org/6717004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79206 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 529e97b799 Prints the depot_tools update notification to stderr instead of stdout.
Otherwise it's painful when using tricks like $(git cl upstream).

R=sky@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79084 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
bauerb@chromium.org 866276c2ec Add support for wildcards in svn remote configuration.
BUG=none
TEST=manual

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78741 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 5c8c6de7e5 Make sure warnings fail the check when may_prompt=False.
Split presubmit_support.Main() in two to make it simpler.

Handle better the case with unversioned files and add a unit test.

R=dpranke@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78700 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 6a2d08300c fix failed rename of args
TBR=maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78668 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 97ae58eb0a Make git_cl (and everything else not skipped under depot_tools)
pass pylint cleanly.

There should be no functional changes in this patch, although there's at least one minor bug that lint caught.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78638 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
dpranke@chromium.org 8d84041516 Enable OWNERS file enforcement in depot_tools
R=chase@chromium.org,maruel@chromium.org
Review URL: http://codereview.chromium.org/6676058

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78632 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 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 1b98c432ca Check for a missing scheme in the input_api.host.
R=chase@chromium.org,maruel@chromium.org
Review URL: http://codereview.chromium.org/6712007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78599 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 82e5f28e29 Improve presubmit_support main by not stripping arguments.
Necessary for commit queue.

R=dpranke@chromium.org


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78538 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