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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
* 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
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
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
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
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
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
Watchlists provides an opportunity for someone interested in a particular
code section to make comments before commit. One can subscribe to watchlists
depending on filepath (regular expressions) and she'll automatically get
cc-ed to changes when the watchlist is triggered.
Additional examples of watchlist_rules in diff repo:
http://codereview.chromium.org/118431http://codereview.chromium.org/119356
Review URL: http://codereview.chromium.org/118432
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@18209 0039d316-1c4b-4281-b951-d872f2087c98
Factor out some code in FilterFlag() to make the code much more readable.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/119315
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@17884 0039d316-1c4b-4281-b951-d872f2087c98
Now enforces ChangeInfo.issue (and .patchset) to be a int.
Renamed LoadChangelistInfo() to ChangeInfo.Load().
Removed ChangeInfo.__init__() default parameters.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/118355
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@17836 0039d316-1c4b-4281-b951-d872f2087c98
- Create a new parameter for "gcl change 12354 <filename>" to read comments from a text file. This allows us to programmatically inject comments into a gcl upload
- Added helper methods in change to order of which other_files have changed (brings changed files to the top of the list). This makes it easier to find which files have change, and simply cut and paste the top of the list (after many merges, the list of unmodified files grows to be quite extensive... very useful)
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@17684 0039d316-1c4b-4281-b951-d872f2087c98
This was breaking gclient revert on unversioned files.
TEST=ran "for %a in (tests\*test.py) do python %a" and all tests succeeded.
Review URL: http://codereview.chromium.org/115264
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15894 0039d316-1c4b-4281-b951-d872f2087c98
Add gcl's first unit test.
Add version string.
Review URL: http://codereview.chromium.org/100095
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@14771 0039d316-1c4b-4281-b951-d872f2087c98
Also add a version number to gcl.py.
Review URL: http://codereview.chromium.org/99072
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@14644 0039d316-1c4b-4281-b951-d872f2087c98