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
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
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
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
- 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
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
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
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
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
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
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
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
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
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
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
... 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
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
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
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
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
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
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
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