Commit Graph

181 Commits (064186cfb98116540a0cc512da7f8ae993b84f61)

Author SHA1 Message Date
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
jabdelmalek@google.com 99ccbc58a8 Remove the host_override option to upload.py. This sets the Host header, which for some reason, trips the new internal proxy.
Review URL: http://codereview.chromium.org/1798008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@45833 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
thomasvl@chromium.org e52990120b Allow the existence of ~/.gcl_upload_no_try override the default of try on upload.
Review URL: http://codereview.chromium.org/1619005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@43854 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
jam@chromium.org 83b6e4ba08 Add ability to specify that all issues are pivate in codereview.settings
TBR=maruel
Review URL: http://codereview.chromium.org/702001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@40992 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
kbr@google.com 296df6603b Modified default blacklist regexp to match nothing, as empty regexp
was matching everything. See
http://stackoverflow.com/questions/940822/regular-expression-syntax-for-match-nothing/940856 .

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@38965 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org ba55177642 Fix licensing headers and move most third party code to third_party/
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
15 years ago
thestig@chromium.org 172b6e7451 Partial revert of r37053. Put back the gcl default CODEREVIEW_SETTINGS as we had it before, except with an updated CC_LIST.
BUG=none
TEST=Using gcl from src/third_party/WebKit sends code reviews to codereview.chromium.org.
Review URL: http://codereview.chromium.org/552144

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@37069 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
thestig@chromium.org 4aa4781621 gcl.py cleanup
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/552139

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@37053 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org d9141bffa4 After much refactory, finally add significant functionalities to trychanges.py
Add real logging support.
Fix the patch path mungling that was broken earlier.
Add and proper refactor automatic gclient and gcl settings detection.
Factored so it is possible to add other autodetection algorithms.
Now works standalone in hybrid svn&git checkouts within a gclient meta-checkout.

TEST=bah
BUG=none
TBR=bradnelson

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35218 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 3ccbf7e6b7 Factor out PathDifference into gclient_utils for a later reuse.
Make lack of email address an error.

TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35167 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org a93717670e Add full_move flag to GIT.GenerateDiff and Factor out FindGclientRootDir into gclient_utils.
BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35154 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 1227c7dedc Simplify call site.
Do a review comment I forgot to apply in a previous change.

TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35124 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org f2f9d554d4 Move GenerateDiff into a common function.
Fix standalone trychange usage on both svn and git.
Remove implicit dependency on git-cl.

TEST=unit test

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35121 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org ea8c1a9bc9 Make breakpad, gcl and presubmit_support dependencies optional
TEST=unit tests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35072 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 1811135923 Remove gclient-specific hacks from trychange into gcl.
Remove upload dependency.

This is towards making trychange.py work mostly standalone for the webkit try server.

TEST=unit tests and tested both gcl try and git-try.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35071 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 94b1ee9dbd Factor out gcl.GetRepositoryRoot() into scm.SVN.GetCheckoutRoot()
This is to reduce trychange.py dependency on gcl.py

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35055 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 0fca4f3746 Get rid of gcl.ReadFile.
Review URL: http://codereview.chromium.org/501106

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@34950 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org fc83c11b37 Remove gcl.WriteFile
Review URL: http://codereview.chromium.org/502066

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@34949 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 63ebf04df5 Fix the way the temporary directory is created.
It is much cleaner and works for cases where the directory is not writeable.

Also fix an unrelated unit test.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@34080 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org ada4c65e1c Minimalist breakpad implementation.
Client-side implementation.

TODO: Need to automatically disable it for unit tests.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@33681 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
dpranke@google.com fa44e4aef2 Revert changes to GetCachedFile() in r30414, r30910, r31586, and go back to
the behavior before I started messing with it. It turns out it's not worth the
hassle to try and "clean this up"; we depend on the current convoluted
semantics, which is to crawl up the tree from the current dir looking for
codereview.settings files, but to only ever look for PRESUBMIT.py in the
root of the repo. Trying to unify the logic seems to be too painful.

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@33648 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 3884d76996 Fix gcl that was broken in revision 32611 because a change in upload.py
Review URL: http://codereview.chromium.org/436036

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@33005 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
chase@chromium.org ea452b3f54 Avoid losing CL description during Rietveld outage.
Save the CL locally prior to attempting to submit
to Rietveld.  The CL is saved locally with a dirty-bit
before the upload is attempted.  If successful, the CL
is saved locally again with a clean-bit.

On loading a dirty CL for editing, we only load the
CL description from Rietveld if the local CL is clean
(there are no pending changes to upload).  Clean CLs
continue to retrieve updated descriptions directly
from Rietveld.

BUG=none
TEST=gcl change <name> saves CL description local
prior to uploading.  gcl change <name> after a failed
Rietveld upload uses local CL description instead of
using the associated issue's description from Rietveld.
Changes in this state are reset to the 'clean' state
after the Rietveld update completes.
Review URL: http://codereview.chromium.org/428001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32791 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 5aeb7dd54c Reapply 32057, 32058, 32059, 32062 and fixes problems introduced by these changes.
Noteworthy change is scm.SVN.GetFileProperty calls Capture instead of Run.

TEST=unit tests
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32181 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 261eeb5e93 Revert 32057, 32058, 32059, 32062 because they still have unwanted side-effects.
Revert "Group SCM-specific functions in classes to simplify generalization of the interface."
Revert "Fix 2 recently introduced errors."
Revert "Fix a variable aliasing error."
Revert "Fix typo."

TBR=dpranke
TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32065 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 2349b06655 Fix a variable aliasing error.
TBR=mad
TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32059 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 85a3192f9c Group SCM-specific functions in classes to simplify generalization of the interface.
TEST=none
BUG=none

Move scm functions into a class to make it simpler to manage.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32057 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
chase@chromium.org 53bcf15733 Make gcl change in a read-only checkout a warning.
BUG=25824
TEST=gcl change in a read-only checkout is now a warning
instead of a hard error
Review URL: http://codereview.chromium.org/384128

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31942 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org ebbf947334 Fix PyDoc.
Review URL: http://codereview.chromium.org/387005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31592 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org e3608dfc1a Run pychecker over most scripts in depot_tools. Catched a few bugs.
TEST=unit tests
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31590 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
dpranke@google.com 83e9943db5 Fix GetCachedFile(use_root=True)
Fix GetCachedFile() to skip local mods when use_root is True. The files
that exist in the root of the tree don't even seem to exist in the normal
source checkouts, and we were looking at a different file as a result.

  BUG=none
  R=maruel@chromium.org
  TEST=locally modify a PRESUBMIT.py file and look for duplicate results. 
    If you get duplicates, this didn't fix it

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31586 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org a31d6586f9 Make 'gcl change --force' generate random changename in read-only checkout.
BUG=27241
TEST=running 'gcl change --force' in a read-only checkout creates random changename.

M      gcl.py

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31552 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org f40fbb3bfb Make 'gcl diff emptychange' show nothing if given change, |emptychange|, doesn't contain files.
BUG=27243
TEST=Create change which contains no files and confirm 'gcl diff createdchange' doesn't output anything.

M      gcl.py

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31551 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
chase@chromium.org 73171904f5 Fix alignment.
BUG=none
TEST=none

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31454 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
chase@chromium.org d36b3ed726 Error when creating a CL in a read-only checkout.
BUG=25824
TEST=running 'gcl change foo' in a read-only checkout
shows an error, --force creates a CL anyway, and gcl
change in read-write checkouts continues to work.
Review URL: http://codereview.chromium.org/378027

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31452 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
dpranke@google.com cef0db9d8c Fix gcl to look for newly-added codereview.settings files as well as modified
codereview.settings files.

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@30910 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
dpranke@google.com e72bb63e3e Revise change in r30415 to properly climb local directories looking for a
modified codereview.settings or presubmit file.

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@30503 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
dpranke@google.com bb816387a8 Modify gcl lint to use regexes to figure out which files should be linted.
I've added two settings to codereview.settings - LINT_REGEX and 
LINT_IGNORE_REGEX - to specify which files should be linted. The default
is to lint anything that ends in .cpp, .cc, .inl, or .h, and to ignore 
nothing.

I have also modified GetCachedFile() to look for a locally modified version 
of codereview.settings before looking in the repository.

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@30415 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
nsylvain@chromium.org 9ce9822389 gcl: Make fix the override_description code and add a silent flag.
drover: switch to use optparse, and add the arguments to be able to support
the revert bot.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@29446 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
pkasting@chromium.org 88c32d80de Fix gcl opened, gcl nothave, and gcl status to:
* Actually print unknown files
* Put things in the proper order (i.e. files with no changelist under the "no changelist" header)
Review URL: http://codereview.chromium.org/270047

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@28719 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 5f3eee3bab gclient: remove wildcard import from git_scm
Part of a larger refactoring to abstract SCM-specific bits.

presubmit_support, revert, gcl: modify to import gclient_scm and gclient_utils

Part of a larger refactoring to abstract SCM-specific bits.

revert, gcl: modify to import gclient_scm and gclient_utils

Part of a larger refactoring to abstract SCM-specific bits.

gclient: pull out SCM bits

Pulled out SCMWrapper into gcliet_scm.py as part of a larger refactoring to
abstract SCM-specific bits. Plan is to evenutally add git support.

Pulling out SCMWrapper also required pulling out utility functions into
a gclient_utility.py.

Patch contributed by msb@

TEST=none
BUG=none


git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26423 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
dpranke@google.com a135e356ef Modify gcl.py so that lint ignores only webkit/api, and not webkit/*
R=pam
   TEST=none
   BUG=none

M    gcl.py



git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26194 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
bradnelson@google.com 57e7855b1d Making gcl upload do tryupload from the same place as gcl try.
BUG=None
TEST=None

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26044 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
pam@chromium.org f0dfba3f44 Add all modified files to new changelists by default.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/164084

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@22800 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
laforge@chromium.org 8b60d0d4b1 Revert 22561 - Minor change to gcl to automatically put changed files in the changelist (like we do with P4)
R=nsylvain
Review URL: http://codereview.chromium.org/164028

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@22608 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
laforge@chromium.org 1ef869cbb9 Minor change to gcl to automatically put changed files in the changelist (like we do with P4)
R=nsylvain
Review URL: http://codereview.chromium.org/164028

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@22561 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
estade@chromium.org bfd09ce886 Get rid of annoying empty changelists!
1) don't save empty changelists to begin with. This guards against an accidental or canceled "gcl change" creating an empty file.
2) create a "clearempties" command which clears all changelists that don't have any files in them.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@22538 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org a05be0ba8d Fix 'gcl help' when not run inside a svn checkout.
TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@19628 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 2e50180403 Fix gcl presubmit usage.
TEST=none
BUG=none
TBR=nsylvain

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@18325 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
nirnimesh@chromium.org 07f0186d08 Really really fix gcl.py
TEST=none
BUG=none
TBR=maruel

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@18279 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 0b7574dc41 Fix gcl upload for real this time.
I had used the old method name. watchlists needs a unit test.

TEST=none
BUG=none
TBR=nirnimesh

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@18278 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 5159b2e26c Fix watchlist exception on upload.
TEST=none
BUG=none
TBR=nirnimesh

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@18274 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 8d5c9a5a52 Fix gcl breakage.
Small refactor of ChangeInfo to not hardcode the use of GetRepositoryRoot().

TEST=unit tests
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@18272 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 17f59f2dd9 A step closer to make presubmit SCM independent.
Stop presubmit_support.py from calling gcl.GetRepositoryRoot(). Instead, save the repository root in ChangeInfo and name it GetLocalRoot() to make it less confusing.
Add GetFileList() and GetFileNames() to ChangeInfo to make it less confusing and more "interface-like".

TEST=updated unit tests with a lot of pain
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@18266 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org a005ccdead Fix 'gcl settings' output.
TEST=none
BUG=none

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

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