Commit Graph

78 Commits (41cdced81d816baed825e4ee037358d51b5a03e8)

Author SHA1 Message Date
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
nirnimesh@chromium.org b2ab494a8b Add watchlists to 'gcl upload'
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/118431
http://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
16 years ago
maruel@chromium.org 21b893b71c Stop showing "Presubmit errors, can't continue (use --no_presubmit to bypass)" when running gcl presubmit!
TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@18078 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org b0dfd35742 Make the presubmit output much more compact.
Disable prompting when using gcl presubmit xxx.

TEST=none
BUG=none

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

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