This will automatically upgrade python to 2.7.5 unless
set DEPOT_TOOLS_PYTHON_275=0
is used.
R=iannucci@chromium.org
BUG=241769
Review URL: https://codereview.chromium.org/53313002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@235140 0039d316-1c4b-4281-b951-d872f2087c98
ChromiumOS only developers don't always have a Chromium checkout and
a Rietveld cookie file (~/.codereview_upload_cookies) with the auth
keys. This patch proceeds with the activity lookup from other
services such as Gerrit and GoB if there's no Rietveld cookie
present, displaying an error message when this happens.
BUG=chromium:316961
TEST=Remove ~/.codereview_upload_cookies and ran my_activity. ChromeOS activity listed.
Review URL: https://codereview.chromium.org/68763004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@234874 0039d316-1c4b-4281-b951-d872f2087c98
This automatically searches the path for a source root (or takes one from the
command line), and then executes the current platform's GN binary inside that
source tree.
This will allow the user to have a "gn" command on their path, and allow our
scripts to run GN without having to bake-in the logic for finding the correct
platform's GN binary.
Review URL: https://codereview.chromium.org/66013002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@233983 0039d316-1c4b-4281-b951-d872f2087c98
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
This patch adds a new function QueryAllChanges to gerrit_util.py
allowing the caller to iterate the list of changes regardless the
maximum limit of changes per request that the server supports (by
default 500 according to gerrit's documentation).
my_activity.py is ported to use this function instead of urllib2 to
manually make the request. This also adds support for authentication
since gerrit_util.py already supports it, and the internal gerrit
instance is now re-enabled.
Finally, two minor bugs are fixed on the hanlding of returned
results: The DETAILED_ACCOUNTS option is passed to gerrit to request
the email addresses of the referenced users and users without an
email address, such as the "Gerrit Code Review" user on the internal
gerrit, are now supported.
BUG=chromium:311649,chromium:281695
TEST=Manual run "my_activity.py -u USER" for some users.
Review URL: https://codereview.chromium.org/50283002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@233166 0039d316-1c4b-4281-b951-d872f2087c98
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
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 fixes license headers.
Interestingly, the pylint workaround at r133705 doesn't seem to be necessary
anymore.
R=stip@chromium.org
BUG=
Review URL: https://codereview.chromium.org/54603003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@232152 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
Adds a command line flag --platform to control which platforms the given download occurs on.
Automatically marks downloads executable on non-Windows if the header x-goog-meta-executable is set. Automatically set this flag on upload when the executable bit is set.
BUG=233100
Review URL: https://codereview.chromium.org/42273002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@231387 0039d316-1c4b-4281-b951-d872f2087c98
This helps prevent timeout when checking out large repositories (like blink)
using the git cache_dir.
R=iannucci@chromium.org, maruel@chromium.org
BUG=295119
Review URL: https://codereview.chromium.org/43273005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@231111 0039d316-1c4b-4281-b951-d872f2087c98
Newer versions of clang-format-diff.py now require a -i flag to
explicitely apply edits, otherwise they just print a diff, which
make "git cl format" a no-op.
This patch fixes the issue by probing the script's help text to
see if the flag is needed. If it is, it is added automatically.
BUG=NONE
R=maruel@chromium.org
Review URL: https://codereview.chromium.org/44263004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@231020 0039d316-1c4b-4281-b951-d872f2087c98
Currently, running "git cl issue 0" in a client prints a confusing error
message if there's no issue assigned. This changes the code so that the issue
number isn't "unset" if it's not currently set.
BUG=
Review URL: https://codereview.chromium.org/32193016
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@230499 0039d316-1c4b-4281-b951-d872f2087c98
sleep() is in time, not sys.
BUG=
R=maruel@chromium.org,szager@chromium.org,cmp@chromium.org
Review URL: https://codereview.chromium.org/34483004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@230108 0039d316-1c4b-4281-b951-d872f2087c98
This prevents jgit from parsing the user's existing ~/.gitconfig,
which can skew test results.
BUG=
Review URL: https://codereview.chromium.org/27752003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@229245 0039d316-1c4b-4281-b951-d872f2087c98
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
gob_util.py is a general-purpose library for communicating with the
gerrit-on-borg service.
testing_support/gerrit_test_case.py is a unittest framework for
testing code that interacts with gerrit.
R=vadimsh@chromium.org, cmp@chromium.org
BUG=
Review URL: https://codereview.chromium.org/26399002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@228965 0039d316-1c4b-4281-b951-d872f2087c98
For example, my id is 'kangil.han', but it fails during parsing.
So this patch fixes it.
Review URL: https://codereview.chromium.org/27484002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@228937 0039d316-1c4b-4281-b951-d872f2087c98
This makes exception catching code which compares the code with
numeric values work as expected. pythonis not PHP and 500 != '500'.
BUG=none
Review URL: https://codereview.chromium.org/27260007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@228788 0039d316-1c4b-4281-b951-d872f2087c98
These are run for a given dependency after it has been synced but before its
DEPS have been synced. This will help to switch Chromium to depend on Skia's
git repository (skia:1638).
Review URL: https://codereview.chromium.org/25322002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@228651 0039d316-1c4b-4281-b951-d872f2087c98
This way, DEPOT_TOOLS_PYTHON_275=1 will properly upgrade an installation
still running 2.6. Otherwise the user had to "del python.bat" to force
the upgrade.
Stop calling python to verify it works, this is slow.
Upgrade url to https.
R=iannucci@chromium.org
BUG=241769
Review URL: https://codereview.chromium.org/26901003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@228179 0039d316-1c4b-4281-b951-d872f2087c98
- Python2.7.5 will be installed only if DEPOT_TOOLS_PYTHON_275=1,
otherwise 2.6 is installed.
- Eventually the default will be changed to install python 2.7.5
for new users.
- Afterward, python 2.7.5 will be always installed when not detected
and 2.6 will be ignored.
README.chromium contains the exact instructions how to recreate
python275_bin.zip that was committed independently.
I tested it on a vanilla Windows XP image and documented how to
install the VC90 CRT redistributable in that specific case in
README.chromium.
R=iannucci@chromium.org
BUG=241769,257696
Review URL: https://codereview.chromium.org/26326002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@227961 0039d316-1c4b-4281-b951-d872f2087c98
scons hasn't been used in a long time.
Also remove support for using make on Mac, it's no longer supported. All bots
that were using make on mac are using ninja these days.
BUG=305702
Review URL: https://codereview.chromium.org/26672003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@227778 0039d316-1c4b-4281-b951-d872f2087c98
The script would previously attempt to run
the x86_32 version of ninja on 32-bit arches
such as mips and arm rather than display the
error message.
This error showed up an ARM builder:
/mnt/data/b/depot_tools/ninja: line 25: /mnt/data/b/depot_tools/ninja-linux32: cannot execute binary file
Review URL: https://codereview.chromium.org/26490004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@227549 0039d316-1c4b-4281-b951-d872f2087c98
Previous code checked the exit status of 'echo' instead of 'read' to
determine if the 'read' command had timed out.
TEST=Create a mirror of depot_tools.git, git clone it, then run
./update_depot_tools, see prompt for changing the URL, wait at
least 60 seconds and verify that you get the timeout message.
R=maruel@chromium.org
BUG=
Review URL: https://codereview.chromium.org/25110004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@227427 0039d316-1c4b-4281-b951-d872f2087c98
The motivation for this CL is:
When a project is turned on to use GitCheckout with try job verifiers, then the CQ crashes because of line 64 in http://src.chromium.org/viewvc/chrome/trunk/tools/commit-queue/pending_manager.py
This is because revision can only be one of (None, int, unicode). This crash only happens when try jobs are used (which is why I did not see it before).
This CL changes the return type to be unicode instead of string.
Review URL: https://chromiumcodereview.appspot.com/25686005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@226743 0039d316-1c4b-4281-b951-d872f2087c98
When depot_tools fail to update right now all you get is
Cannot rebase: You have unstaged changes.
Please commit or stash them.
As that is typically in a call to gclient it's far from obvious what
could not be updated so add a line saying
Failed to update depot_tools.
to that. Linux and Mac already have a similar error message in their
script file.
BUG=
R=szager@chromium.org
Review URL: https://codereview.chromium.org/23619058
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@226002 0039d316-1c4b-4281-b951-d872f2087c98
This prevents private CLs to be automatically CC-ed to public mailing lists
unintentionally.
Review URL: https://chromiumcodereview.appspot.com/24257014
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@225925 0039d316-1c4b-4281-b951-d872f2087c98
The callee needs it to be a string so that it can be made
part of HTTP request. However, in code using Rietveld
it's useful to use non-string types for flags where
Rietveld actually doesn't return strings (say booleans).
One example is the commit flag, which is a boolean.
BUG=291335
Review URL: https://chromiumcodereview.appspot.com/24846002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@225748 0039d316-1c4b-4281-b951-d872f2087c98
I have clang-format-3.3 installed and it appears to default to stripping one leading slash.
BUG=294188
Review URL: https://chromiumcodereview.appspot.com/24217002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@225705 0039d316-1c4b-4281-b951-d872f2087c98
This command shows the differences between local branch
and the last patch uploaded to rietveld. The idea being
that you can see what would be uploaded before you actually
upload.
This can useful when using 'git cl patch' to move changes
between checkouts and working from more than one machine at
once.
Review URL: https://chromiumcodereview.appspot.com/24276008
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@225552 0039d316-1c4b-4281-b951-d872f2087c98
This fixes an error if the branch already exists.
Review URL: https://chromiumcodereview.appspot.com/24360009
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@225278 0039d316-1c4b-4281-b951-d872f2087c98
httplib chokes on concatenating the unicode string "url" and some bytecode in "data".
BUG=169600
Review URL: https://chromiumcodereview.appspot.com/24172008
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@225058 0039d316-1c4b-4281-b951-d872f2087c98
This is in order to support 'features' like got_revision for build systems
unwilling to scrape the human-readable output of gclient in order to extract
basic information :)
R=agable@chromium.org, maruel@chromium.org
BUG=265618
Review URL: https://chromiumcodereview.appspot.com/23753008
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@225046 0039d316-1c4b-4281-b951-d872f2087c98