Commit Graph

32 Commits (d0c226a0d3e16af1a5e40dc127373413d0252328)

Author SHA1 Message Date
jdoerrie 6428784118 Display Short URLs in Issues
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>
8 years ago
Quinten Yearsley b2cc4a94da depot_tools: Replace pylint error numbers with symbolic names.
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>
8 years ago
sheyang@chromium.org 8ea011cf6e my_activity fetches issues from monorail. Also deleted some projects which are not hosted on monorail.
Blocked on deployment of https://chromereviews.googleplex.com/365267013/

BUG=monorail:762

Review URL: https://codereview.chromium.org/1754433002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299032 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
deymo@chromium.org 56dc57a35e my_activity.py: Include AOSP gerrit instance.
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
10 years ago
kjellander@chromium.org 469720ff0a Revert "my_activity.py: Add WebRTC code review and Google code site."
This reverts https://codereview.chromium.org/1008143002
since WebRTC has now moved over to Chromium's Rietveld instance.

BUG=webrtc:3884

Review URL: https://codereview.chromium.org/1188523002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296585 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
seanmccullough@chromium.org 3e4a581a07 my_activity.py: update to use oauth for projecthosting
BUG=491889

Review URL: https://codereview.chromium.org/1176243002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295626 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
wychen@chromium.org 85cab635b1 Show date format in help message in my_activity.py
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
10 years ago
stevefung@chromium.org 832d51eed5 my_activity.py: Fix to work with non-ascii characters
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
10 years ago
wychen@chromium.org 8ba1ddb3d6 In my_activity.py, multiple --last_week for more weeks
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
10 years ago
vadimsh@chromium.org cf6a5d2026 Extract authentication options handling into a separate function.
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
10 years ago
kjellander@chromium.org 363c10c51b my_activity.py: Add WebRTC code review and Google code site.
BUG=webrtc:3884
TESTED=my_activity.py --auth
R=jochen@chromium.org

Review URL: https://codereview.chromium.org/1008143002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294449 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sbc@chromium.org 013731e832 Handle KeyboardInterrupt consistently in python scripts
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
10 years ago
deymo@chromium.org 69bf3adc8e my_activity.py: Add brillo bug tracker.
BUG=brillo:90
TEST=./my_activity.py shows brillo bugs.

Review URL: https://codereview.chromium.org/891543002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293912 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
jorgelo@chromium.org d3cf588b13 Remove old Gerrit instances.
BUG=None
TEST=my_activity.py still works.

Review URL: https://codereview.chromium.org/714373002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292935 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
jsbell@chromium.org 74bfde0f38 Add --last_week/-W option to my_activity.py
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
11 years ago
deymo@chromium.org 29eb6e62ce my_activity.py: Parse rietveld dates without milliseconds.
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
11 years ago
jsbell@chromium.org 9d2165cd01 Remove WebKit bugzilla/git support from my_activity.py
Tens of crickets suddenly cried out, and were suddenly silenced.

R=cjhopman@chromium.org, cmp@chromium.org, enne@chromium.org, cjhopman, cmp, enne, szager

Review URL: https://codereview.chromium.org/137373004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@246193 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
jsbell@chromium.org c92f582ed2 Add more formatting options for my_activity.py
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
11 years ago
deymo@chromium.org 8aee486f63 my_activity: Skip Rietveld cookie check if not found.
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
11 years ago
deymo@chromium.org f8be27699b my_activity: Port gerrit to the new gerrit_util API.
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
11 years ago
deymo@chromium.org 6c03920ab3 my_activity.py: Use gerrit new REST API.
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
12 years ago
deymo@chromium.org e52bd5a6ec my_activity: Add support for short URLs on gerrit.
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
12 years ago
enne@chromium.org d69dab94e5 Make my_activity.py robust to log parsing problems
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
12 years ago
cjhopman@chromium.org 53c1e56c39 Add reviewers to optional outputs for changes
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
12 years ago
deymo@chromium.org c840e21e9c my_activity.py: Add a shorturl for cromium-os.
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
12 years ago
nyquist@chromium.org 18bc90d2d2 Add support for specifying my_activity.py list format.
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
12 years ago
enne@chromium.org f01fad375f Make my_activity.py peruse the Skia bugtracker too
BUG=none


Review URL: https://chromiumcodereview.appspot.com/11414163

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@169447 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
scheib@chromium.org b299e7c279 Reword "turning off" to "skipping" WebKit checks.
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
12 years ago
enne@chromium.org cb55d8a74a Add WebKit bugzilla/git search to my_activity.py
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
12 years ago
cjhopman@chromium.org 3365f2d8ad Only try keyring password once for code.google.com
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
13 years ago
cjhopman@chromium.org 426557ad35 Fix week_of, quarter_of, year_of calculation
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
13 years ago
cjhopman@chromium.org 04d119d52d Add script to look up a user's activity
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
13 years ago