Commit Graph

205 Commits (9f668bbff99167ba797888c6d322dd309f338aee)

Author SHA1 Message Date
maruel@chromium.org a761b60c33 Fix unit test
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@47437 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 7f5215d991 Update tests
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@47435 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 1f7d1180cb Mode constants at their right places.
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@47434 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 7c1a02b577 In the previous change, I forgot to update the unit test.
Review URL: http://codereview.chromium.org/2098009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@47391 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
tony@chromium.org d2e925611f Revert r45652 and r45653. It broke the single file export
feature.

TBR=piman,jamesr
Review URL: http://codereview.chromium.org/1730014

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@45660 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
piman@chromium.org 6f36372433 patch from issue 1640001
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@45652 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
piman@chromium.org 54c3a7e9ad TBR: jamesr
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@44871 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
piman@chromium.org 8b5086d8d5 Add -j option to gclient to run parallel updates
On a chromeos checkout, -j 10 brings down null sync time from 2 minutes to 16 seconds
Currently -j may break some assumptions about ordering of commands (which may be fine for some clients, but not all), so it's not on by default.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@44869 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
tony@chromium.org 30ef9ae362 Extend From() to allow importing from different mappings. Also
allow From() to import when the URL is relative.

For example, if src/DEPS is:
deps = {
  'base' = 'svn://svn/base@123',
  'main' = From('base', 'src/main'),
}
and base/DEPS is:
deps = {
  'src/main': '/main@100',
}

This will checkout svn://svn/main@100 in main.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@44044 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org e41f682751 Workaround output variance in pprint.pformat.
TEST=fix unit tests
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@43952 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
tony@chromium.org 4b5b1779fb Add the ability to check out a single file from a repo.
The syntax is:
deps {
  'path': File('http://svn..../path/file@42')
}

This will checkout a single file and use scm.update to
keep it up to date.

See https://bugs.webkit.org/show_bug.cgi?id=36578#c7 for a
description of why I want to add this.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@43911 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
iposva@chromium.org 8cf7a39100 Provide a way to name a solution as part of the config command.
Review URL: http://codereview.chromium.org/1611009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@43847 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
msb@chromium.org e6f78352a7 gclient: git relative url implementation
Redo relative url implementation per maruel's comments here:
http://codereview.chromium.org/500015

Instead of adding an option, implement relative urls differently for
git urls.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@36126 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
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 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
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 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
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
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
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
maruel@chromium.org 5e73b0cfa1 Revert "Use a factory method to abstract SCMWrapper creation." totally broke gclient.
TBR=msb
TEST=none
BUG=none

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


git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26606 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
msb@chromium.org 56237087e9 Use a factory method to abstract SCMWrapper creation.
This method will eventually return the correct subclass of SCMWrapper. Initially, there will only be SVNWrapper.

gclient_scm: add test for unsupported scm

gclient_scm: make SCMWrapper constructor parameters non-optional

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

TEST=
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26602 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
msb@google.com b75db5152a gclient_scm: add test to catch bug fixed by r208010
Review URL: http://codereview.chromium.org/214017

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26577 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org c2c78f7f02 Add a new test case for SCMWrapper.revert.
Add a test case for the UnversionedUnexpected file code path.

TEST=This test case will catch the bug fixed by r26425.
BUG=none

Patch contributed by msb@

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


git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@26458 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
kbr@google.com ab318594b3 Added "gclient pack" subcommand, which generates a patch relative to
the root of the source tree. It is similar to "gclient diff", and
shares much of the implementation, but it seems that developers may
want the semantics of each in different situations, which is why it is
being added as a new command.

Generalized SubprocessCallAndCapture into SubprocessCallAndFilter.
Added RunSVNAndFilterOutput; changed RunSVNAndGetFileList to use it.
Fixed problem in presubmit_canned_checks.py where it was not working
on Windows. Updated unit tests for gclient.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@25410 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
evan@chromium.org 67820efbf0 Add a --nohooks to gclient to update/sync/revert without calling the hooks
BUG=16856

Patch from Fabien Tassin <fta@sofaraway.org>.


git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@21655 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
phajdan.jr@chromium.org 644aa0cfaa Add export command to gclient.py
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@20990 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 2c3024ac53 Refactor the unit tests to remove a lot of duplicate code.
Remove old unused git-cl test files.

TEST=unit tests
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@18177 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org b76227689c Convert gclient_test.py to mox.MoxTestBase and saves 40+ lines
Review URL: http://codereview.chromium.org/118014

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@17213 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 003c269b98 When -s or --server is used, don't try the patch.
Review URL: http://codereview.chromium.org/115534

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@16477 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 2806acc58c Remove two seams options.gclient and options.scm_wrapper in gclient.
Review URL: http://codereview.chromium.org/115322

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@16155 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 0329e67bae Remove the options.path_exists which only existed as a seam. It's not really needed in python.
Also fix 2 other mocks.
Review URL: http://codereview.chromium.org/115286

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15976 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 4810a96600 Deprecate gcl.GetSVNStatus() for gclient.CaptureSVNStatus() and fix some status information that was lost.
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
16 years ago
maruel@chromium.org 5c3a2ff6a2 Add a flag not print errors in CaptureSVN()
Review URL: http://codereview.chromium.org/113288

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15887 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org df7a3134bd Simplify some functions by removing the options.stdout mock. Fix the unit test accordingly.
Fix breakage caused by r15861 and add a regression test.
Review URL: http://codereview.chromium.org/113278

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15872 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 96b9171280 Revert 15861 because of
File "D:\b\depot_tools\bootstrap\\..\gclient.py", line 446, in SubprocessCallAndCapture
   out.write(in_byte)

TBR=nsylvain
Review URL: http://codereview.chromium.org/115244

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15862 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org e77173e573 Simplify some functions by removing the options.stdout mock. Fix the unit test accordingly.
Review URL: http://codereview.chromium.org/113272

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15861 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 11e0fd6997 Revert changes 15823 and 15824 because they broke gclient revert.
TBR=sgk
Review URL: http://codereview.chromium.org/115217

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15827 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 09b3ba2160 Cleanup gclient.py use of options where unnecessary.
Review URL: http://codereview.chromium.org/113216

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15823 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org 2dc8a4d3d4 Change CaptureSVNInfo() to return a dictionary instead of a object.
Review URL: http://codereview.chromium.org/113086

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15750 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org edd27d1770 - Add '!' and 'L' status support.
- Fix gclient revert/status when one of the dependency directory is deleted.
- Remove an unneeded svn update after svn checkout.
- Updated tests.
Review URL: http://codereview.chromium.org/100256

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@15068 0039d316-1c4b-4281-b951-d872f2087c98
16 years ago
maruel@chromium.org e105d8d039 Pull gclient revision 72 and add the gclient unit test.
Review URL: http://codereview.chromium.org/99226

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