This change adds the functionality to display Short URLs for issues if possible.
BUG=
Change-Id: I250f3609e853663b576b8ff1c7e27e264b179755
Reviewed-on: https://chromium-review.googlesource.com/426318
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
This affects a bunch of files, but only changes comments,
and shouldn't make any difference to behavior.
The purpose is to slightly improve readability of pylint
disable comments.
Change-Id: Ic6cd0f8de792b31d91c6125f6da2616450b30f11
Reviewed-on: https://chromium-review.googlesource.com/420412
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Several Chromium OS projects were moved to AOSP so now the development
is in that gerrit instance. This patch includes it to the list.
BUG=None
TEST=`my_activity.py` shows changes in the AOSP gerrit instance.
Review URL: https://codereview.chromium.org/1332723002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296634 0039d316-1c4b-4281-b951-d872f2087c98
It was not very obvious what kind of date format is expected.
Review URL: https://codereview.chromium.org/1114093004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295448 0039d316-1c4b-4281-b951-d872f2087c98
The default encoding for python 2.7 strings is ascii. Some of
the titles of issues, such as http://crbug.com/477941, contain
non-ascii characters, and cause my_activity.py to throw an
exception. Re-encode the unicode title string to ascii with
the 'replace' option, to replace non-ascii characters with '?'.
R=maruel@chromium.org
BUG=none
TEST=Run `my_activity.py` with #477941 in my issues list; correctly
lists issues without throwing an exception.
Review URL: https://codereview.chromium.org/1151053003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295425 0039d316-1c4b-4281-b951-d872f2087c98
Also, if one --last_week option is given, the date range should be
strictly one week before when without the option.
BUG=
Review URL: https://codereview.chromium.org/1086083007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295052 0039d316-1c4b-4281-b951-d872f2087c98
It is done in preparation for switching to OAuth2 as default (and only)
authentication method. Having all auth options handled by the same code makes it
easier to gradually add OAuth2 support.
As part of this, some options that would no longer work with OAuth2 (and that
are not being used from anywhere now, as far as I can tell) are removed:
* Passing account password for authentication via command line.
* Overriding 'Host' header when making requests to Rietveld (won't work with
SSL anyway).
* --account_type option (seems to be ClientLogin specific).
R=maruel@chromium.org
BUG=356813
Review URL: https://codereview.chromium.org/1075723002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294746 0039d316-1c4b-4281-b951-d872f2087c98
Handle KeyboardInterrupt gracefully rather the printing a
backtrace. Most users of these tools don't expect a
backtrace when then hit Ctrl-C.
Also, fix a few other inconsistencies found in the python
startup code of these different scripts:
- always call main function 'main' (rather than 'Main')
- always return 0 from main function
- if main takes args never include argv[0]
Review URL: https://codereview.chromium.org/955993006
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294250 0039d316-1c4b-4281-b951-d872f2087c98
Some weeks, writing snippets on Monday just doesn't happen. And during
those weeks, doing date arithmetic then correctly formatting a U.S.
date is too hard.
R=szager@chromium.org, deymo@chromium.org
Review URL: https://codereview.chromium.org/230823003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@262723 0039d316-1c4b-4281-b951-d872f2087c98
Sometimes rietveld returns a datetime without the milliseconds part,
presumably when it is 0. This patch fixes the parsing of those cases.
BUG=chromium:323615
TEST=Ran "my_activity.py --week_of 11/18/13 --user jsbell" which returns "2013-11-18 20:42:30" for a bug.
Review URL: https://codereview.chromium.org/204013009
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@258189 0039d316-1c4b-4281-b951-d872f2087c98
Support --output-format-heading for the headings
('Issues:', etc), and a simple --markdown flag that sets
item and heading formats to something markdown friendly.
R=deymo@chromium.org, szager@chromium.org, deymo
Review URL: https://codereview.chromium.org/116873002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@243204 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 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 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
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
If (hypothetically) you pointed your WebKit repo environment variable to
Blink and not WebKit, then the change_re will not find anything in the
log and the script will explode on changes[0] because changes=[].
Fix this by being robust to not being able to parse anything out of the
log in process_git_commits.
R=szager@chromium.org
BUG=none
Review URL: https://chromiumcodereview.appspot.com/16258010
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@205290 0039d316-1c4b-4281-b951-d872f2087c98
This adds a comma-separated list of reviewers to the optional outputs
for changes. This can be added to the output using the custom formatter
option. E.g. --output-format-changes="{url} {title} <{reviewers}>"
Also, for webkit changes, use CommitterList to map reviewer names to
emails so that they are similar format to other changes.
Review URL: https://chromiumcodereview.appspot.com/12446008
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@187351 0039d316-1c4b-4281-b951-d872f2087c98
This fix adds the crosbug.com shorturl scheme for the chromium-os project.
BUG=None
TEST=manual run of ./my_activity.py
Review URL: https://chromiumcodereview.appspot.com/12226135
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@182300 0039d316-1c4b-4281-b951-d872f2087c98
This adds the possibility to specify the format for your activity
through: -f <format>, --output-format=<format>
<format> is specified as in strings.format(...).
It is also possible to specify the output format for specific
activity types.
This enables users to use other formats such as Markdown:
[%(title)s](%(url)s)
This CL also adds support for new variables such as author,
and adds a generic framework for adding more variables.
BUG=166519
Review URL: https://chromiumcodereview.appspot.com/11607007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@174203 0039d316-1c4b-4281-b951-d872f2087c98
Turning off could be interpreted as having a lasting impact instead of just being a notice for the current run.
Review URL: https://chromiumcodereview.appspot.com/11359168
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@167476 0039d316-1c4b-4281-b951-d872f2087c98
This is unfortunately imperfect in a number of ways:
* Needs to get info from git commits, so needs a local WebKit git repo, and an explicit option to find it.
* Bugzilla doesn't return nearly as much information as other bug servers, and individual issues would have to be hit (and parsed) to get it.
* Searching for comments includes any issue ever commented on that was changed over the time period requested, so may have false positives.
* Reviews themselves can't be searched from Bugzilla, so can only be detected as "reviews" once landed and "issues" until then.
BUG=158993
Review URL: https://chromiumcodereview.appspot.com/11365078
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@166100 0039d316-1c4b-4281-b951-d872f2087c98
If the keyring password doesn't work on the first try, it probably won't
work on the second or third. The KeyringCreds object already supports
this, we just were recreating the object at each step.
Also, if after three tries authentication to code.google.com still
fails, then the script should continue and just use un-authenticated
access to code.google.com.
BUG=158388
Review URL: https://chromiumcodereview.appspot.com/11340023
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@165446 0039d316-1c4b-4281-b951-d872f2087c98
These calculations were not dropping the time from the provided date.
And so a week would be Monday 11AM to Monday 11AM when run at 11AM.
BUG=
Review URL: https://chromiumcodereview.appspot.com/11233041
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@163360 0039d316-1c4b-4281-b951-d872f2087c98
Found to be particularly helpful in writing snippets.
This tool looks up all activity for a particular user across many
different services. It looks up changes and reviews across various
Rietveld and Gerrit instances and looks up issues in various google code
projects.
Running with no arguments will look up activity of $USER over the
current week (last week on Monday). I.e. the primary use case is for
looking up your activity for writing snippets.
BUG=
Review URL: https://chromiumcodereview.appspot.com/11140010
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@162561 0039d316-1c4b-4281-b951-d872f2087c98