76 columns is fine for most patches but reverts will eat another
4 spaces in indentation. For the sake of revert clarity this reference
line is reduced to 72 columns.
Review URL: https://chromiumcodereview.appspot.com/16152005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@203530 0039d316-1c4b-4281-b951-d872f2087c98
Adds an extra line to the default text description to help judge whether the
76 character recommended limit is being passed.
Review URL: https://chromiumcodereview.appspot.com/15670012
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@203314 0039d316-1c4b-4281-b951-d872f2087c98
Also adds msg to assertions to print current size of data written to stdout.
Review URL: https://chromiumcodereview.appspot.com/16058007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@202863 0039d316-1c4b-4281-b951-d872f2087c98
As noticed in the TODO, raw_input (used by ask_for_data) works badly
on background threads. On my Windows it doesn't even print the prompt which
makes it hard to interact with it.
Better to just abort and tell the user of gclient how to proceed.
BUG=
Review URL: https://chromiumcodereview.appspot.com/15421005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@201295 0039d316-1c4b-4281-b951-d872f2087c98
[1] *scm_test.py are deeply broken, svnadmin is missing for svn_bin\.
And the git test are failing at shutdown.
Also Fix SvnCheckout.testMove flakiness.
TBR=ilevy@chromium.org,szager@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/14729012
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@198900 0039d316-1c4b-4281-b951-d872f2087c98
Helps scanning faster. colorma is already slightly used by gclient but wasn't
by git-cl yet.
Update a unit test to be stricter, it was caught in the cross fire as colorma
hooks sys.stdout and stderr.
R=iannucci@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/15025003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@198689 0039d316-1c4b-4281-b951-d872f2087c98
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
This makes the commit logs much more useful for a build sheriff. Not only he
sees who committed the CL but see who approved it directly at the log. This
should help build sheriffs when they fail to contact the author and want to
fallback on the reviewer for quick questions.
R=dpranke@chromium.org
BUG=76730
Review URL: https://chromiumcodereview.appspot.com/13800021
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@196786 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
No other code changes, so should be no behavioral change.
Review URL: https://chromiumcodereview.appspot.com/14241038
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@195262 0039d316-1c4b-4281-b951-d872f2087c98
Make it more consistent across the tool. Using \s also includes \n, which
confuses the tool.
Add more tests.
R=iannucci@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/14265007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@195214 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
s/This will displayed/This will be displayed/g
BUG=
Review URL: https://chromiumcodereview.appspot.com/13811053
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@194907 0039d316-1c4b-4281-b951-d872f2087c98
Here's some background why we need this:
We discovered that google code defines the timestamp of a revision to be the time when a commit was started
rather than when it was finished (apache subversion takes the timestamp when the commit transaction is finished).
This can result in a situation where revision R(i-1) has a higher timestamp than Ri.
See bug: https://code.google.com/p/support/issues/detail?id=30419
When using 'gclient --transitive' we effectively do date-based checkouts.
If a parent has a dependency (without a ...@revision) and that dependency lives in the same repository as the parent does
we'd like to checkout the exact same revision as the parent (if we do a date-based checkout as we do now the google code
bug can result in a situation where we don't get the same revision).
Review URL: https://chromiumcodereview.appspot.com/13814012
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@194852 0039d316-1c4b-4281-b951-d872f2087c98
This will let clients that don't use the heavily filtered canned cpplint
check and want to behave more strictly (aka cc/) reuse any common
settings applied to the cpplint module.
R=maruel@chromium.org
BUG=none
Review URL: https://codereview.chromium.org/13866044
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@194264 0039d316-1c4b-4281-b951-d872f2087c98
It was manually tested to work.
R=dpranke@chromium.org,iannucci@chromium.org
Review URL: https://codereview.chromium.org/13832005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@194182 0039d316-1c4b-4281-b951-d872f2087c98
If no `--local` option is passed to git config command line tool, it will relies
on the local repository and then to the user configuration ($HOME/.gitconfig).
In case the user has - for some reason - a svn repository configured in this
user configuration, the checking: `git config --get-regexp ^svn-remote\.` will
accuse that there is svn repo and so the `git cl tool`. This patch just add
the option `--local` to the git config command line tool, avoiding this
situation.
R=maruel@chromium.org,dpranke@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/13884014
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@193987 0039d316-1c4b-4281-b951-d872f2087c98
I get the following when doing "gcl upload"
Traceback (most recent call last):
File "f:\src\depot_tools\gcl.py", line 1459, in <module>
sys.exit(main(sys.argv[1:]))
File "f:\src\depot_tools\gcl.py", line 1437, in main
return command(argv[1:])
File "f:\src\depot_tools\gcl.py", line 1070, in CMDchange
description = change_info.GetIssueDescription()
AttributeError: 'ChangeInfo' object has no attribute 'GetIssueDescription'
Sending crash report ...
args: ['f:\\src\\depot_tools\\gcl.py', 'change', 'w4f4']
cwd: f:\src\chrome3\src
exception: 'ChangeInfo' object has no attribute 'GetIssueDesc
host: JABDELMALEK3-W.ad.corp.google.com
stack: File "f:\src\depot_tools\gcl.py", line 1459, in
user: jabdelmalek
version: 2.6.2 (r262:71600, Apr 21 2009, 15:05:37) [MSC v.1
A stack trace has been sent to the maintainers.
"Make gcl use git_cl.py code for consistency in th..."
> Make gcl use git_cl.py code for consistency in the CL description formatting.
>
> This way, git_cl.py's ChangeDescription becomes the canonical CL description
> handler.
>
> R=dpranke@chromium.org
> BUG=
>
> Review URL: https://chromiumcodereview.appspot.com/13800018TBR=maruel@chromium.org
Review URL: https://codereview.chromium.org/14016004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@193555 0039d316-1c4b-4281-b951-d872f2087c98
Include all the preparatory work to eventually update the R= line to match the
actual reviewers.
The goal here is that ChangeDescription becomes the official implementation for
handling and modifying commit messages accross git-cl, gcl and the commit queue.
This change does slightly tweak the spacing between the hot lines.
It is done on purpose to make them consistent.
R=dpranke@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/13741015
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@193514 0039d316-1c4b-4281-b951-d872f2087c98
Blink wants to override the maxlen which is currently configurable in CheckLongLines but not in PanProjectChecks. This exposes the parameter on PanProjectChecks.
Review URL: https://chromiumcodereview.appspot.com/13403004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@192394 0039d316-1c4b-4281-b951-d872f2087c98
PresubmitPromptOrNotify prints the message and prompts the user only
if the presubmit is on upload, not commit.
This is useful to provide upload-time sanity checks without blocking
the CL from being landed via the commit-queue.
Review URL: https://chromiumcodereview.appspot.com/12676031
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@190711 0039d316-1c4b-4281-b951-d872f2087c98
continuation of: https://codereview.chromium.org/11664024
Moved it from chrome/trunk/src/build to depot_tools/
BUG=153360
TEST=two unittests included in tests/
For end-to-end testing, check out a large directory. Run
find . -name .svn -prune -o -size +1000k -type f -print0 | upload_to_google_storage.py -b chrome-artifacts -0 -
(replacing chrome-artifacts with an upload-able bucket)
to test upload
run "find . -name .svn -prune -o -size +1000k -type f -print0 | xargs -0 rm" to remove the files uploaded. Check that the large binary files have been removed
run "download_from_google_storage.py -r -d -b chrome-artifacts ." to download the files again.
Review URL: https://chromiumcodereview.appspot.com/12042069
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@187951 0039d316-1c4b-4281-b951-d872f2087c98
This will replace the hack in commit-queue/verification/presubmit_shim, and will
be used on the presubmit trybot.
R=maruel@chromium.org
BUG=
Review URL: https://codereview.chromium.org/12481002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@186922 0039d316-1c4b-4281-b951-d872f2087c98
Until an issue is uploaded to Rietveld, we don't know the official
email address to use for an owners check. There are three ways to fix
this: we could attempt to log in to rietveld prior to doing the check
and extract the address to use, or we could use ~/.last_codereview_email_address,
or we can use the email address we can determine from the checkout.
All three options have flaws; the first is particularly awkward since there
doesn't seem to be a good way to fetch the email without posting an issue.
The second is flawed if we use different addresses for different repos,
and the third is flawed if the checkout's email address is different from
the rietveld address, or if it is anonymous.
However, since this is only being used for owners checks (in this case),
anonymous checkouts probably don't matter, and hopefully the cases where
the email addresses differ are rare.
R=maruel@chromium.org
BUG=118388, 150049
Review URL: https://chromiumcodereview.appspot.com/12377023
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@186259 0039d316-1c4b-4281-b951-d872f2087c98
Right now we require approval from someone, and we require an owner
approval, but we don't require an approval from an owner *other than
the patch other*. It's conceivable that we might want this, so
I am making this a configurable argument to the presubmit check.
This will also be needed to ensure that we don't suggest you as an
owner for your own patches, when we actually know who you are.
R=maruel@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/12326151
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@185294 0039d316-1c4b-4281-b951-d872f2087c98
Currently, when we run the OWNERS check, we print the list of directories
that contain the relevant OWNERS files for any modified files in a change
still needing approval.
This has two problems:
1) if we bubble all the way up to the top level OWNERS, we print "" instead of
"src/" or something more useful (bug 157191)
2) for OWNERS files that contain per-file set-noparent entries (like changes to IPC messages), this can be really confusing because an owner of other stuff in the directory might've approved things already.
This change will now print the list of files in the CL that are still unapproved.
This might be a lot more verbose (since you get N lines rather than 1 for N files in a given directory), but hopefully it'll be clearer in the two cases above.
Also, this change takes care of some lingering clean-up in the code to rename some methods to be clearer.
R=maruel@chromium.org
BUG=157191
Review URL: https://chromiumcodereview.appspot.com/12314044
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@184219 0039d316-1c4b-4281-b951-d872f2087c98
The Android WebView code includes several manually-maintained .mk files
that are included by the Android build system. These contain some fairly
long lines as they need to refer to deep pathnames, which means the CQ
cannot be used as it always triggers a presubmit warning.
Allow .mk files to have 200 columns per line instead, which should be
enough for the long paths that are used. Add a test case for this.
BUG=
Review URL: https://chromiumcodereview.appspot.com/12252067
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@182733 0039d316-1c4b-4281-b951-d872f2087c98
previously we would return "*" as one of the suggested owners when
a CL included a file that anyone could approve. If the change had
other owners, the "*" was unnecessary, and if the change only included
wildcard-owned files, "*" isn't very helpful, so I've changed the text slightly.
R=maruel@chromium.org
BUG=169168
Review URL: https://chromiumcodereview.appspot.com/11867016
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@177575 0039d316-1c4b-4281-b951-d872f2087c98
The AffectedSourceFiles query matches against files with paths relative
to repository root. On the other hand _FindAllFiles checks white_lists
and black_lists against files paths relative to PRESUBMIT.py
As a result, when a PRESUBMIT.py is not at RepositoryRoot, RunPylint
can misbehave.
I fix this by modifying the white_lists and black_list regexes to
include the relative directory of PRESUBMIT.py.
Also adding some logging to pylint and simplified misc logic.
Review URL: https://chromiumcodereview.appspot.com/11776016
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@175364 0039d316-1c4b-4281-b951-d872f2087c98
This version handles the case where we need to suggest two reviewers
who have overlapping sets of directories they can review.
R=maruel@chromium.org
BUG=76727
Review URL: https://chromiumcodereview.appspot.com/11639028
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@174216 0039d316-1c4b-4281-b951-d872f2087c98
It turns out that we were weighting all possible owners equally,
and picking the last one out of the list. Given the way we traversed
owners files, and given that we got rid of the "set noparent"s, this
meant that we were always suggesting Ben for just about everything.
This change implements a much smarter algorithm that attempts to balance
number of reviewers and closeness to the files under review. The unit
tests added show specific examples and explanations for why things are
chosen the way they are.
R=maruel@chromium.org
BUG=76727
Review URL: https://chromiumcodereview.appspot.com/11567052
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@173784 0039d316-1c4b-4281-b951-d872f2087c98
If you were creating a new OWNERS file that only had per-file owners
in it (and no catch-all owners for the whole directory), then we
would not look for suggested owners in parent directories, and end up
suggesting nothing. See https://chromiumcodereview.appspot.com/11555036/
for the CL that revealed this.
Also, the unit tests were incorrectly using absolute paths in some cases,
making the code less predictable; I've fixed the unit tests and added
a check for this into owners.py (real changes never used absolute paths,
just paths relative to the checkout root).
R=maruel@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11569018
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@173000 0039d316-1c4b-4281-b951-d872f2087c98
We use the fact the dcommit adds a "Committed:" link to the
description. If we wanted to be more strict, we could make
git cl dcommit post a comment on the CL (which would be nice
since it would notify reviewers that the CL was committed).
Note that this is untested as written, because it doesn't appear
that we have either git-cl integration tests, nor a test for
git cl dcommit adding the word "Committed:" so as written, this
presubmit check is prone to failure. Would like suggestions to
improve.
Also adding DoNotSubmit checks and a couple others to
PanPresubmitChecks.
R=maruel@chromium.org,dpranke@chromium.org
BUG=161702
Review URL: https://chromiumcodereview.appspot.com/11421050
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@171158 0039d316-1c4b-4281-b951-d872f2087c98
This can come up when CQ closed an issue but the user's
local branch is still tied to the issue.
BUG=161702
Review URL: https://chromiumcodereview.appspot.com/11348122
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@171153 0039d316-1c4b-4281-b951-d872f2087c98
settings.GetIsGerrit() would invoke logging.basicConfig() and
preemtps the basicConfig for verbose option in parser.parse_args.
R=maruel@chromium.org,ilevy@chromium.org
BUG=162600
Review URL: https://chromiumcodereview.appspot.com/11418171
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@169843 0039d316-1c4b-4281-b951-d872f2087c98
- Many chrome-internal viewvc links do not support https. UpgradeToHttps
was added 10 months ago and continues to generate broken viewvc links.
Reverts part of crrev.com/9214004
BUG=107838
Review URL: https://chromiumcodereview.appspot.com/11412161
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@169815 0039d316-1c4b-4281-b951-d872f2087c98
Multiple presubmit checks may call the same function multiple times, so it's
worth caching the results to speed up the presubmit check run.
Convert presubmit_support, git-cl and gcl to use it.
R=dpranke@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/11280143
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@169726 0039d316-1c4b-4281-b951-d872f2087c98
Currently, if an unversioned directory is present where we would expect
a versioned repository to be, the following error is printed:
Can't update/checkout %s if an unversioned directory is present.
Delete the directory and try again.
If --reset and --delete_unversioned_trees are used, gclient should delete
the unversioned directory in this case.
This problem can be reproduced using the following recipe:
$ rm -rf src/third_party/webrtc/.svn
$ gclient sync -nRftD
BUG=none
TEST=Verify that above error is fixed. Run all smoke tests.
Review URL: https://chromiumcodereview.appspot.com/11366239
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@167942 0039d316-1c4b-4281-b951-d872f2087c98
Added checks:
- Block upload of a diff from sha not in current branch
(this includes tracking against an unrebased local master)
- Block upload of a diff containing shas from origin/master
(should never happen)
- Use explicit calls to git merge-base instead of calling git diff
with "<branch>..." which implicitly uses merge-base.
BUG=157503
Review URL: https://chromiumcodereview.appspot.com/11262057
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@165887 0039d316-1c4b-4281-b951-d872f2087c98
This allows specificying that a target OS list should override the base
list instead of adding to it. This is useful for iOS builds, where the
desired behavior is to pull only the iOS deps, not the union of the Mac
and iOS deps.
Review URL: https://chromiumcodereview.appspot.com/11363036
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@165671 0039d316-1c4b-4281-b951-d872f2087c98
This will let DEPS files specify a higher local bound for recursion.
Note there is an edge case where a dependency can be initially pulled
in with a lower recursion level and then gets ignored subsequently
when a lower level DEPS overrides it's inclusion level and then
includes the same dependency. I do not solve this case, as
I am intending to use this syntax for top level deps files.
BUG=155780
Review URL: https://chromiumcodereview.appspot.com/11146032
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@162464 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
Nobody cares about those .orig files and they get in the way on the try server
for some specific license check.
R=cmp@chromium.org
BUG=152507
Review URL: https://chromiumcodereview.appspot.com/10983092
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@159329 0039d316-1c4b-4281-b951-d872f2087c98
The try slaves run 'git revert' to clean up from the previous run. This only runs 'git reset --hard', which does not remove any untracked files, so if a CL adds a new file it will still be present after 'gclient revert'. Adding git clean -f -d removes untracked files (-f) and directories (-d).
Review URL: https://chromiumcodereview.appspot.com/10986032
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@159020 0039d316-1c4b-4281-b951-d872f2087c98
For an unknown reason, 'svn propset svn:executable * foo.sh' doesn't work on
Windows. It is even more awkward that 'svn propset svn:executable . foo.sh'
works just fine, in particular, subversion replaces the value, as long as it's
not an empty string, back to '*'.
R=petermayo@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/10967071
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@158281 0039d316-1c4b-4281-b951-d872f2087c98
Add new test cases to verify it properly handles "-1 +1, 2" and "-1 +1" for
short files.
R=petermayo@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/10894036
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@153906 0039d316-1c4b-4281-b951-d872f2087c98
I recently needed to run presubmit tests in depot_tools, and I was helpfully told:
$ gcl presubmit mychange
... eliding stuff ...
Install google_appengine sdk in /scratch/scratch/chrome/depot_tools_git/testing_support or higher up
This was a lie. If you put google_appengine there, the same presubmit
tools that told you to install it there will fail you for numerous
style violations contained within appengine itself. This change makes
us ignore those by blacklisting google_appengine inside of
testing_support.
Review URL: https://chromiumcodereview.appspot.com/10829293
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@151210 0039d316-1c4b-4281-b951-d872f2087c98
Many, many times this has burned me badly; if you have a dirty index,
git try will just upload your commits, and not the index.
R=nsylvain@chromium.org
BUG=None
Review URL: https://chromiumcodereview.appspot.com/10836180
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@151202 0039d316-1c4b-4281-b951-d872f2087c98
Using urllib for SSL connections when behind a proxy is known to be
broken.
Upstream has fixed this in urllib2 in Python 2.6.3 and newer so
replace uses of urllib for SSL connections with urllib2 methods.
R=maruel@chromium.org
BUG=134165
TEST=gclient sync behind corporate proxy. Submitting this CL with git_cl.
Review URL: https://chromiumcodereview.appspot.com/10825107
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@149742 0039d316-1c4b-4281-b951-d872f2087c98
In some enviroments (eg, OSX zh_CN), use 'svn --version' and splitting string
may get error version string. Use 'svn --version --quiet' to do stable svn
version check, which directly returns version string such as '1.7.0'.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10805037
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@147670 0039d316-1c4b-4281-b951-d872f2087c98
git cl dcommit statistics were not using --find-copies-harder, scaring the user
off.
R=cmp@chromium.org
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10795003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@147343 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
First, the environment variable for the child process was created but not
specified to subprocess.call().
Second, third_party/logilab/__init__.py tried to initialize itself with
pkg_resources.
TBR=chrisha@chromium.org
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10582031
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@143111 0039d316-1c4b-4281-b951-d872f2087c98
This CL adds pylint (and its dependencies) to third_party. It plumbs them into presubmit_canned_checks, and exposes a command-line tool to access pylint.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10447014
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@143016 0039d316-1c4b-4281-b951-d872f2087c98
Enable copy detection for git-cl upload. This makes
it possible to copy a directory containing many files,
add+commit the new path, and then upload a patch to
Rietveld that shows the files were copied.
In my tests, -C -C was needed to pick up a basic
file copy. -C was not enough. I'm not sure why
exactly. The output generated in the diff looks
like:
sh$ git diff -C -C HEAD~1..HEAD
diff --git a/slave/Makefile b/slave2/Makefile
similarity index 100%
copy from slave/Makefile
copy to slave2/Makefile
...
(This change requires r141676 /
https://chromiumcodereview.appspot.com/10543116/ which
updates upload.py to use --find-copies-harder.)
R=maruel@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10545107
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@141689 0039d316-1c4b-4281-b951-d872f2087c98
The effect of this is to preserve the behavior of `git status`,
i.e., only changes in the top-level repository will be reported.
Updated test expectations; I have no idea what I'm doing.
Review URL: https://chromiumcodereview.appspot.com/10454088
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@140396 0039d316-1c4b-4281-b951-d872f2087c98
Enable copy detection for git-cl upload. This makes
it possible to copy a directory containing many files,
add+commit the new path, and then upload a patch to
Rietveld that shows the files were copied.
In my tests, -C -C was needed to pick up a basic
file copy. -C was not enough. I'm not sure why
exactly. The output generated in the diff looks
like:
sh$ git diff -C -C HEAD~1..HEAD
diff --git a/slave/Makefile b/slave2/Makefile
similarity index 100%
copy from slave/Makefile
copy to slave2/Makefile
...
Review URL: https://chromiumcodereview.appspot.com/10412027
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@140314 0039d316-1c4b-4281-b951-d872f2087c98
So that a command like
"git config rietveld.viewvc-url http://src.chromium.org/viewvc/chrome?view=rev&revision="
works fine.
Fix the description automatically generated for the hooks to be using the same
code than for the one presented to the user.
R=cmp@chromium.org
BUG=
TEST=Tested manually on cygwin, win32, linux
Review URL: https://chromiumcodereview.appspot.com/10447021
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@138874 0039d316-1c4b-4281-b951-d872f2087c98
BUG=None
TEST=Change files that need OWNERS review. Upload the patch. Check that the warning suggests a minimum set of reviewers.
Review URL: https://chromiumcodereview.appspot.com/10222020
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@135619 0039d316-1c4b-4281-b951-d872f2087c98
Add corresponding support to scm.SVN.Revert() to clobber the svn:ignore'd files.
This makes the commit queue remove all the unversioned files, which could have
improved its stability. It failed in practice to improve it but it's still a
good thing to do overall.
R=petermayo@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/10355014
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@135333 0039d316-1c4b-4281-b951-d872f2087c98
Rietveld self-corrupts its status all the time, there is not point in bailing
just because of that. So just assume it's an 'M' and it'll work fine. In any
case, the diff is properly parsed to detect what was the real operation.
Add unit test that correctly process a deleted file with status:null.
TBR=nsylvain@chromium.org
BUG=
TEST=A corrupted patchset can still be committed with the Commit Queue.
Review URL: http://codereview.chromium.org/10272024
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@134733 0039d316-1c4b-4281-b951-d872f2087c98
This ability is useful for versions of Chromium (i.e. Android) which want to
cross-compile to another platform that has a fixed set of custom dependencies.
Review URL: http://codereview.chromium.org/10127004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@134280 0039d316-1c4b-4281-b951-d872f2087c98
This would spurious try job failures because the gclient revert step would throw
an exception.
R=cmp@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/10169034
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@133799 0039d316-1c4b-4281-b951-d872f2087c98
Update pylintrc to be near the pylint 0.25.1 default file.
R=cmp@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/10199016
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@133707 0039d316-1c4b-4281-b951-d872f2087c98
The first approach crrev.com/132446 was reverted due to
Windows build breaks. This approach is more robust because
it actually tests the binary by running the command actually.
BUG=114483
TEST=succeeded on Linux
Review URL: http://codereview.chromium.org/10103024
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@132783 0039d316-1c4b-4281-b951-d872f2087c98
This is useful if git-cl has no way to find out the original svn repo's url
and the user does not wish to configure git-svn and fetch the repository.
Review URL: http://codereview.chromium.org/9969099
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@130372 0039d316-1c4b-4281-b951-d872f2087c98
Enforces that each builder and builder:test association must be in its own list item in PRESUBMIT.py/GetPreferredTrySlaves().
If a user run git try -t foo, trychange.py will now take the list of all the
slaves, will skip any :compile builder, and apply the test filter to them.
Currently, git try -t foo on a chromium checkout throws an exception because of
PRESUBMIT.py files containing test specification.
R=petermayo@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/9664015
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@125975 0039d316-1c4b-4281-b951-d872f2087c98
Previously, it would apply the test filter only on the last bot.
TBR=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/9634011
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@125622 0039d316-1c4b-4281-b951-d872f2087c98
The previous behavior would cause inproper parsing;
- the bot=bot1 flag would add 'bot1': ['defaulttests'] to the dictionary.
- the testfilter=test1 flag would append 'test1' to the list, causing the value
to look like 'bot1': ['defaulttests', 'test1'].
I think on the long run the best is to keep --testfilter as a user interface but
not on the try server. This effectively stops sending testfilter=foo to the
server.
Add unit test to verify it's working properly. Refactor a bit to make unit
testing simpler.
R=petermayo@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/9599012
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@125405 0039d316-1c4b-4281-b951-d872f2087c98
Support --jobs in 'fetch' and 'recurse' commands.
BUG=115840
TEST=
Review URL: http://codereview.chromium.org/9560010
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@124657 0039d316-1c4b-4281-b951-d872f2087c98
The mere fact that they were each looking at two different outputs was already a
bad sign. Then, occasionally, the output would still not match exactly. This
needs to be recoded so remove these tests in the meantime.
TBR=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/9474003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@123743 0039d316-1c4b-4281-b951-d872f2087c98
Xcode 4.3 git returns the version like below:
git version 1.7.7.5 (Apple Git-26)
Modify GIT.AssertVersion to accept such input.
Also modify tests/gclient_scm_test.py to pass tests, but not sure
the fix is collect.
BUG=chromium:115576
TEST=ran tests/gclient_scm_test.py
Review URL: http://codereview.chromium.org/9443047
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@123399 0039d316-1c4b-4281-b951-d872f2087c98
Chrome for Android introduced the requirement for java files.
Android's style guide:
http://source.android.com/source/code-style.html#limit-line-length
defines 100 columns for .java files.
This patch changes the presubmit tests which are also used by chromium's CQ.
TEST=testCannedCheckJavaLongLines
Review URL: http://codereview.chromium.org/9417023
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@122938 0039d316-1c4b-4281-b951-d872f2087c98
When a diff contains utf8 character, the filename would be stored as a unicode
object instead of a str. This is even if the buffer is originally sent as a
utf-8 encoded str. Then once the diff is reconstructed to be sent to 'patch', a
unicode object instead of a str would be sent, confusing patch.
R=cmp@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/9387024
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@122361 0039d316-1c4b-4281-b951-d872f2087c98
This is required to avoid the need to clobber the bots when moving a directory
to deps/. Currently, the directory in question is likely to remain in the
working copy, despite having been removed, due to the presence of untracked
files. This causes the checkout from deps/ to fail.
With this change, when both --reset and --delete_unversioned_trees are
specified, the the directory in question will be removed from the working copy,
thereby allowing the copy in deps/ to be checked out correctly.
Note that untracked directories which are explicitly ignored (ie in .gitignore
or svn:ignore) will not be removed.
Note that this was previously landed in http://codereview.chromium.org/9348054
but reverted due to problems with symlinks in the chromeos build.
BUG=112887, chromium-os:20759
Review URL: http://codereview.chromium.org/9404014
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@122300 0039d316-1c4b-4281-b951-d872f2087c98
This is required to avoid the need to clobber the bots when moving a directory
to deps/. Currently, the directory in question is likely to remain in the
working copy, despite having been removed, due to the presence of untracked
files. This causes the checkout from deps/ to fail.
With this change, when both --force and --delete_unversioned_trees are
specified, the the directory in question will be removed from the working copy,
thereby allowing the copy in deps/ to be checked out correctly.
Note that untracked directories which are explicitly ignored (ie in .gitignore
or svn:ignore) will not be removed.
BUG=112887,chromium-os:20759
Review URL: http://codereview.chromium.org/9348054
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121986 0039d316-1c4b-4281-b951-d872f2087c98
This version of upload.py is slightly less annoying, it won't cancel out if no
patchset title is provided and disable colors all the time.
R=cmp@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/9233057
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121826 0039d316-1c4b-4281-b951-d872f2087c98
also, use http download instead of scp,
because scp won't work well on Windows.
BUG=chromium:113153
Review URL: https://chromiumcodereview.appspot.com/9369023
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121820 0039d316-1c4b-4281-b951-d872f2087c98
Should be no functional change.
Necessary for a follow-up change I'm making.
Review URL: http://codereview.chromium.org/9385017
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121590 0039d316-1c4b-4281-b951-d872f2087c98
Everyone at this point should have been migrated to the new format.
Review URL: http://codereview.chromium.org/9385010
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121509 0039d316-1c4b-4281-b951-d872f2087c98
If we quote as --receive-pack="git receive-pack --reviewer=foo@example.com",
git will try to run "git receive-pack --reviewer=foo@example.com" command
and failed like this
Gerrit Code Review: git receive-pack --reviewer=foo@example.com: not found
fatal: The remote end hung up unexpectedly
Command "git push --receive-pack="git receive-pack --reviewer=foo@example.com" origin HEAD:refs/for/master" failed.
Review URL: http://codereview.chromium.org/9325018
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@120337 0039d316-1c4b-4281-b951-d872f2087c98
This is the bare beginnings of Gerrit support for (non-repo) depot_tools,
based on Roland's work.
Differnt from http://codereview.chromium.org/8826015/
it read codereview.settings and if it has GERRTI_HOST and GERRIT_PORT,
then "git cl config" configured it for gerrit.
installs hooks/commit-msg
git config gerrit.host $GERRIT_HOST
git config gerrit.port $GERRIT_PORT
if it has gerrit.host config, "git cl upload" will upload a change
to gerrit as
"git push --receive-pack=... origin master"
it scans description and extract reviewers from R= line.
Review URL: http://codereview.chromium.org/9264065
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@120276 0039d316-1c4b-4281-b951-d872f2087c98
this forces license headers, no line-end whitespace, etc.
Also update the default license header regex to allow concluding */ on the final line.
Review URL: http://codereview.chromium.org/9109001
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@119448 0039d316-1c4b-4281-b951-d872f2087c98
It also removes the need of manually creating a subject argument.
Other related changes in this CL:
- Reenable the prompt for patchset title in gcl. I'm not sure why it was disabled.
- Remove git cl upload --desc_from_logs flag. --force is already meaningful.
R=cmp@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/9193023
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@119066 0039d316-1c4b-4281-b951-d872f2087c98
It speeds up significantly these tests.
R=cmp@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/9283041
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@118912 0039d316-1c4b-4281-b951-d872f2087c98
This required fixing the adhoc mock to be more versatile.
TBR=cmp@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/9178019
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@117896 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
When a file contains a single line of text, svn diff will generate an odd hunk
header. Modify the hunk parsing code to accept this format.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/9147056
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@117143 0039d316-1c4b-4281-b951-d872f2087c98
Fix RAW.NEW_NOT_NULL parsing to detect correctly it's a new file.
Add proper Hunk parsing to fix these 2 bugs.
R=dpranke@chromium.org
BUG=109715
TEST=CQ'ing a patch generated with svn that delete files is applied properly, e.g. the file is deleted and not simple 0-length.
Review URL: http://codereview.chromium.org/9167015
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@117084 0039d316-1c4b-4281-b951-d872f2087c98
I don't want to receive them even in the case of a direct call to SendStack().
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/9145001
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@117039 0039d316-1c4b-4281-b951-d872f2087c98
gcl change will look for unmodified files from the current directory and below
only.
Add shell out are cwd=checkout's root.
Fix try/finally handlers.
Remove extraneous os.chdir() calls since cwd is now correctly set.
TBR=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8994004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@115027 0039d316-1c4b-4281-b951-d872f2087c98
R=maruel@chromium.org
TEST=Configure a checkout using the NewGitWorkflow with a safesync_url and everything works (though possibly with a really long git svn fetch time).
BUG=106015
Review URL: http://codereview.chromium.org/8382030
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@115011 0039d316-1c4b-4281-b951-d872f2087c98
That helps weed out some issues faces with svn plus helped me figure out some
misuses.
Most of the commands have been implicitly depending on os.getcwd(). This change
makes it always consistent and clear when dependence on the current directory is
needed.
Remove default arguments to scm.SVN.GenerateDiff and a few other calls to be
sure the refactoring was done right.
R=dpranke@chromium.org
BUG=
TEST=make sure most commands aren't broke
Review URL: http://codereview.chromium.org/8771042
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@114262 0039d316-1c4b-4281-b951-d872f2087c98
Also, increase the wait for socket binding to 0.2 seconds because OSX10.6 is
broken _and_ slow.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8749005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@112277 0039d316-1c4b-4281-b951-d872f2087c98
Previously, --send-mail required -r to pass. Now it uses the R=|TBR= lines from
the description, which is much more useful.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8735018
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@112221 0039d316-1c4b-4281-b951-d872f2087c98
This makes sure no regression relative to subprocess is introduced in
subprocess2.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8722001
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@112217 0039d316-1c4b-4281-b951-d872f2087c98
Use it in subprocess2 and trial_dir to remove manually bookeeping.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8688011
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@111941 0039d316-1c4b-4281-b951-d872f2087c98
No code change beside tests. This is mainly a regression test to make sure I
don't regress that code path.
TBR=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8695003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@111535 0039d316-1c4b-4281-b951-d872f2087c98
This will be necessary to override member functions eventually. It also better
replicates what subprocess.Popen is.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8570005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@111530 0039d316-1c4b-4281-b951-d872f2087c98
Change return value from list to tuple for communicate(timeout != None).
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8539015
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@110094 0039d316-1c4b-4281-b951-d872f2087c98
It will simplify importing utility modules from other projects. Otherwise I was getting name conflicts with 'test'.
Reenable W0403 that was disabled in the previous CL.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8508015
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@109636 0039d316-1c4b-4281-b951-d872f2087c98
Disable temporarily W0403, will be reenabled on the next CL
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8508017
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@109435 0039d316-1c4b-4281-b951-d872f2087c98
"Add callback support for stdout and stderr."
"Add tests for both universal_newlines=True and False."
"Implement accelerated tee support for POSIX."
The reason is that the semantic of
subprocess2.check_call(cmd, timeout=60, stderr=subprocess2.STDOUT) changed,
stderr wasn't redirected to VOID anymore and for an unknown reason, it was
hanging until the timeout happened. Will reapply r109239 with a new regression
test to detect that bug.
TBR=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8505046
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@109369 0039d316-1c4b-4281-b951-d872f2087c98
This removes all the need of threading, which removes the contention on the GIL
lock.
Taking S2Test.test_check_output_tee_large as baseline, numbers are
real/user/sys in seconds:
Ubuntu workstation: ~25x 2.4/1.9/1.5 -> 0.10/0.70/0.02
OSX 10.6 laptop: ~40x 6.4/5.3/3.9 -> 0.15/0.80/0.07
Cygwin on win7: ~4x 2.8/2.2/1.3 -> 0.60/0.16/0.30
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8462008
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@109283 0039d316-1c4b-4281-b951-d872f2087c98
Fix stdout+stderr on Windows to binary mode in the child test process to make
sure testing is done correctly.
R=dpranke@chromium.org
BUG=
TEST=manually tested on OSX, Windows, cygwin and ubuntu
Review URL: http://codereview.chromium.org/8472002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@109282 0039d316-1c4b-4281-b951-d872f2087c98
It's currently an inefficient thread implementation. Interestingly
enough, callback support is significantly faster on cygwin than on
native python.
Writing an efficient implementation is punted for a later change,
one per implementation.
Stops using a temporary file since it's not necessary anymore.
The goal is to reduce the number of places where a similar paradigm
is used by having a canonical generic implementation.
R=dpranke@chromium.org
BUG=
TEST=Tested manually on Windows, cygwin, linux, OSX 10.6
Review URL: http://codereview.chromium.org/8374026
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@109239 0039d316-1c4b-4281-b951-d872f2087c98
This would cause random try job failures, especially when switching around
DEPS <-> svn directory conversion.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8431021
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@108144 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
This eats stdout while gcl is committing, which is annoying. It needs tee-like
support first. Will revisit this change later, reverting in the meantime.
TBR=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8344085
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106498 0039d316-1c4b-4281-b951-d872f2087c98
Otherwise it breaks naked --revision usage. One example issue is linux_chromeos
applying the revision to cros_deps instead of src.
TBR=dpranke@chromium.org
BUG=100335
TEST=
Review URL: http://codereview.chromium.org/8298002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@105522 0039d316-1c4b-4281-b951-d872f2087c98
It will help catch issues like the one we are getting on linux_chromeos where
the ordering of the solution is now by name, causing the default solution to be
used for --revision being the wrong one.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8276020
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@105387 0039d316-1c4b-4281-b951-d872f2087c98
Note that status() and revert() need to be correctly implemented before finishing this test.
TBR=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8287002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@105369 0039d316-1c4b-4281-b951-d872f2087c98
gclient status using --job 8 by default may return the items in a different
other. Simplify the test by forcing ordering.
TBR=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8275009
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@105338 0039d316-1c4b-4281-b951-d872f2087c98