Commit Graph

135 Commits (885d6e890fc283d03db44281fd386d85a1c046c6)

Author SHA1 Message Date
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
maruel@chromium.org cb2985fb69 Largely reduce the number of pylint warnings and fix one typo.
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
15 years ago
maruel@chromium.org 8e13a09439 Change gcl presubmit to only run commit hooks by default.
Upload hook are only run with the --upload flag.

Most of the time the same hook is run in both case so gcl presubmit is simply 2x
slower than it could be otherwise.

TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@64779 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org bf1fdca798 Add rietveld member to ChangeInfo and use this value to contact rietveld.
This makes gcl to use a specific rietveld instance per change list. This is
useful when moving from one rietveld instance to another, so in-flight reviews
are sent to the right instance.

Also clear gcl.CODEREVIEW_SETTINGS between gcl_unittest tests to remove tests interference.

TEST=updated unit tests
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@64631 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org fa3843e6af Refactor ChangeInfo.Load() to make it easier to support mulitple format.
TEST=updated unit tests and tested manually
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@64601 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 8a8ea02a22 Refactor ChangeInfo.Load() to make it possible to switch to a new format more easily.
The new format will be introduced in the next change.

TEST=not much, mostly manually tested.
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@64600 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 79b7ef0500 Make gcl delete foo more useful by being able to delete corrupted change.
TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@64599 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 3a17425279 Reduce the number of pylint warnings in gcl.py to make refactoring simpler.
Doing static analysis on the script greatly easy refactoring since it reduces
the chances of leaving a typo in rarely executed & untested & untested code.

This is in preparation to refactor changelist on-disk format to use json.

TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@64427 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 09c0dba98f Fix a None reference exception when searching for presubmit scripts.
It happens when a user uses --diff foo.diff so the list of file is not defined.

TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@62547 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
joi@chromium.org 42c7f66733 Reuse gcl.py's code review settings when running [gcl try], as gcl is
smarter about finding the most appropriate settings file.

Before this change, I inadvertently did a [gcl try] on a chrome-internal
change (it was a trivial change and not really secret, so no harm done).
After this change, that won't be possible.

Also, change breakpad to not upload the exception that is thrown when 
the user fails to provide correct log-on credentials.

TEST=none
BUG=none


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@61738 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 7633e473f1 Even if HTTPError subclasses URLError, it doesn't have the member reason.
That's so pythonic. Use str() instead.

TBR=bradnelson
TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@60211 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 58c1938777 Swallow HTTPError exceptions for HTTP 500 so they aren't logged in breakpad.
It doesn't give me useful information.

TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@60209 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org c8f3cf80e0 Add a check when people specify wrong change list name to give a meaningful message.
I saw that in the exceptions and the current error (file not found) is not useful.

TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58978 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
thestig@chromium.org 1736800a67 Fix GetCachedFile.
BUG=none
TEST=gcl upload works when there's no codereview.settings in the cache.
Review URL: http://codereview.chromium.org/3366001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58270 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 17d01795a6 Cleanup the code in gclient_utils to standardize on CheckCall nomenclature.
Simplify code by removing fail_status
Rename print_messages to always
Simplify the doc.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58201 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org b3b494f3df Don't cache the fact that codereview.settings wasn't found.
It must always be present.

BUG=none
TBR=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58060 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 02913a53a4 Blacklist --non-interactive on MacOSX
It's broken on 10.5.2.

TEST=gcl works all the time on Mac
TBR=nsylvain

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@57381 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 2b9aa8e0b3 Refactor SubprocessCallAndFilter() to remove positional arguments.
This way the function is much more similar to subprocess.call(). Further changes
will be done, to be able to convert all the function, to be able to parallelize
output without corrupting it.

Used pylint to verify call graph correctness, causing some other unrelated
changes.

TEST=unit tests
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@57369 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 10ccd1124c Disable the use of -s or --server with gcl upload.
It contradicts the previous changes to enforce codereview.settings.

TEST=new unit test
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@57195 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 3a292688b6 Redo of r56893 with fix to support python 2.5.
Original Description:

Remove code duplication and improve style.

Create a Popen function to reduce code duplication.
Use RemoveDirectory where relevant.
Make drover slightly more posix friendly.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@57083 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org dd218e5997 Make codereview.setting syntax more liberal and add more unit tests.
Improve gclient_utils to test output lacking trailing LF

BUG=none
TEST=new unit tests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@57047 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org ad0b13da3d Revert "Remove code duplication and improve style."
This reverts commit 850ee065dd.

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56894 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 850ee065dd Remove code duplication and improve style.
Create a Popen function to reduce code duplication.
Use RemoveDirectory where relevant.
Make drover slightly more posix friendly.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56893 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 3c84298e76 Add an error message for MacOSX 10.5.2 users
TBR=bradnelson

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56880 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org b6ee167439 Add retry on svn cat and use --non-interactive flag.
The svn server fails often, causing codereview.settings not being fetched. When no valid cached credential is found, codereview.settings wouldn't be fetched either.

Enforce LANGUAGE=en for odd systems like mine.

TEST=gcl should act better with unstable svn server or invalid cached credentials
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56700 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org b826024d06 Remove the default values and add a comprehensible error message.
Review URL: http://codereview.chromium.org/3156034

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56699 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
sky@chromium.org 022879521d Changes gcl upload to print a reminder that it doesn't do a try.
Review URL: http://codereview.chromium.org/3046011

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53537 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
sky@chromium.org 5db5ba5616 Changes gcl upload to not submit a try.
This is the same as the last cl, but hopefully with the right svn
server.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53043 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 807c446de2 Add exception management on invalid codereview.settings.
Add gclient_utils.Error trapping.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@52029 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
estade@chromium.org c68f9cbc20 Allow gcl help to be run from anywhere
BUG=none
TEST=manual; gcl_unittests.py

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@50133 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 223b7191ed Fix a bug in Warn(), simplify code
TBR=bradnelson

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48961 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 6e29d572b5 Add pylintrc and fix style for many scripts.
Fix a bug in scm.SVN.DiffItem()

Reduce variable aliasing, fix alignments, etc.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48943 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 707c1487c4 Fix the array format for the gcl diff with no change list case.
TBR=nsylvain

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48755 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
nsylvain@google.com 38729704f0 Fix broken "gcl diff cl" command. We need to use full paths, not
relative path. 

bug:45589
Review URL: http://codereview.chromium.org/2447002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48680 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org d089192b11 More examples at the end of trychange.py help and move the -R flag to the right group
Review URL: http://codereview.chromium.org/2408001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48606 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org e56fe82c45 Fix argument checking in gcl.py
Otherwise, commands like "gcl commit" would throw an exception instead of a comprehensible error message.

TBR=jam

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48520 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 4357af2ece Fix typo in CMDcommit.
TBR=siggi

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48396 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 62fd693347 Massive overhaul for gcl help
Automatically generate help and enforce stricter argument parsing.
Stops from throwing an exception when run outside a subversion checkout.
Fixed gcl lint.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48386 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org ff6cf0e5b8 gcl commit must accept additional arguments.
TBR=jam

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48235 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 35fe9ada4e Use function decorator to simplify main()
Review URL: http://codereview.chromium.org/2198001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@48225 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 6386ccb236 Fix a logic error.
TBR

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@47373 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 4c22d721d4 Refactor gcl.py to use a similar pattern for every commands.
The next step will be to generate help automatically and remove the command
check loop.

TEST=not much
BUG=me

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@47291 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 2f6a0d87b1 gcl's caching was effectively disabled for > 1 year. Reenable it.
TEST=chmod a-w .svn/gcl_info/cache/codereview.settings and see if an exception is thrown when the file is recent

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@46990 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
thestig@chromium.org 08c150e06d Fix a typo in gcl.py.
BUG=none
TEST=gcl change foo does not return Unknown command: 'change' after editing the CL.
Review URL: http://codereview.chromium.org/1997003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@46602 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org a67a731cb9 Add "gcl description <change>" subcommand.
Prints the multi-line change description.
(Used in forthcoming Emacs gcl integration.)

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@46599 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 668ef5a2d6 Add "gcl rename <old-name> <new-name>" subcommand.
Review URL: http://codereview.chromium.org/1697022

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@46110 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
jabdelmalek@google.com fcff927b8c Make commit logs not have an extra http://
Review URL: http://codereview.chromium.org/1810009

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