There's a race condition in python's subprocess module, and gclient uses
it heavily while multithreaded. Avoid the race by locking around calls
to subprocess.Popen's constructor. Detailed explanation in the bug.
BUG=531561
Review URL: https://codereview.chromium.org/1343783004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296685 0039d316-1c4b-4281-b951-d872f2087c98
This allows calling 'git cl try' with properties. Each
property is set with the option -p key=value, where value
will be treated as json if possible or as string.
Examples for -p and pitfalls:
key=string -> 'string'
key=1 -> 1
key=[1,2,3] -> [1,2,3]
key=["one","two","three"] -> '[one,two,three]'
'key=["one","two","three"]' -> ['one','two','three']
BUG=488235
Review URL: https://codereview.chromium.org/1339073002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296683 0039d316-1c4b-4281-b951-d872f2087c98
With this change, and running 'git auto-svn' whenever starting work on a
new upstream branch, much git-svn confusion and mayhem can be avoided.
For example:
$ git checkout -b drover_2403 branch-heads/2403
$ git svn info --url
svn://svn.chromium.org/chrome-internal/trunk/tools/build
# git-svn still thinks it's dealing with trunk.
$ git auto-svn
...
$ git svn info --url
svn://svn.chromium.org/chrome-internal/branches/2403/tools/build
# That's better.
R=agable@chromium.org, amineer@chromium.org
Review URL: https://codereview.chromium.org/1340733002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296667 0039d316-1c4b-4281-b951-d872f2087c98
Without this I get prompted if I really want to remote the file.
BUG=none
TEST=none
Review URL: https://codereview.chromium.org/1332303003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296651 0039d316-1c4b-4281-b951-d872f2087c98
Several Chromium OS projects were moved to AOSP so now the development
is in that gerrit instance. This patch includes it to the list.
BUG=None
TEST=`my_activity.py` shows changes in the AOSP gerrit instance.
Review URL: https://codereview.chromium.org/1332723002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296634 0039d316-1c4b-4281-b951-d872f2087c98
At the moment, this doesn't work too well for something that was just merged to
45.
[(b912ace...)]scottmg@scottmg:/work/cr/src$ git find-releases 55b4c95889d6a72e52bc72702580a62f04f35777
commit 55b4c95889d6a72e52bc72702580a62f04f35777 was:
initially in 47.0.2501.0
merged to undefined (as de54b58d404a0cdf01639ae7260ef10bbb843ed9)
merged to 46.0.2490.19 (as b4ba1071baaabc92cb5a2ca89e238c478eca0075)
("undefined" being the problem). This is because:
[(b912ace...)]scottmg@scottmg:/work/cr/src$ git name-rev --tags de54b58d404a0cdf01639ae7260ef10bbb843ed9
de54b58d404a0cdf01639ae7260ef10bbb843ed9 undefined
But,
[(b912ace...)]scottmg@scottmg:/work/cr/src$ cat .git/refs/remotes/branch-heads/2454
de54b58d404a0cdf01639ae7260ef10bbb843ed9
So, if name-rev --tags says it's not yet tagged, rather than just printing
'undefined', at least say which branch it was merged to. As in:
[(b912ace...)]scottmg@scottmg:/work/cr/src$ git find-releases 55b4c95889d6a72e52bc72702580a62f04f35777
commit 55b4c95889d6a72e52bc72702580a62f04f35777 was:
initially in 47.0.2501.0
merged to branch-heads/2454 [untagged] (as de54b58d404a0cdf01639ae7260ef10bbb843ed9)
merged to 46.0.2490.19 (as b4ba1071baaabc92cb5a2ca89e238c478eca0075)
R=dpranke@chromium.org,primiano@chromium.org
Review URL: https://codereview.chromium.org/1325233005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296621 0039d316-1c4b-4281-b951-d872f2087c98
Finds the release(s) for a given change.
Relies on using "git cherry-pick -x" per
http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/git-drover.html
so that the merge commit message contains the original commit.
Example:
d:\src\cr3\src>git show -s 53cc88da9a258bc4a34c4bff50025ee044c2e64d
commit 53cc88da9a258bc4a34c4bff50025ee044c2e64d
Author: grt <grt@chromium.org>
Date: Tue Jun 2 10:33:09 2015 -0700
Beacons for tracking default browser status.
BUG=488247
R=gab@chromium.org,wfh@chromium.org
Review URL: https://codereview.chromium.org/1146843003
Cr-Commit-Position: refs/heads/master@{#332423}
"Now, where did that ship?"
d:\src\cr3\src>git find-releases 53cc88da9a258bc4a34c4bff50025ee044c2e64d
commit 53cc88da9a258bc4a34c4bff50025ee044c2e64d was:
initially in 45.0.2421.0
merged to 43.0.2357.126 (as 8a5ccc0e0ad6b2237b2fcfffcb0ab24fe97bc77b)
merged to 44.0.2403.39 (as d5d165943a88e51a64fd9e2fbcc781e4aaee270f)
Review URL: https://codereview.chromium.org/1332473003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296604 0039d316-1c4b-4281-b951-d872f2087c98
Consider an SVN repo which was mirrored to git by git_updater. When SVN repo is migrated to github, the git histories of chromium mirror and new github one are different. As a result, hashes of the objects do not match.
Before, gclient would just get stuck at trying to fetch the repo after changing its remote url with errors like this:
...
[0:01:21] error: refs/heads/master does not point to a valid object!
[0:01:21] error: refs/remotes/origin/HEAD does not point to a valid object!
[0:01:21] error: refs/remotes/origin/master does not point to a valid object!
[0:01:21] error: refs/heads/master does not point to a valid object!
[0:01:21] error: refs/remotes/origin/HEAD does not point to a valid object!
[0:01:21] error: refs/remotes/origin/master does not point to a valid object!
[0:01:21] fatal: bad object HEAD
[0:01:21] error: /b/git-cache/chromium.googlesource.com-external-github.com-google-open--vcdiff did not send all necessary objects
The solution is to notice such state, delete the .git folder, and clone again.
BUG=523239
R=akuegel@chromium.org
Review URL: https://codereview.chromium.org/1303293002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296417 0039d316-1c4b-4281-b951-d872f2087c98
I fixed the overlapping argument and fixed up the tests so that the actual sha1 hash is now passed (since the tool actually check now that the downloaded file hash matches)
BUG=
R=hinoka@google.com
Review URL: https://codereview.chromium.org/1285423002 .
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296346 0039d316-1c4b-4281-b951-d872f2087c98
Patch contributed by Leung Wing Chung <lwchkg@gmail.com>.
Committed on his behalf due to Commit Queue's mishandling of
CRLF files.
Here is my procedure for testing for a new install
1. Download and unzip
https://src.chromium.org/svn/trunk/tools/depot_tools.zip
Note that the path should include a space character,
e.g. "with a space"
2. Copy the three modified files to the unzipped folder
3. Convert the unzipped files into Windows CRLF.
4. REMOVE the following lines from update_depot_tools.bat
(Should I file a separate bug for this?)
:: Initialize/update virtualenv.
cd /d "%DEPOT_TOOLS_DIR%."
python -u bootstrap\bootstrap.py --deps_file bootstrap\deps.pyl --quiet ENV
if errorlevel 1 goto :EOF
5. Run gclient. Installation should be okay until
"git rebase" is run.
R=maruel@chromium.org
BUG=507301
Review URL: https://codereview.chromium.org/1232023004 .
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296275 0039d316-1c4b-4281-b951-d872f2087c98
1. GetFileList() returns a list of path\names on Windows but of path/names on
non-Windows. To not perturb existing hashes, I guess the hashing code should do
path.replace('/', '\\') before hashing.
2. GetFileList() returns a sorted list of filenames, and \ compares pretty
different than / (the former is less than all numbers while the latter
is greater, for example). So replace / with \\ for sorting too.
With this change, OS X produces the same file hash as Windows.
The script still early-exits on non-Windows, so no visible change yet.
BUG=495204
Review URL: https://codereview.chromium.org/1287543005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296271 0039d316-1c4b-4281-b951-d872f2087c98
The majority of chromium projects are on googlesource.com, which can
display a range of commits on the web. Use this feature instead of
dumping logs into the commit message.
Particularly, this avoids creating large commit messages as these logs
sometimes contain upwards of 50 commits.
Review URL: https://codereview.chromium.org/1257233006
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296184 0039d316-1c4b-4281-b951-d872f2087c98
This does one last check to see if the file downloaded by
download_from_google_storage.py actually matches its sha1
BUG=
Review URL: https://codereview.chromium.org/1252313005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296155 0039d316-1c4b-4281-b951-d872f2087c98
Original CL: https://codereview.chromium.org/1242013003/
Executing a bat file from another bat file will replace
that first bat file with the second one. To call the
second one and then return and execute the rest of the
first one, you have to do "call second.bat"
"python" is really "python.bat" so that this happened
was not obvious. More obvious now.
R=bratell@opera.comTBR=pgervais@chromium.org
BUG=511926
Review URL: https://codereview.chromium.org/1239263003 .
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296063 0039d316-1c4b-4281-b951-d872f2087c98
gclient should be checking out origin/deployed, not deployed.
--revision deployed is local, origin/deployed actually causes it to fetch
BUG=
Review URL: https://codereview.chromium.org/1236133005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296055 0039d316-1c4b-4281-b951-d872f2087c98
A flag for showing the description instead of opening the editor to modify it.
BUG=493885
Review URL: https://codereview.chromium.org/1237483003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296000 0039d316-1c4b-4281-b951-d872f2087c98
After this CL is in users will be able to skip dependency checks and uploads for specific branches locally by running (using test2 as a branch name):
git config branch.test2.skip-deps-uploads True
To undo the skipping:
git config --unset branch.test2.skip-deps-uploads
To do the above commands globally (across all checkouts):
git config --global branch.test2.skip-deps-uploads True
git config --global --unset branch.test2.skip-deps-uploads
BUG=chromium:504832
Review URL: https://codereview.chromium.org/1210903005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295953 0039d316-1c4b-4281-b951-d872f2087c98
This is needed to ensure that it resolves to a correct URL on Gitiles.
R=maruel@chromium.org, smut@google.com
Review URL: https://codereview.chromium.org/1225713002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295932 0039d316-1c4b-4281-b951-d872f2087c98
This both ensures that 'git auto-svn' has been properly run, and also that
the Blink checkout is appropriately 'unmanaged'.
R=dpranke@chromium.org, mmoss@chromium.org
BUG=289742
Review URL: https://codereview.chromium.org/1186053007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295916 0039d316-1c4b-4281-b951-d872f2087c98
* make RunTest's multiprocessing.Pool in the constructor of InputApi
to avoid getting tripped up by chdir manipulation.
* Don't do the split cyclic-import check when the invoker of the
Pylint presubmit checks explicitly sends cyclic import check
parameters via extra_args
* fix pseudobug where ownership of the files variable was unclear,
and pass all arguments on stdin (instead of mix of CLI + stdin).
* fix bug in pylint which caused it to manipulate sys.path before
spawning its subprocesses, which caused multiprocessing to fail
on windows.
* Note: This may carry a slight semantic change. Before, pylint would
add all .py files' directories to sys.path while checking any of
them. Now in parallel mode, pylint will only add the path of the
single file to sys.path. This behavior actually mirrors Python's
own behavior, so the check should be more-correct than before (and
should cut down on pylint import scanning time with very large
sys.path's).
* If someone encounters an issue with this, please note that the
GetPylint check also includes an extra_paths_list which is
expressly for this purpose.
R=dpranke@chromium.org, kbr@chromium.org, maruel@chromium.org
BUG=501012
Review URL: https://codereview.chromium.org/1208743002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295908 0039d316-1c4b-4281-b951-d872f2087c98
The activate_end method is used in infra/bootstrap/build_deps.py, which doesn't
pass the value for this parameter.
R=pgervais@chromium.org
BUG=503067
Review URL: https://codereview.chromium.org/1213113002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295893 0039d316-1c4b-4281-b951-d872f2087c98
Reason for revert:
This conflicts with (and duplicates?) the -z option below and has broken one of the chrome android downstream bots.
Safer to revert than trying to fix
Original issue's description:
> Add support for tar.gz archive files to download from download_from_google_storage
>
> Also, add support for directly setting the public read flag on uploaded files.
>
> The support for tar.gz allows the uploaded bundle to be a single tar.gz file instead of a lot of individual files using the directory support already in. The benefit here is that it is much easier to update the dependency. Simply clean out the existing files, copy in the new ones, create a tar.gz file, with the same name as the directory + 'tar.gz'. If the directory name and file name does not match up we will not clean up existing artifacts on download (i.e., there can be left over files after extracting).
>
> I am doing this because I am moving a bunch of the dart dependencies to gcs, and a lot of our dependencies is much easier to manage with this in. If you don't like this, I can simply wrap the download script in another python script and do the logic there, but this may be handy for other people as well.
>
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=295872
TBR=hinoka@google.com,hinoka@chromium.org,azarchs@chromium.org,ricow@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1209033006
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295883 0039d316-1c4b-4281-b951-d872f2087c98
All CQ supported projects already have git mirrors. We don't
want to support svn checkouts anymore.
BUG=503847
Review URL: https://codereview.chromium.org/1213363002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295882 0039d316-1c4b-4281-b951-d872f2087c98
Also, add support for directly setting the public read flag on uploaded files.
The support for tar.gz allows the uploaded bundle to be a single tar.gz file instead of a lot of individual files using the directory support already in. The benefit here is that it is much easier to update the dependency. Simply clean out the existing files, copy in the new ones, create a tar.gz file, with the same name as the directory + 'tar.gz'. If the directory name and file name does not match up we will not clean up existing artifacts on download (i.e., there can be left over files after extracting).
I am doing this because I am moving a bunch of the dart dependencies to gcs, and a lot of our dependencies is much easier to manage with this in. If you don't like this, I can simply wrap the download script in another python script and do the logic there, but this may be handy for other people as well.
Review URL: https://codereview.chromium.org/807463005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295872 0039d316-1c4b-4281-b951-d872f2087c98