Commit Graph

744 Commits (97345ebf1a9ca39e668c7a392f85848116a342d5)

Author SHA1 Message Date
iannucci@chromium.org 97345ebf1a Add git thaw/freeze to depot_tools.
R=agable@chromium.org, hinoka@chromium.org, stip@chromium.org, szager@chromium.org
BUG=261738

Review URL: https://codereview.chromium.org/181043018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@256778 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
stip@chromium.org 626e77d9d3 Make rietveld test work on port 10000.
depot_tools PRESUBMIT.py and tools/build PRESUBMIT.py both run on cq.golo.

If broken dev_appserver.py instances are left around, they will conflict with
master ports.

BUG=351926

Review URL: https://codereview.chromium.org/197073007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@256721 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org 8bc9b5c101 Add git-map and git-map-branches to depot_tools.
git-map: Show your local repo's history in a pseudo-graphical format from the command line.

git-map-branches: Show the topology of all of your branches, and their upstream relationships.

git-nav-upstream: Navigate (checkout) to the upstream branch of the current branch.

git-nav-downstream: Navigate (checkout) to a downstream branch of the current branch. If there's more than one downstream branch, then present a menu to select which one you want.

R=agable@chromium.org, hinoka@chromium.org, stip@chromium.org, szager@chromium.org
BUG=

Review URL: https://codereview.chromium.org/184113002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@256384 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
thestig@chromium.org 44202a28e9 Implement git cl lint.
Review URL: https://codereview.chromium.org/134223010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@256289 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
thakis@chromium.org d0b0a5b08c Revert of Another attempt: gclient: delete mismatching checkouts (https://codereview.chromium.org/183283003/)
Reason for revert:
Broke `gclient sync` for me, failing with:

Error: 1> Can't update/checkout /Volumes/MacintoshHD2/src/chrome-git/src if an unversioned directory is present. Delete the directory and try again.


For someone else, it broke it with:

% gclient sync

________ unmanaged solution; skipping src

Error: Command svn info --xml returned non-zero exit status 1 in /Users/pawliger/chromium/src/.

<?xml version="1.0" encoding="UTF-8"?>

<info>

svn: E155007: '/Users/pawliger/chromium/src' is not a working copy

Original issue's description:
> Another attempt: gclient: delete mismatching checkouts
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=255930

TBR=iannucci@chromium.org,szager@chromium.org,maruel@chromium.org,mmoss@chromium.org,borenet@google.com
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/192323006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@256005 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com 7ff04292ac Another attempt: gclient: delete mismatching checkouts
Review URL: https://codereview.chromium.org/183283003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@255930 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
machenbach@chromium.org 58a69cbe01 Support multiple try masters when sending tries to rietveld.
BUG=

Review URL: https://codereview.chromium.org/178223016

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@254321 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@google.com 267f33e6ad Make gclient_scm.py use cache_dir
Instead of having custom logic for dealing with cache directories, use
git_cache.py to populate caches.

Also fixes a bug in git_cache.py where it was looking for lockfiles in cwd rather than the cache dir.

Other changes:
* _Run now returns output.
* Always print to stdout in CheckCallAndFilterOutput, even if it gets a carriage return.  This is done because git progress report are carriage returns and not newlines and we don't want everything on the same line and not strip out the CRs.
* Removed members changed tests, its not very useful to know a new import is added.

BUG=339171

Review URL: https://codereview.chromium.org/180243006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@254248 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org 6c2b49d392 Revert "Re-re-land gclient deletion of mismatching checkouts again"
This reverts commit 6ff5448534.

'fetch --nohooks chromium' is broken with this change.

BUG=

Review URL: https://codereview.chromium.org/177003023

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@253640 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com 6ff5448534 Re-re-land gclient deletion of mismatching checkouts again
Review URL: https://codereview.chromium.org/164053003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@253616 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
sergeyberezin@chromium.org 04bd6b16bd Incorrect SSLError attribute.
ssl.SSLError does NOT have 'reason' attribute. Use str() to get a
reliable string.

Fixed the silly bug in another CL: https://codereview.chromium.org/180273003/

The ssl.SSLError does NOT have attribute 'reason', and must use the
generic 'strerror' instead. This is what happens when I submit a CL
too fast...

BUG=346845
R=stip@chromium.org,maruel@chromium.org

Review URL: https://codereview.chromium.org/180723002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@253317 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
agable@chromium.org 5a306a2aa6 Create "git cache" command.
The git cache command is a central place to manage a machine's git cache.

It provides two subcommands:
* populate -- creates or updates the cache of a given repository
* exists -- prints the path to the cache of a repo, if it exists

Gclient, deps2git, bot_update, and any other tools that touch the cache will
be able to use this command to make sure that everyone is interacting with
the cache in the same way.

R=hinoka@chromium.org, iannucci@chromium.org
BUG=339168

Review URL: https://codereview.chromium.org/164823002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@253007 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
sergeyberezin@chromium.org e0faffa486 Added a default timeout to rietveld requests.
BUG=345117

Review URL: https://codereview.chromium.org/174313002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@252452 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org 9a8b066e52 Make gclient reset use GetUsableRev.
One line for the fix, 30 lines for the test :)

R=kbr@chromium.org, mmoss@chromium.org, stip@chromium.org, szager@chromium.org
BUG=345073

Review URL: https://codereview.chromium.org/165443004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@252138 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
mmoss@chromium.org 50fd47f55f Revert 250482 "Re-reland r245404 ("If the destination directory ..."
> Re-reland r245404 ("If the destination directory doesn't contain the desired repo, delete it")
> 
> BUG=
> 
> Review URL: https://codereview.chromium.org/133073015

TBR=borenet@google.com

Review URL: https://codereview.chromium.org/146583013

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@250878 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
mmoss@chromium.org 82439aabdc Revert 250524 "gclient: Use the correct bot hostnames to enable ..."
> gclient: Use the correct bot hostnames to enable experimental deletion behavior
> 
> BUG=skia:1638
> 
> Review URL: https://codereview.chromium.org/132313017

TBR=borenet@google.com

Review URL: https://codereview.chromium.org/143183008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@250877 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com 7bfa4d8d84 gclient: Use the correct bot hostnames to enable experimental deletion behavior
BUG=skia:1638

Review URL: https://codereview.chromium.org/132313017

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@250524 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com 255b5d97da Re-reland r245404 ("If the destination directory doesn't contain the desired repo, delete it")
BUG=

Review URL: https://codereview.chromium.org/133073015

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@250482 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
thestig@chromium.org 7a54e8183a git_cl: Do not cache the relative root in Settings.
Relative root no longer makes sense after an os.chdir().
This is effectively a partial revert of r250248.

Review URL: https://codereview.chromium.org/135213006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@250478 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
thestig@chromium.org 8b0553c1f9 Cleanup: Merge a bunch of redundent env['GIT_PAGER'] = 'cat' statements.
Additionally:
- replace some RunCommand(['git', ...]) calls with RunGit().
- replace Settings._GetConfig('rietveld.foo') _GetRietveldConfig('foo').
- merge and cache calls to git rev-parse --show-cdup.
- merge some calls to git merge-base.

Review URL: https://codereview.chromium.org/157913005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@250248 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com 3dce24f8bb Revert of Reland r245404 ("If the destination directory doesn't contain the desired repo, delete it") (https://codereview.chromium.org/131743022/)
Reason for revert:
This is still failing third_party DEPS for git-svn...

Original issue's description:
> Reland r245404 ("If the destination directory doesn't contain the desired repo, delete it")
> 
> BUG=
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=249143

TBR=iannucci@chromium.org,maruel@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/152933004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@249216 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com 8456c48528 Reland r245404 ("If the destination directory doesn't contain the desired repo, delete it")
BUG=

Review URL: https://codereview.chromium.org/131743022

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@249143 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
raphael.kubo.da.costa@intel.com d03893e444 trychange.py: Use urllib2's urlopen() instead of urllib's.
urllib.urlopen() has issues with proxies similar to the ones reported in bug
134165 that are not present in urllib2.urlopen() -- namely, it does not
perform HTTP tunneling with proxy servers when fetching HTTPS URLs.

TEST=Pass --url=https://someurl to trychange.py behind a corporate proxy
R=maruel@chromium.org,iannucci@chromium.org,dpranke@chromium.org
BUG=

Review URL: https://codereview.chromium.org/133933007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@247914 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
bauerb@chromium.org 30c46d64d7 Merge instead of rebasing upstream changes in `gclient sync` when --merge is given.
Merge ALL the things!

BUG=none

Review URL: https://codereview.chromium.org/61823002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@246575 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
enne@chromium.org 3b7e15c58f Add a canned clang-format presubmit check
For simplicity, the canned presubmit check just calls git cl format
directly with a new option --dry-run which does not change the files on
disk.

Because some users may not have git or clang-format might somehow have
errors, this canned check is a warning.  Additionally, if git cl format
fails with an error then the presubmit check will silently report
success to avoid spamming misconfigured users during upload.

BUG=none

Review URL: https://codereview.chromium.org/141493002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@246066 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@google.com c82706326c Adds --auto_platform to download_from_google_storage.
A very common pattern for the users of this script is to have binaries in
three different folders, eg:
some/folder/win/bin.exe
some/folder/mac/bin
some/folder/linux/bin

Instead of using --platform to specify three different paths, we can recognize
this usage and pass in --auto_platform, and then --directory some/folder/ as the
target.

When enumerating files, it will match each individual file to see if they have
(win|mac|linux) as a parent folder name, and filter out non-matching platforms.

BUG=
TEST= src/third_party/clang_format/bin$ download_from_google_storage --auto_platform --no_auth -b chromium-clang-fomat -dr .
0> Downloading ./linux/clang-format...

Review URL: https://codereview.chromium.org/126893002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@245643 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
thakis@chromium.org 0a0e31065c Revert of If the destination directory doesn't contain the desired repo, delete it (https://codereview.chromium.org/61623008/)
Reason for revert:
This breaks `gclient sync` for me. Before this patch:
________ found .git directory; skipping src

After this patch:
Error: 1> Can't update/checkout /Volumes/MacintoshHD2/src/chrome-git/src if an unversioned directory is present. Delete the directory and try again.


Original issue's description:
> If the destination directory doesn't contain the desired repo, delete it
> 
> Basic functionality - this may not be in quite the right place.
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=245404

TBR=iannucci@chromium.org,ilevy@chromium.org,cmp@chromium.org,maruel@chromium.org,morrita@chromium.org,borenet@google.com
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/141633005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@245530 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com b75a835e65 If the destination directory doesn't contain the desired repo, delete it
Basic functionality - this may not be in quite the right place.

Review URL: https://codereview.chromium.org/61623008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@245404 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
nick@chromium.org 3ac1c4e320 Depot tools: use the clang-format binaries that are now included
as part of the Chromium checkout.

This follows the approach used by gn.

Changes include:
 - in-the-PATH clang-format trampoline scripts
 - clang_format.py, which finds clang-format binaries inside of Chrome
 - Hook 'git cl format' to the new binaries and scripts
 - Rearrange some code, for reuse between clang_format.py and gn.py

BUG=240309
TEST=presubmits (one failure on mac, but it fails on a clean checkout too)

Review URL: https://codereview.chromium.org/134313007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@245074 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
rmistry@google.com 907525863f Add support for BUG_PREFIX in codereview.settings.
This change will allow projects other than chromium to specify 'BUG_PREFIX: project_name:' in their codereview.settings file.
Currently, the change is created with 'BUG=', entering a project's bug number there will point it to chromium's issue tracker. Adding a project specific prefix will make the links point to the project's issue tracker without the developer having to know about the magic prefix.

BUG=skia:1983

Review URL: https://codereview.chromium.org/132233006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@244801 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
jochen@chromium.org 3ec0d54fd7 Indiciate the tree status in the rietveld message when bypassing hooks
BUG=none
R=iannucci@chromium.org,maruel@chromium.org

Review URL: https://codereview.chromium.org/130803004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@244793 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
maruel@chromium.org 1ce8e665e7 Do not tell people to ask me for help. I won't help them.
Write a small HowTo to help confused people by confusing checks.

R=iannucci@chromium.org
BUG=

Review URL: https://codereview.chromium.org/137653003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@244717 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
wtc@chromium.org 2eefccaddb Handle the PrimeLint SSL read timeout better.
It takes more than 10 seconds to lint some CLs. Silently
ignore the expected timeout.

R=maruel@chromium.org,iannucci@chromium.org
BUG=290402
TEST=none

Review URL: https://codereview.chromium.org/130493002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@243968 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
pgervais@chromium.org 87884cc015 Added --(de)activate-update options
These options have been added to the 'git cl config' subcommand.
--deactivate-update tells git cl not to update the values inside
.git/config from the codereview.settings file. --activate-update does
the opposite.

This is designed for testing/development purposes only, for example, to
be able to change the rietveld URL.

BUG=327901

Review URL: https://codereview.chromium.org/104043008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@242943 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
binji@chromium.org c3d17dd54a git_cl.py: In the "status" command, add space after the branch name.
i.e. the output looks like:

   my-branch-name : https://codereview.chromium.org/1234567
  my-other-branch : https://codereview.chromium.org/8675309

This makes it possible to double-click the branch name to use it in a subsequent
command.

BUG=none
R=maruel@chromium.org

Review URL: https://codereview.chromium.org/118613003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@241731 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
stip@chromium.org 5ca2762dea Allow PRESUBMIT.py files to have old and new-style trybot specifications (as long as each file is consistent).
BUG=278554

Review URL: https://codereview.chromium.org/74163002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@241590 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
bratell@opera.com ed2b4fe59b Handle conflicting os deps better in gclient.
It's possible in gclient to list multiple operating systems on the
command line and while handling them all perfectly might not be possible
it's possible to make it better than today.

This patch makes sure None never overrides any previous value and it
adds some output to indicate what kind of dangerous choices it made.

BUG=248168

Review URL: https://codereview.chromium.org/23875029

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@240892 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
bratell@opera.com 0ee42a68c1 Avoid windows presubmit hang in gclient tests.
If os.kill(os.getpid(), signal.CTRL_C_EVENT) doesn't do what the
test author hopes it will do, the test will hang until it has calculated
a million out-of-thread/process results. That is approximately an
infinite hang.

BUG=

Review URL: https://codereview.chromium.org/110883004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@240319 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@chromium.org c6a2ee6930 Adds SSO auth to gsutil
Code path:
1. plugins.sso_auth is imported, which adds the AuthHandler class to the global state.
2. HasConfiguredCredentials() in gslib/utils.py is called by gsutil, and will return true if "prodaccess" exists on the system, which tells the system that we don't want a no-op auth handler.
3. When a command is called, all the auth handlers are cycled through and sso_auth.SSOAuth is called, which calls a stubby command to emit a gaiamint'ed oauth2 access token, which is then used as the Authorization Header

if --bypass_prodaccess is passed in, then:
1. HasConfiguredCredentials() will bypass the check for prodaccess, as if it didn't exist.
2. plugins.sso_auth does not get imported.
Which will essentially cause gsutil to behave as if this patch never existed.

So the expected behavior is:
=.boto file does not exist, prodaccess exists, but unauthenticated=
Failure: No handler was ready to authenticate. 3 handlers were checked. ['OAuth2Auth', 'HmacAuthV1Handler', 'SSOAuth'] Check your credentials.

=.boto file exists, prodaccess exists, but unauthenticated=
sso_auth will raise NotReadyToAuthenticate, and the .boto file will be used instead

=.boto file exists, prodaccess exists, authenticated=
sso_auth will be run _after_ the default gsutil authenticator, which causes the sso_auth to be used over whatever the default authentication is.

bypass_prodaccess is passed in by default to upload_to_google_storage because we expect people who use upload_to_google_storage to not need prodaccess and have their own boto file already.  Also the sso_auth plugin will only request a readonlyi token, which will not work for uploading.

BUG=258152

Review URL: https://codereview.chromium.org/86123002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@240266 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
maruel@chromium.org ffeb2f36d7 Print test duration in verbose mode.
This is useful to diagnose slow tests. Make this multiprocessing aware. Stop
printing when the commands are added but use the proper message system instead.

R=iannucci@chromium.org
BUG=

Review URL: https://codereview.chromium.org/99453003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@238388 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
erikchen@google.com 12816087e7 Allow obj-c import statements to be as long as necessary.
I've unified the checks for language specific exceptions to line length. There is a behavior change where cpp compiler directives no longer have a maximum line length (previously they were restricted to 150% of max line length). This change was made to match the behavior for java files.

BUG=NONE

Review URL: https://codereview.chromium.org/100163002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@238268 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
ukai@chromium.org 7044efcc7b GERRIT_PORT is no longer used in git_cl.py
BUG=maruel@chromium.org,szager@chromium.org

Review URL: https://codereview.chromium.org/90763004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@237657 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
ukai@chromium.org 712d6105b3 Download commit-msg from gerrit-review.googlesource.com
Tell download tools/hooks/commit-msg mannually if it looks broken.

chrome-internal-reviews.googlesource.com requires
authentication to access tools/hooks/commit-msg, and
we'll get Google Sign-in page rather than expected shell script.

R=szager@chromium.org,maruel@chromium.org,ilevy@chromium.org
BUG=

Review URL: https://codereview.chromium.org/87173002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@237454 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
maruel@chromium.org 1a60dca731 Fix unpinned version to track upstream.
This is a serious bug, if a version is unpinned, it would become stuck at
whatever a local branch 'master' may point to. This is extremely bad when a
pinned dependency is unpinned on purpose, for example on a canary master. We
reproduced this problem on the chromium.swarm master by setting a custom_vars
swarming_revision to '', which then stopped syncing at the expected
origin/master commit but instead got stuck to what happened to be a local master
branch.

This happens on git dependencies if the main solution is using svn. This doesn't
happen on git checkouts using .DEPS.git due to bug 323233.

The issue looks like:
________ running 'git reset --hard HEAD' in '/path/src/tools/swarming_client'
HEAD is now at 4727bd5 Some commit
Checked out revision d908a546e28d1e9f85f5690cf6c3a080f06ba711

Note that HEAD and what is checked out do not match.

Also reduce the hardcoding of 'origin' by creating a variable named 'remote'.

R=petermayo@chromium.org
BUG=322961

Review URL: https://codereview.chromium.org/85473007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@237332 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
scottmg@chromium.org ff7ea00a6e Silence common noisiness in download_from_google_storage
Seems overly verbose when run in "gclient runhooks".

R=iannucci@chromium.org, brettw@chromium.org

Review URL: https://codereview.chromium.org/58783002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@237120 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@chromium.org c61894cc02 Add no_auth flag to skip auth checking for buckets that don't require it. Also fix tests
BUG=321254

Review URL: https://codereview.chromium.org/76583002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@236039 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org aa74cf65d0 Add git-number script to calculate generation numbers for commits.
Compatible with any git topology (multiple roots, weird branching/merging, etc.)
I can't get it to be any faster (in python). Suggestions welcome :).

On z600/linux, this takes 5.1s to calculate the initial count for 2e3de954ef0a
(HEAD on src.git at the time of writing). Subsequent lookups take ~0.06s. For
reference, this machine takes 3s to just list the revisions in sorted order
without any additional processing (using rev-list).

All calculations are stored in a git-notes-style ref with the exception that the
leaf 'tree' object which would normally be stored in a git-notes world is
replaced with a packed binary file which consists of records [hash int]. Each
run of this script will create only 1 commit object on this internal ref which
will have as its parents:
  * The previous git number commit
  * All of the target commits we calculated numbers for.
This ref is then excluded on subsequent invocations of rev-list, which means that
git-number will only ever process commit objects which it hasn't already
calculated a value for. It also prevents you from attempting to number this
special ref :).

This implementation only has a 1-byte fanout which seems to be the best
performance for the repos we're dealing with (i.e. on the order of 500k commit
objects).  Bumping this up to a 2-byte fanout became extremely slow (I suspect
the internal caching structures I'm using are not efficient in this mode and
could be improved). Using no fanout is slower than the 1 byte fanout for lookups
by about 30%.

R=agable@chromium.org, stip@chromium.org, szager@chromium.org
BUG=280154,309692,skia:1639

Review URL: https://codereview.chromium.org/26109002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@236035 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org 4731ec4426 Fix upstream.sh presubmit test for git 1.8.3+
Previously this relied on being able to track branches which didn't have a
remote refspec. Now we add a fake origin for the git-svn test repo, and use
--prefix so that git has a remote to track and the refs are correctly
namespaced.

Should also be backwards compatible with older versions of git.

R=maruel@chromium.org
BUG=

Review URL: https://codereview.chromium.org/61893006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@233649 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
stip@chromium.org 68e0419d2f Rework bot and test parsing to allow receipt of (bot, set(test)) specifications.
This is needed for a further CL to unify TS and CQ using PRESUBMIT.py.

BUG=278554

Review URL: https://codereview.chromium.org/54373011

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@232813 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org f2d7d6b518 Consolidate subprocess retry logic into gclient_utils.
Add retry for all git operations that speak to a remote.  This
should smooth out issues with the git/gerrit-on-borg service.

Review URL: https://codereview.chromium.org/26234004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@229219 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago