Commit Graph

132 Commits (41da24bfb65d0272b749547bc31881c08bc66e95)

Author SHA1 Message Date
xusydoc@chromium.org c144e06bcd Use logger formatting instead of string interpolation.
Follow-up to ilevy's comments in https://chromiumcodereview.appspot.com/14759006/

Review URL: https://chromiumcodereview.appspot.com/14874005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@198236 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
szager@chromium.org 12b07e7e55 Refactor nag functionality in to NagTimer class.
Add default 30 second nag timer to gclient subprocesses.

BUG=227537

Review URL: https://chromiumcodereview.appspot.com/14826003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@198207 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
xusydoc@chromium.org 2fd6c3fcb7 Kill subprocesses on KeyboardInterrupt.
SVN traps SIGINT and attempts to clean itself up, but this results in hangs
waiting for TCP. This patch does two things: daemonizes worker threads so they
are culled when the main thread dies (is ctrl-C'd) and keeps track of spawned
subprocesses to kill any remaining ones when the main program is ctrl-C'd.

A user ctrl-C'ing gclient has to manually terminate hung SVN processes, so this
introduces no extra data loss or hazard. stracing a hung SVN process shows that
it is indeed hanging on TCP reads after receiving a SIGINT, implying there is an
underlying but in the SVN binary.

Review URL: https://chromiumcodereview.appspot.com/14759006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@198205 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
jbroman@chromium.org 615a262dcb Make git-cl more accurately imitate git's editor selection process, and respect $VISUAL.
It is somewhat surprising when git-cl, which acts as a git subcommand, launches
a different editor. In particular, git has a config option (core.editor) which
specifies the editor that should be used. Since we already respect $GIT_EDITOR,
it makes sense for git-cl to respect core.editor and $VISUAL as well.

R=maruel@chromium.org
BUG=237504

Review URL: https://chromiumcodereview.appspot.com/14854003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@198101 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
digit@chromium.org dc112ac587 Remove gclient_utils.RemoveDirectory().
The 'RemoveDirectory()' function in gclient_utils is deprecated and
rmtree() should be used instead for consistency.

This patch modifies all clients in depot_tools to use rmtree() instead
and removes the RemoveDirectory function.

+ The SVNWrapperTestCase.testRevertNoDotSvn() mocking
  expectation has been slightly changed. This was required
  because the test invokes code that used to call
  gclient_utils.RemoveDirectory() directly, while only
  gclient_utils.rmtree() was mocked.

BUG=NONE
R=maruel@chromium.org, ilevy@chromium.org
TEST=manually run gclient_utils_test / gclient_smoketest / scm_unittest / gclient_scm_test

Review URL: https://chromiumcodereview.appspot.com/14134010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@196133 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
borenet@google.com 6b4a2ab6ad Use rd on Windows in rmdir
This is needed because the current implementation commonly fails on Windows due to "directory not empty" errors.  Using rd is more reliable.

Review URL: https://chromiumcodereview.appspot.com/13581005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@194932 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
ilevy@chromium.org f2ed3fb1f0 Add gclient grep for git repos
- Adds a gclient grep command to search through git repos.

BUG=157950


Review URL: https://chromiumcodereview.appspot.com/11312116

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@167007 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
ilevy@chromium.org 1369150868 Make gclient sync use cpu count for default jobs
- On high core, fast machines, jobs=8 is does not offer good
  parallelization.  Switch to use number of local cpus.

R=maruel@chromium.org
BUG=


Review URL: https://chromiumcodereview.appspot.com/11140019

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@162072 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
jam@chromium.org 07d44398a2 Switch gcl/git upload to use https://codereview.chromium.org instead of https://chromiumcodereview.appspot.com. It's been a week since the SSL certificate got added, and the old DNS records had a TTL of 7 days.
Review URL: https://chromiumcodereview.appspot.com/10910225

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@156316 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
chrisha@chromium.org 2b99d43032 Handle non-UTF-8 encoded files in presubmit checks.
BUG=
TEST=


Review URL: https://chromiumcodereview.appspot.com/10696202

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@146391 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org c3cd537819 Improve comment added in r145396.
R=cmp@chromium.org
BUG=
TEST=


Review URL: https://chromiumcodereview.appspot.com/10736011

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@146136 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 51e84fba7d The previous fix r145315 seems to have broken python 2.6.2 on Windows users.
Since open() and codecs.open() have different behavior, and codecs.open()
misbehaves on python 2.6, switch to open() with manual str decoding.

TBR=cmp@chromium.org
BUG=
TEST=I failed to reproduce, it's a shot in the dark


Review URL: https://chromiumcodereview.appspot.com/10698089

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@145396 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 8a066dc684 Fix difference on behavior on python 2.6 on linux with open(mode='rU').
TBR=cmp@chromium.org
BUG=
TEST=manually tested gclient sync works on linux with python 2.6


Review URL: https://chromiumcodereview.appspot.com/10694069

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@145315 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org dae209fb46 Enforce utf-8 codec on all files read and write.
Otherwise, the files are opened in 'whatever happens to be the current encoding'
which is highly system-dependent. Even if some files are not encoded with utf-8,
the status quo is even worse. So it's worth trying out.

TBR=cmp@chromium.org
BUG=
TEST=


Review URL: https://chromiumcodereview.appspot.com/10697036

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@145306 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 2a0108ebdb Revert r132446 "Check the existence and executability of scm commands"
This completely broke syncing on Windows.

TBR=mukai@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9956149

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@132451 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
mukai@chromium.org d15a8fa135 Check the existence and executability of scm commands
BUG=114483
TEST=manually

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@132446 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org eb5edbcfde Add UpgradeToHttps() to reliably and forcibly upgrade all urls to https.
Enable it for git-cl and gcl.

R=nsylvain@chromium.org
BUG=107838
TEST=New connections go through https://


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@117857 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 99ac1c5808 Dedupe codereview.settings parsing code. Add more testing.
So any modification to the defaults is coded at only one place.

TBR=nsylvain@chromium.org
BUG=107838
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@117853 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
asvitkine@chromium.org 0eff22d6c0 Clarify error message in GCL.
BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@107129 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 0e0436a662 Move code starting the editor into a common function.
Windows users wouldn't get the same behavior on git cl vs gcl.
Improve automatic CRLF<->LF conversion, some gcl users would be \n repeated in
their description depending on the editor used.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@107106 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 042f0e73de Improve the sys.stdout proxy to be more transparent.
Otherwise isatty() could not be proxied correctly.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106864 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 6c48a304d4 Fix a concurrency issue happening with deep dependencies when the intermediary
directory doesn't exist, on fresh checkout and --jobs >1.

It happens in the case where there is 3 dependencies:
a
a/b/c/d
a/b/c/e

'a' is processed first. Then 'a/b/c/d' and 'a/b/c/e' are fired simultaneously.
If both are not present, both svn checkout tries to mkdir b and b/c and a race
condition occurs between their call for isdir() and mkdir().

This works around the issue by creating the intermediary directories ourself
before calling out svn and managing the error ourself.

TBR=dpranke@chromium.org
BUG=
TEST=fresh checkout shouldn't be flaky


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106636 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 4901daf1a7 Workaround a limitation in cygwin with Lock creation.
Reuse a common lock to reduce the number of locks created. Poor cygwin users.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106494 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 93a9ee0f72 gclient would crash when .gclient is not found.
Fix a problem introduced in r105229.

R=cmp@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106089 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
rcui@google.com 13595ffa41 Add repo-managed checkout support to trychange.py
BUG=chromium-os:21286
TEST=Ran 'git-try' with/without --root=src, and with/without .gclient file

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@105229 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 6f6ad13644 Work around lock failure on cygwin.
This is really bad but the lock is never held for a long time so it 'should' work.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@105195 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 470b543fcf Stop modifiying requirements out of thread and generate it instead.
This fixes GClientSmokeBoth.testMultiSolutionsJobs flakiness by having
consistent ordering.

Now no out of thread modification is ever done, which result in much saner code.

R=dpranke@chromium.org
BUG=60725
TEST=tested manually with gclient sync --jobs 100 on chrome and with
gclient_smotetest.py


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104920 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
szager@google.com 85d3e3adbc Restore 103787 (fix git progress message), and update test expectations.
Review URL: http://codereview.chromium.org/8161009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104504 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org a91d26de47 Force requirements modification to be locked.
... On my quest to make that stuff thread safe.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104033 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 1333cb3edb Improve logging and ease debugging.
While trying to fix all the multithreading issues...

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104026 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
szager@google.com 43ea9d727b Reverting 103787
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@103935 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
szager@google.com 7f61350080 http://codereview.chromium.org/8052025/
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@103787 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 6ca8bf80b4 Retry "Initial step into making Dependency thread safe""
I had forgot one access to _requirements. Now that tests are run, this change is
safer to commit.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101856 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org adcf5b702d Revert "Initial step into making Dependency thread safe"
Broke the tree. :(

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101136 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 89d51c245c Initial step into making Dependency thread safe
R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101135 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 109cb9d31f Print diagnosis message when a task is Ctrl-C'ed out
R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101133 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org f36c0ee520 Add diagnostics if an item is run multiple times
R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101117 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 485dcab61e Fix the case where a dep not processed could be set as a requirement.
This would result in a hang during gclient sync.

Includes regression test.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101070 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 57bf78d82a Update docstrings w.r.t. subprocess2.
No code change.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100212 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org a82a8ee4ec Remove CheckCall, CheckCallError and Popen from gclient_utils.
R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100203 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org ca0f839801 Make gclient_utils.CheckCallError inherit from subprocess2.CalledProcessError.
This will simply the transition

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100174 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
nsylvain@google.com e939bb5de3 Remove empty lines from the output while using --jobs.
While using --jobs, empty lines are adding a lot of noise.

An example output would look like:

>gclient sync --jobs=10
1>
3>
4>
6>
5>
7>
5>
5>________ running 'git clone ...'
Review URL: http://codereview.chromium.org/7101012

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@87542 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
floitsch@google.com eaab784bcf Add --transitive flag.
When specifying a revision (with -r) propagates the date of the revision to its children.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@83313 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org ff3e4a87b1 Fix constructor arguments to OSError.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@82763 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org ade9c5953d Fix case where wc_info is not present.
Reapply r80770 "Switch from xml.dom.minidom to xml.etree".

TBR=dpranke@chromium.org
BUG=
TEST=

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80785 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org d25fb8f68b Revert r80770 "Switch from xml.dom.minidom to xml.etree"
Throws exceptions on mac.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80771 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 949d1a6a9e Switch from xml.dom.minidom to xml.etree
The reason of this change (beside deleting 30 lines) is to fix pylint on Mac.
For an unknown reason, it was dying here trying to process the minidom import.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80770 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 58ef297bc5 Revert r80216 "Reapply r79779: "Removed gclient_utils.Popen() and use subprocess2's ...""
Horked windows slaves this time.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80220 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 93ef410768 Reapply r79779: "Removed gclient_utils.Popen() and use subprocess2's version instead."
It should be fine now that I've fixed python2.5 compatilibity issues in subprocess2.py.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80216 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 5a376ed328 Revert r79779: "Removed gclient_utils.Popen() and use subprocess2's version instead."
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79781 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago