Commit Graph

88 Commits (d3ba72bbc646aa52dea83a299b18620d29c36051)

Author SHA1 Message Date
maruel@chromium.org dd057f38b5 Add automated sys.stdout check.
Had to update a few tests, removed redundant code in gclient_scm_tests.

TEST=more readable unit tests
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@59959 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 4ed3418912 Directly hook sys.stdout for thread annotated output.
In the next change, we can now remove all the options.stdout bookeeping since
it's not unnecessary.

TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@59795 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org e0de9cbe0f Remove the class StdoutAnnotated and clones the object instead.
The end goal is to remove options.stdout, to remove a lot of bookkeeping.

TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@59792 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org cb1e97a1a2 Enable annotated output for --jobs N!=1.
TEST=none
BUG=54084

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58985 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 3742c84587 Add the infrastructure necessary to support annotated stdout.
Simplify ExecutionQueue.run() by moving code into utility functions.

Reduce the amount of code in WorkerThread.run() to improve reliability.

Don't trap exceptions in single-threaded usage!

BUG=54084
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58974 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org db111f71cf Add automatic auto-flushing stdout.
An automated work around for python lack of stdout flushing.
This design simplifies life once parallel checkout is enabled.

TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58819 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 66c83e68b7 Rename retcode to returncode to be consistent with subprocess.
Change CheckCallError to inherit from Error. This will simplify try/except changes.

TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@58695 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 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 559c3f89b6 Add stdout param to SubprocessCallAndFilter().
It will eventually replace 'print_messages' and be used to annotate printed
lines when using --jobs.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@57092 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 c41c27c86e Force LANGUAGE=en to fix svn output parsing
TEST=Run with LANGUAGE=fr_CA, gclient still works.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56354 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 399318ec99 Fix gclient_utils_test and disable gclient_scm_test.
gclient_scm_test is really flaky and is a pain to maintain. gclient_scm.py
coverage is good enough with gclient_smokte_test.

TBR=chase

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56351 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 80cbe8b7d1 Move ExecutionQueue and WorkItem to gclient_utils.py
Review URL: http://codereview.chromium.org/3107009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56020 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org df2b31582f Reapply gclient.py refactor for the third time.
Bring some OOP and sanity to gclient.py.

- Changed the algorithm from breadth-first to depth-first.
- Added infinite recursion support.
- Fixed From() of From() dependency.
- Fixed cross solution custom deps aliasing.
- Removed support code for old .gclient_entries format.
- Removed IsGitCheckout() in favor for a direct check for .git presence.

TEST=all test pass

The main difference with r51760 is that new smoke tests have been added since which replicates how webkit checkouts with gclient.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53205 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org dc7445dd70 Revert the refactor (r52005) again, it broke webkit checkout.
TBR=msb

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@52011 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 917aa91750 Reapply r51760 and r51761 that were reverted in r51767.
Add the fix for FileImpl() plus unit tests.

TEST=more tests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@52005 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 5248d9dfe3 Revert both r51761 and r51760 as it broke the webkit slaves.
TBR=msb

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@51767 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org adecb3162f Bring some OOP and sanity to gclient.py.
- Changed the algorithm from breadth-first to depth-first.
- Added infinite recursion support.
- Fixed From() of From() dependency.
- Fixed cross solution custom deps aliasing.
- Removed support code for old .gclient_entries format.
- Removed IsGitCheckout() in favor for a direct check for .git presence.

TEST=all test pass

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@51760 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 5990f9d536 Give more simple message when a SyntaxError is thrown
TEST=none, no big deal. I'll get a breakpad report otherwise anyway. This is solely to *reduce* the number of breakpad stack trace that this is done.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@51739 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org f0379d1642 Fix broken unit test by r44612.
TEST=unit test
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@45593 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
maruel@chromium.org 7be5ef2ed0 Change CheckCall behavior when print_error=False
We now return the stderr half of the tuple.
This required a clean up of any usage of CheckCall and GIT.Capture.

Patch contributed by Nasser Grainawi <nasser@codeaurora.org>

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@37650 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
maruel@chromium.org b6d36495b5 Add back automatic fallback to svn access when http access fails.
It was somehow ripped out by accident.

TEST=none
BUG=none
TBR=bradnelson

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@35284 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 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 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 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
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 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
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