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
This will replace the CQ one and allow it to stay in sync with Rietveld.
For now I've only covered methods that CQ seems to touch.
BUG=291335
Review URL: https://chromiumcodereview.appspot.com/24095007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@224455 0039d316-1c4b-4281-b951-d872f2087c98
This solves a problem with "os.rename" sometimes failing with an
exception after cloning a dependency to a temporary directory. It's
possible the dying git processes still hold a handle to the directory.
Since gclient delete the temporary directory regardless of the success
of the process, it results in a lot of GB downloaded for nothing.
SafeRename solves this by retrying a few times if the renaming fails,
sleeping one second every time to get other processes the time to
release their lock on the directory. It gives up retrying after 15 times.
BUG=
R=maruel@chromium.org
Review URL: https://chromiumcodereview.appspot.com/23875041
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@224372 0039d316-1c4b-4281-b951-d872f2087c98
We appear to be getting 403's when encountering errors other than mismatched
credentials. The error message was originally hidden to avoid clutter, but it
has become obvious that there are other transient errors hidden behind a 403.
This change prints the original gsutil error message regardless of whether or not
we enconter a 403 or 404.
BUG=
Review URL: https://chromiumcodereview.appspot.com/23484061
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@224195 0039d316-1c4b-4281-b951-d872f2087c98
Previously we would suggest owners for the whole CL, rather than just
the files currently missing owner approval.
R=maruel@chromium.org
BUG=130978
Review URL: https://chromiumcodereview.appspot.com/23591064
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@224183 0039d316-1c4b-4281-b951-d872f2087c98
This patch makes my_activity.py use the new REST API to access the
list of gerrit changes. The client doesn't authenticate with the
server, so only the public changes are shown.
BUG=chromium:281695
TEST=Ran my_activity.py, shows changes&reviews and links work.
Review URL: https://chromiumcodereview.appspot.com/24047003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@222767 0039d316-1c4b-4281-b951-d872f2087c98
These will come in handy when testing code that interacts with
multiple gerrit servers (like chromite).
BUG=
R=vadimsh@chromium.org
Review URL: https://codereview.chromium.org/23620021
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@221051 0039d316-1c4b-4281-b951-d872f2087c98
Added support for the internal and external gerrit short URLs.
BUG=None
TEST=Ran my_activity.py manualy. URLs work.
Review URL: https://chromiumcodereview.appspot.com/23477012
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@220340 0039d316-1c4b-4281-b951-d872f2087c98
This has been determined to work in a better,
more predictable and robust way.
BUG=none
R=szager@google.com
Review URL: https://codereview.chromium.org/22852017
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@219121 0039d316-1c4b-4281-b951-d872f2087c98
Since we already checked out all files that were touched in the revision
to revert, it should just work[tm].
BUG=64643
R=agable@chromium.org, maruel@chromium.org, phajdan.jr@chromium.org
TEST=tested manually that svn merge -r (without -N) reverts directory deletes
Review URL: https://codereview.chromium.org/22814005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@219094 0039d316-1c4b-4281-b951-d872f2087c98
This makes it easier to type without using the shift-key, so an user can type
'git cl set-commit' and it'll find CMDset_commit.
R=xusydoc@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/22918019
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@219054 0039d316-1c4b-4281-b951-d872f2087c98
Update subcommand to support examples, always disable format_description and
format_epilog and add colors when enabled.
R=iannucci@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/22824018
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@218180 0039d316-1c4b-4281-b951-d872f2087c98
Use the code in git_cl.py, since it was the more evolved. Add documentation
and clean up the structure along the way.
This makes it possible to easily reuse the generic subcommand handling code.
As a first step, only git_cl.py is using it. Eventually, gclient and gcl could
be switch over.
R=iannucci@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/23250002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@218072 0039d316-1c4b-4281-b951-d872f2087c98
Having "Description: u'Foo\nBUG=1234\nR=bar@chromium.org\nReview Url: baz'"
is not actually that useful in my experience. I'd rather be able to easily
read the final CL description that is being committed.
Review URL: https://chromiumcodereview.appspot.com/23185006
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@217834 0039d316-1c4b-4281-b951-d872f2087c98
Currently the output is:
Found line ending with white spaces in:
cc/trees/layer_tree_host_impl_unittest.cc, line 379
This format is extremely annoying because you must combine the
file and line number together by hand. A more standard format
for expressing a position in a file is filename:lineno. This
changes the format to match:
Found line ending with white spaces in:
cc/trees/layer_tree_host_impl_unittest.cc:379
R=maruel@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/22837004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@217405 0039d316-1c4b-4281-b951-d872f2087c98
This is necesary to force an existing repo working directory to check
out a new version of the repo tool which has been signed with a new
key.
R=cmp@chromium.org
Review URL: https://codereview.chromium.org/22909004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@217347 0039d316-1c4b-4281-b951-d872f2087c98
Adds support for passing target_os_only to the chromium recipe, and adds
"fetch ios" as an alias for passing both target_os=['ios'] and
target_os_only=True as described in the iOS build instructions page.
BUG=None
R=agable@chromium.org, cmp@chromium.org
Review URL: https://codereview.chromium.org/21428002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@215891 0039d316-1c4b-4281-b951-d872f2087c98
We don't want to permit the execution of an arbitrary binary.
TBR=ilevy@chromium.org
BUG=
Review URL: https://codereview.chromium.org/21012004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@214193 0039d316-1c4b-4281-b951-d872f2087c98
which is particularly helpful when one is using `gclient sync' on a platform
that does not have /bin/bash (ie. it's installed in another location or not
present at all), since the hooks are automatically added to the git
checkouts.
While here, just `exec' the scripts directly instead of invoking another
shell by hand and remove the redundant `exit 0' lines.
R=cmp@chromium.org,dpranke@chromium.org,szager@chromium.org
Review URL: https://chromiumcodereview.appspot.com/19278004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@214181 0039d316-1c4b-4281-b951-d872f2087c98
> Use plain sh instead of bash in the git template hooks.
>
> The scripts are simple enough and should work fine under any POSIX shell,
> which is particularly helpful when one is using `gclient sync' on a platform
> that does not have /bin/bash (ie. it's installed in another location or not
> present at all), since the hooks are automatically added to the git
> checkouts.
>
> While here, just `exec' the scripts directly instead of invoking another
> shell by hand and remove the redundant `exit 0' lines.
>
> R=cmp@chromium.org,dpranke@chromium.org,szager@chromium.org
TBR=raphael.kubo.da.costa@intel.com
Review URL: https://codereview.chromium.org/21066002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@214178 0039d316-1c4b-4281-b951-d872f2087c98
The scripts are simple enough and should work fine under any POSIX shell,
which is particularly helpful when one is using `gclient sync' on a platform
that does not have /bin/bash (ie. it's installed in another location or not
present at all), since the hooks are automatically added to the git
checkouts.
While here, just `exec' the scripts directly instead of invoking another
shell by hand and remove the redundant `exit 0' lines.
R=cmp@chromium.org,dpranke@chromium.org,szager@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@214177 0039d316-1c4b-4281-b951-d872f2087c98
Latest dev appengine server defaults admin port to 8000
which isn't always available and can cause spurious
failures.
R=maruel@chromium.org
Review URL: https://chromiumcodereview.appspot.com/20904002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@214050 0039d316-1c4b-4281-b951-d872f2087c98
Add an option to apply_issue to fail if anonymous access
triggers a login prompt.
- cherry-pick upload.py rietveld cl 37c73ece82d0 which
allows clients to request no authentication.
BUG=240634
Review URL: https://chromiumcodereview.appspot.com/20634003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@214023 0039d316-1c4b-4281-b951-d872f2087c98