Commit Graph

146 Commits (a93717670e201929a2a8ac87594f4668cfcc0782)

Author SHA1 Message Date
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 b24a8e1a5a Remove more logic out of trychange.py into scm.py.
The goal is to (almost) completely remove git-try.

TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35144 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 9a2f37eaf1 Remove trychange.RunCommand and replace it by gclient_utils.CheckCall.
TEST=unit tests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35052 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
msb@chromium.org c532e17e1b gclient: implement a less hacky relative URL implementation
Doing something like basename when concatenating base_url with
relative url.

Added use_relative_urls2 to enable switching between old
implementation and new implementation. Once the old implementation
is deprecated we can remove the use_relative_urls2.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@34563 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org 5bde485307 gclient: Add better error reporting and handling when there is a rebase conflict
When a rebase generates a conflict, report an error and exit immediately.
If in an existing conflict (no branch), report an error and exit immediately.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@34459 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org e8dd16c701 gclient: Fix unittests
Review URL: http://codereview.chromium.org/486045

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@34415 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
chase@chromium.org 37c629a3b1 Call git diff --name-status with a relative path.
On a new Linux box, during git cl dcommit I observed
the error:

  fatal: invalid diff option/value: -r

This was caused by the git cl presubmit hooks running:

  git diff --name-status -r refs/remotes/origin/trunk.. /path/to/src

By passing a relative path (given by git rev-parse
--show-cdup) instead of an absolute path for
/path/to/src, git diff --name-status does not print an
error and returns the expected list of changed files.

Also fix some broken scm and gclient_scm unit tests.

BUG=none
TEST=git presubmit hooks work from main working
directory
Review URL: http://codereview.chromium.org/438012

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32999 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 c78f246ee4 Add scm.*.GetEmail() to retrieve the user email. Use this email for try job emails.
TEST=not much
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32720 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org b9f2f6236b gclient: fix bug in parsing ssh urls
Review URL: http://codereview.chromium.org/402105

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32568 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
msb@chromium.org a4d60f9bf3 Fix parsing bug in SplitUrlRevision.
ssh://example.com/git/test.git was not parsed correctly.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32377 0039d316-1c4b-4281-b951-d872f2087c98
16 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
erg@google.com 26970fa907 - Add a presubmit check that lints C++ files (will submit CLs that
add this to PRESUBMIT.py in the chromium tree later).
- Update cpplint.py to the latest version from the style guide.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32180 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 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
msb@chromium.org ac915bb6af gclient: fix another bug where ssh urls weren't parsed correctly
ssh://test@example.com wasn't being parsed correctly for revinfo.

Fixed by factoring out all code which splits url into a base_url
and revision.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31910 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org d5800f1996 Split scm-specific functions out of gclient_scm.py to scm.py.
Reapplies r31809 is typo fixed.

TEST=unit tests fixed and reclassified
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31812 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 0563d6c747 Revert "Split scm-specific functions out of gclient_scm.py to scm.py."
This reverts commit 7489404c56dcc725c7c13214f410b2d375a6630a.

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31810 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 8ce0a13a85 Split scm-specific functions out of gclient_scm.py to scm.py.
TEST=unit tests fixed and reclassified
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31809 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 2dfc8ee713 Fix unit tests on Windows.
Removed lines in the process.

TEST=unit tests
BUG=none
Review URL: http://codereview.chromium.org/387033

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31759 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 8ef5f54e4d Cleanup the unit tests by mocking more system functions.
TEST=unit tests
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31754 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 57ec90d46d Cleanup the test and fix mocks. Workaround pprint flakiness.
TEST=unit tests
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31593 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
msb@chromium.org 0f282063d9 gclient: Make revinfo work on git.
* Add revinfo as part of SCMWrapper interface.
* Implement revinfo for git and svn.
* Add unit tests.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31280 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
dpranke@google.com 5cc6c57bf5 Fix output reordering when you get a conflict on an update.
If you're not running gclient sync with --verbose and you get a conflict on
a file, the conflict message prints *before* the message that you're running
update in the appropriate directory. This is happening because we intercept
stdout but not stderr, and the conflict prompt goes to stderr. redirecting
stderr in the popen() to the pipe fixes this.

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31276 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
dpranke@google.com 22e29d4ec5 Make 'gclient update' and 'gclient status' quieter by default - they don't
print messages unless the underlying commands actually generate output.
This is a more conservative version of r28271.

  BUG=none
  TEST=none
  R=maruel

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@30296 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org e959791851 Add pymox, fixed non-deterministic pprint.pformat output expectation.
pymox auto-checkout never really worked well so check-in pymox directly.

pprint.pformat is non-determinist in one test. Worked around the issue.

TEST=unit tests
BUG=none
Review URL: http://codereview.chromium.org/266043

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@29398 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org ea6c2c5cea Fix depot_tools unit tests on Windows.
TEST=unittests
BUG=none
Review URL: http://codereview.chromium.org/273010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@28591 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
gspencer@google.com efb9450e27 This makes presubmit queries accept "yes" as well as "y"
as an answer.
Review URL: http://codereview.chromium.org/268023

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@28557 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 7753d24625 Revert "Un-revert the reverted 28058, so that we get quiet again."
This reverts commit 28058.

BUG=24081
TEST=gclient sync without --force is not working anymore.
TBR=dpranke

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@28271 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
dpranke@google.com 2a6e20ca4a Un-revert the reverted 28058, so that we get quiet again.
BUG=none
  R=maruel
  TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@28185 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
thestig@chromium.org de24345ee7 Make the try slave selection client side.
BUG=23071
TEST=none
Review URL: http://codereview.chromium.org/248029

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@28155 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
chase@chromium.org 8e416c83a8 Git support in presubmit tests.
Expand presubmit_support and gclient_scm to support
getting basic status and changed files from a Git
checkout.

BUG=5339
TEST=presubmit_support.py works from a git checkout,
gcl presubmit works from a svn checkout
Review URL: http://codereview.chromium.org/242140

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@28092 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 9344e97ada Revert "Modify the output of gclient update, gclient status to only print out"
Its side-effect caused tree breakages, at least on the try slaves.

TBR=dpranke
BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@28058 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
dpranke@google.com 1a77f1dc15 Modify the output of gclient update, gclient status to only print out
messages when --verbose is specified or when something actually happens.

Also, remove --manually_grab_svn_rev, because we need this to happen all 
the time to get gclient update to shut up if we're comparing against HEAD.
It doesn't look like there are any real side effects of removing this.

An alternative change would be to wrap this behind a --quiet flag.

Note that the change to tests/trychange_unittest.py is an unrelated fix to get
all the tests to pass.

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@28039 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
chase@chromium.org ad02011773 Fix trychange unittest.
BUG=none
TEST=trychange unittest passes
Review URL: http://codereview.chromium.org/243090

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@27969 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
msb@chromium.org ab27b8ed66 gclient: fix unittests
Review URL: http://codereview.chromium.org/254012

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@27492 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
msb@chromium.org e28e498655 gclient_scm: add support for .git
gclient_tests: add GitWrapper test cases

gclient_scm: make RunGit private and add url check

gclient_scm: add revert, run_hooks, and status

gclient_scm: add git implementations of cleanup, diff, and export

gclient_scm: implment GitSCM::update

gclient_scm: add a checks for unsupported scm and unimplemented method

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@27241 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
msb@chromium.org cb5442bf76 gclient_scm: add test for unsupported scm
gclient_scm: use a map for deciding whether or not the scm is supported

gclient_scm: add a checks for unsupported scm and unimplemented method

git_scm: pull out svn code into SVNWrapper

gclient_scm: create a create_scm factory method

Use a factory method to abstract SCMWrapper creation. This method
will eventually return the correct subclass of SCMWrapper. Initially,
there will only be SVNWrapper.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26823 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 5a180bb854 Implement fixes requested in review http://codereview.chromium.org/215039
TBR=nsylvain
BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26806 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org c13c5ff5a4 Fix gclient unittests.
BUG=none
TEST=unittests

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

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