mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
Revert "Better tooling"
This reverts commit eed06d620f.
Accidental dcommit
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299615 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,7 +2,6 @@
|
||||
*.pyc
|
||||
|
||||
# Ignore the batch files produced by the Windows bootstrapping.
|
||||
/git-bash
|
||||
/git.bat
|
||||
/gitk.bat
|
||||
/pylint.bat
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
export EDITOR=${EDITOR:=notepad}
|
||||
WIN_BASE=`dirname $0`
|
||||
UNIX_BASE=`cygpath "$WIN_BASE"`
|
||||
export PATH=$PATH:$UNIX_BASE/SVN_BIN_DIR:$UNIX_BASE/PYTHON_BIN_DIR:$UNIX_BASE/PYTHON_BIN_DIR/Scripts
|
||||
export PYTHON_DIRECT=1
|
||||
export PYTHONUNBUFFERED=1
|
||||
if [[ $# > 1 ]]; then
|
||||
$UNIX_BASE/GIT_BIN_DIR/bin/bash.exe "$@"
|
||||
else
|
||||
$UNIX_BASE/GIT_BIN_DIR/git-bash.exe &
|
||||
fi
|
||||
@@ -89,18 +89,15 @@ for /d %%i in ("%WIN_TOOLS_ROOT_DIR%\git-*_bin") do (
|
||||
|
||||
if "%WIN_TOOLS_FORCE%" == "1" goto :GIT_INSTALL
|
||||
|
||||
if not exist "%GIT_EXE_PATH%" goto :GIT_INSTALL
|
||||
|
||||
call "%GIT_EXE_PATH%" --version 2>nul 1>nul
|
||||
if errorlevel 1 goto :GIT_INSTALL
|
||||
|
||||
:: Several git versions can live side-by-side; check the top-level
|
||||
:: batch script to make sure it points to the desired version.
|
||||
for %%f in (git.bat gitk.bat ssh.bat ssh-keygen.bat git-bash) do (
|
||||
find "%GIT_BIN_DIR%" "%WIN_TOOLS_ROOT_DIR%\%%f" 2>nul 1>nul
|
||||
if exist "%GIT_EXE_PATH%" (
|
||||
call "%GIT_EXE_PATH%" --version 2>nul 1>nul
|
||||
if errorlevel 1 goto :GIT_INSTALL
|
||||
rem Several git versions can live side-by-side; check the top-level
|
||||
rem batch script to make sure it points to the desired version.
|
||||
find "%GIT_BIN_DIR%" "%WIN_TOOLS_ROOT_DIR%\git.bat" 2>nul 1>nul
|
||||
if errorlevel 1 goto :GIT_MAKE_BATCH_FILES
|
||||
goto :SYNC_GIT_HELP_FILES
|
||||
)
|
||||
goto :SYNC_GIT_HELP_FILES
|
||||
|
||||
:GIT_INSTALL
|
||||
echo Installing git %GIT_VERSION% (avg 1-2 min download) ...
|
||||
@@ -131,11 +128,10 @@ if not exist "%GIT_INST_DIR%\." goto :GIT_FAIL
|
||||
:: Create the batch files.
|
||||
set GIT_TEMPL=%~dp0git.template.bat
|
||||
set SED=%GIT_INST_DIR%\usr\bin\sed.exe
|
||||
call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/g" -e "s/GIT_PROGRAM/cmd\\\\git.exe/g" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\git.bat"
|
||||
call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/g" -e "s/GIT_PROGRAM/cmd\\\\gitk.exe/g" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\gitk.bat"
|
||||
call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/g" -e "s/GIT_PROGRAM/usr\\\\bin\\\\ssh.exe/g" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\ssh.bat"
|
||||
call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/g" -e "s/GIT_PROGRAM/usr\\\\bin\\\\ssh-keygen.exe/g" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\ssh-keygen.bat"
|
||||
call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/g" -e "s/PYTHON_BIN_DIR/python276_bin/g" -e "s/SVN_BIN_DIR/svn_bin/g" < %~dp0git-bash.template.sh > "%WIN_TOOLS_ROOT_DIR%\git-bash"
|
||||
call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/" -e "s/GIT_PROGRAM/cmd\\\\git.exe/" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\git.bat"
|
||||
call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/" -e "s/GIT_PROGRAM/cmd\\\\gitk.exe/" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\gitk.bat"
|
||||
call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/" -e "s/GIT_PROGRAM/usr\\\\bin\\\\ssh.exe/" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\ssh.bat"
|
||||
call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/" -e "s/GIT_PROGRAM/usr\\\\bin\\\\ssh-keygen.exe/" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\ssh-keygen.bat"
|
||||
|
||||
:: Ensure various git configurations are set correctly at they system level.
|
||||
call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.autocrlf false
|
||||
|
||||
@@ -14,7 +14,6 @@ Usage:
|
||||
import logging
|
||||
import optparse
|
||||
import sys
|
||||
import os
|
||||
|
||||
from third_party import colorama
|
||||
|
||||
@@ -95,7 +94,7 @@ def main(argv):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
colorama.init(wrap="TERM" not in os.environ)
|
||||
colorama.init()
|
||||
try:
|
||||
sys.exit(main(sys.argv[1:]))
|
||||
except KeyboardInterrupt:
|
||||
|
||||
@@ -2303,7 +2303,7 @@ def main(argv):
|
||||
return 2
|
||||
fix_encoding.fix_encoding()
|
||||
disable_buffering()
|
||||
colorama.init(wrap="TERM" not in os.environ)
|
||||
colorama.init()
|
||||
dispatcher = subcommand.CommandDispatcher(__name__)
|
||||
try:
|
||||
return dispatcher.execute(OptionParser(), argv)
|
||||
|
||||
11
git-bash
Executable file
11
git-bash
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# This apparently useless file enables windows users to get access to
|
||||
# depot_tools' built-in bash.exe. When git executes this file as in `git bash`,
|
||||
# it has bash and related tools pre-installed in the environment. Therefore even
|
||||
# though 'bash' from cmd.exe doesn't work, bash here does work as you'd expect.
|
||||
|
||||
bash "$@"
|
||||
@@ -4478,7 +4478,7 @@ if __name__ == '__main__':
|
||||
# These affect sys.stdout so do it outside of main() to simplify mocks in
|
||||
# unit testing.
|
||||
fix_encoding.fix_encoding()
|
||||
colorama.init(wrap="TERM" not in os.environ)
|
||||
colorama.init()
|
||||
try:
|
||||
sys.exit(main(sys.argv[1:]))
|
||||
except KeyboardInterrupt:
|
||||
|
||||
@@ -27,7 +27,6 @@ Branches are colorized as follows:
|
||||
|
||||
import argparse
|
||||
import collections
|
||||
import os
|
||||
import sys
|
||||
import subprocess2
|
||||
|
||||
@@ -272,7 +271,7 @@ class BranchMapper(object):
|
||||
|
||||
|
||||
def main(argv):
|
||||
colorama.init(wrap="TERM" not in os.environ)
|
||||
colorama.init()
|
||||
if get_git_version() < MIN_UPSTREAM_TRACK_GIT_VERSION:
|
||||
print >> sys.stderr, (
|
||||
'This tool will not show all tracking information for git version '
|
||||
|
||||
@@ -41,15 +41,10 @@ if [[ "$DEPOT_TOOLS" = "$0" ]]; then
|
||||
else
|
||||
BASENAME="${0##*\\}"
|
||||
fi
|
||||
|
||||
SCRIPT="${SCRIPT-${BASENAME//-/_}.py}"
|
||||
|
||||
if [[ $PYTHON_DIRECT = 1 ]]; then
|
||||
python.exe "$DEPOT_TOOLS\\$SCRIPT" "$@"
|
||||
if [[ -e "$DEPOT_TOOLS/python.bat" && $OSTYPE = msys ]]; then
|
||||
cmd.exe //c "$DEPOT_TOOLS\\python.bat" "$DEPOT_TOOLS\\$SCRIPT" "$@"
|
||||
else
|
||||
if [[ -e "$DEPOT_TOOLS/python.bat" && $OSTYPE = msys ]]; then
|
||||
cmd.exe //c "$DEPOT_TOOLS\\python.bat" "$DEPOT_TOOLS\\$SCRIPT" "$@"
|
||||
else
|
||||
exec "$DEPOT_TOOLS/$SCRIPT" "$@"
|
||||
fi
|
||||
exec "$DEPOT_TOOLS/$SCRIPT" "$@"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user