This allows git-cl to run successfully when the depot tools are installed to a path with a space in it.
Change-Id: I79fa44d13f89fb0ee1baaa90961b4c4284913c40
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2125626
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Retrying the change in https://codereview.chromium.org/1415993003/, with
fixes to properly handle being called with either Windows- or
POSIX-style paths (the previous attempt assumed it was always called
with POSIX-style paths under MSYS, which itself was attempting to fix
the assumption that it was always called with Windows-style paths, but
neither assumption was right).
This change doesn't actually use the wrapper in any new places, but
subsequent changes will be made to use it in places where
'exec python' is called directly, like gclient and fetch.
BUG=411518
R=iannucci@google.com, sky@google.com
Review URL: https://codereview.chromium.org/1411793006
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297401 0039d316-1c4b-4281-b951-d872f2087c98
Reason for revert:
Speculative revert in case this caused the bots to fail bot_update.
Original issue's description:
> Generalize python_git_runner for use in non-git scripts.
>
> Also fixes an msys (git-bash) incompatibility, similar to the one
> fixed in crrev.com/4845f0ed694ff071da5f6ee937a0bce2ea4e6fd2.
>
> This change doesn't actually use the wrapper in any new places, but
> subsequent changes will be made to use it in places where
> 'exec python' is called directly, like gclient and fetch.
>
> BUG=411518
> R=iannucci@google.com
>
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=297357
TBR=iannucci@google.com,iannucci@chromium.org,mmoss@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=411518
Review URL: https://codereview.chromium.org/1414923008
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297358 0039d316-1c4b-4281-b951-d872f2087c98
Also fixes an msys (git-bash) incompatibility, similar to the one
fixed in crrev.com/4845f0ed694ff071da5f6ee937a0bce2ea4e6fd2.
This change doesn't actually use the wrapper in any new places, but
subsequent changes will be made to use it in places where
'exec python' is called directly, like gclient and fetch.
BUG=411518
R=iannucci@google.com
Review URL: https://codereview.chromium.org/1415993003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297357 0039d316-1c4b-4281-b951-d872f2087c98
This introduces python_git_runner.sh, and makes git-cl, git-cache, git-number,
and git-try use it.
R=agable@chromium.org, szager@chromium.org
BUG=261738
Review URL: https://codereview.chromium.org/188383002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@256131 0039d316-1c4b-4281-b951-d872f2087c98
Using "%@" will correctly requote quoted arguments. Tested with repro case.
The fix in r232184 missed the necessary argument quoting.
R=iannucci@chromium.org
BUG=314192
BUG=241769
Review URL: https://codereview.chromium.org/47873010
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@232501 0039d316-1c4b-4281-b951-d872f2087c98
Tested to work now with the repro case of bug 313552.
"/c" was interpreted by cygwin's bash as a path and was replaced with c:/. :(
Using //c seems to be passed through properly.
There is probably other escaping problem but this should be good enough at
this stage.
Ref: http://www.mingw.org/wiki/Posix_path_conversionR=iannucci@chromium.org
BUG=241769
BUG=313552
Review URL: https://codereview.chromium.org/50143013
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@232184 0039d316-1c4b-4281-b951-d872f2087c98
This broke git cl patch due to escaping. I tried removing the double quotes but
it didn't work out. Reverting in the meantime to unblock people until I figure
out a permanent way.
BUG=313552,241769
TBR=iannucci
Review URL: https://codereview.chromium.org/50293009
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@232112 0039d316-1c4b-4281-b951-d872f2087c98
Fix the git-* wrapper scripts, PRESUBMIT.py and .gitignore.
The previous python wrapping scripts assumed python_bin\python.exe. This CL
modifies the wrapping scripts to use python.bat. This requires some quoting
magic and explicitly defer to cmd.exe.
This may break some cases where double quotes are used as arguments. We can't do
miracles on Windows.
R=iannucci@chromium.org
BUG=
Review URL: https://codereview.chromium.org/50563008
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@231888 0039d316-1c4b-4281-b951-d872f2087c98
/usr/local/google/home/gspencer/depot/depot_tools/git-cl: line 22:
/usr/local/google/home/gspencer/depot/depot_tools/git-cl/git_cl.py: Not a directory
/usr/local/google/home/gspencer/depot/depot_tools/git-cl: line 22: exec:
/usr/local/google/home/gspencer/depot/depot_tools/git-cl/git_cl.py: cannot execute: Not a directory
TBR=szager@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/11366117
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@166274 0039d316-1c4b-4281-b951-d872f2087c98
The major use case was for ChromiumOS devs who were using repo. It's not a
frequent use case anymore. Having git-cl sync on each invocation is costly.
TBR=nsylvain@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/9389030
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121834 0039d316-1c4b-4281-b951-d872f2087c98
Since we clobber the .pyc, it's not useful to generate them in the first place.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8060026
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@103066 0039d316-1c4b-4281-b951-d872f2087c98
This change makes it possible to run 'git cl' from
a Command Prompt using only the auto-installed git
from depot_tools. It is needed because in MSysGit,
'git cl' invokes 'git' which calls 'git-cl'. While
'git-cl' is pulled from depot_tools (since it's in
PATH), depot_tools/python_bin is not in PATH, and
so we execute git_cl.py through our auto-installed
python.exe directly.
update_depot_tools is fixed so that if we find
the auto-installed svn and git in depot_tools, we
execute those directly, otherwise falling back to
calling them based on PATH.
In both git-cl and update_depot_tools, we only enable
this new behavior if uname in PATH reports a 'MINGW'
environment. This should not trigger on any other
environment where uname exists, including Cygwin which
should report 'CYGWIN'.
Review URL: http://codereview.chromium.org/7020035
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@87510 0039d316-1c4b-4281-b951-d872f2087c98
Also, modify git-cl to also update depot_tools. Otherwise, the git-cl
script never gets updated for folks that only use git-cl but
not gclient. This fixes a bug ChromiumOS developers are currently seeing
where there git-cl checkout is still pointing to src.chromium.org
and not git.chromium.org.
BUG=none
TEST=Verified that git-cl help and gclient help work.
Review URL: http://codereview.chromium.org/3817011
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@62948 0039d316-1c4b-4281-b951-d872f2087c98
This is nicer than an error message.
TEST=manually tested the url was overwritten
BUG=none
Review URL: http://codereview.chromium.org/3796010
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@62923 0039d316-1c4b-4281-b951-d872f2087c98
python does not seem to be able to import for a dir with dashes in it.
BUG=none
TEST=Ran git-cl help and verified it worked and new dir was created.
Review URL: http://codereview.chromium.org/3530012
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@61694 0039d316-1c4b-4281-b951-d872f2087c98
Rather than updating git-cl whenever gclient is invoked, update it
whenever git-cl is invoked.
In the chromium-os workflow, folks often run git-cl but rarely run gclient.
This results in folks running an older git-cl which may not
have the latest features/fixes.
TEST=
Tested that git-cl is updated when it is stale, git-cl is cloned when it doesn't exist and is not updated when DEPOT_TOOLS_UPDATE=0
Review URL: http://codereview.chromium.org/2962013
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@52236 0039d316-1c4b-4281-b951-d872f2087c98
I broke this in my last change.
TBR=msb
Review URL: http://codereview.chromium.org/627004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@39277 0039d316-1c4b-4281-b951-d872f2087c98
It would previously delete and recreate git-cl-repo if it
saw that the remote was different than expected. This looks
like it was added for the transition from the old SVN repo
to the new git one, but it also has the effect of losing
any local changes that have been made in the repo. :-(
Everyone should be updated by now, so print a helpful error
and exit instead.
Review URL: http://codereview.chromium.org/609002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@39099 0039d316-1c4b-4281-b951-d872f2087c98
Otherwise, all the parameters are coagulated into a single one.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/119308
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@17968 0039d316-1c4b-4281-b951-d872f2087c98
They automatically git clone the original repository and execute the original script. So if they are first in the path, they will be executed. If a user has another git-cl/try in the path prior, these stubs won't be used at all and won't mess with the user's setup.
Also fix a bug with git handling in trychange.py
Review URL: http://codereview.chromium.org/119244
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@17737 0039d316-1c4b-4281-b951-d872f2087c98