Starts a local proxy that rewrites prod server responses, adding new
plugins, serving local files, enabling or disabling assets bundles.
Prerequisite: Docker
Target platform: OS X
Change-Id: I9abd94c816f987bf43e4335aff5be7ad17dd0fde
Including the "-is:wip" term by default causes the script to fail
when run against Gerrit server earlier than 2.15.
Add a new --exclude-wip option to optionally add "-is:wip".
Change-Id: Ia26ce274d9250a076fa9072af2b8260c7a8087f5
- Line too long (>80)
- Pointless continuation (\) characters
- Trailing semi-colon
- 'not foo in bar' -> 'foo not in bar'
Change-Id: I7acb7f166d2f945005bf5578a740b887b1654597
- Use 4 spaces instead of 2 for indentation. This is Python standard
and is also in Google's styleguide for Python:
https://google.github.io/styleguide/pyguide.html#Indentation
- Use 2 newlines between functions/classes
This does introduce a few line-too-long errors to clean up which will
be fixed in the follow-up commit, but wanted to keep this as easy to
review as possible (git diff -w should be minimal)
Change-Id: I463f18d11e72745107350ac0ae5588d1fb626ed6
We often use gitiles links to point to some source code which is
relevant for a discussion or code review. It often requires 10-15
mouse clicks in order to navigate to a path in gitiles and generate a
link. This is cumbersome and may discourage providing links to gitiles.
This script intends to provide a fast way to generate and open gitiles
links. It requires a one time setup of gitiles.url in .git/config file:
[gitiles]
url = https://gerrit.googlesource.com/gerrit
Once gitiles.url is setup we can generate gitiles URLs easily.
Examples
========
* print gitiles URL for the current HEAD and current directory:
$ gitiles
https://gerrit.googlesource.com/gerrit/+/d685ac1193e086b896cfc019ef4504d1b7ce455b/
* print gitiles URL for current HEAD and Documentation directory:
$ gitiles Documentation
* print gitiles URL for branch stable-2.15 and current directory:
$ gitiles -b stable-2.15
* print gitiles URL for current HEAD and a path relative to the current directory:
$ pwd
gerrit-server
$ gitiles ./src/main/resources
The script also supports "open" command which open gitiles URL using
OS's native way of opening URLs:
$ gitiles open
$ gitiles open -b stable-2.15 Documentation
Change-Id: Icd31723711535e886313d3d17afb57caa4a710b1
Log the project name of the change, except when the --project option
was specified exactly once (because in this case all the changes will
be from the same known project).
Change-Id: Ic3426244354e10717c866ae9a00aae631b66cad1
When running in test mode (--test option) the script will only query
for changes owned by the caller, having the 'test-abandon' topic, and
will not use the 'age' term.
With this option, it is possible to do live test of the script against
an own change that is private, without causing disruption to other
users if the script has unexpected behaviour.
Change-Id: Iedfd7547bd6f42436f9ec8d75614856943fc7ccc
This is a fix for the change that was done in Idaaff88e981.
Sending through the data argument causes the abandon message to be
sent as "message" rather than the actual message.
Change-Id: I47108f4e1d3c328d832d09156a160dbf46706941
After a recent PR merged on pygerrit2 [1], sending data as a string
no longer works as expected; it must be sent as a dict.
[1] https://github.com/dpursehouse/pygerrit2/pull/10
Change-Id: Idaaff88e9811bf8ca90ef2719f13022ffd09cfad
Without this option the change owner name is not included in the
results, and is then displayed as "Unknown" in the log output.
Change-Id: I995d1f8f303af968a6e31c68dee143b24150ec08
HTTP Digest authentication was removed in Gerrit 2.14 and now only basic
authentication is supported.
Change the default authentication to basic, but still support digest
for backwards compatibility with previous Gerrit versions.
Change-Id: I7ccf9d2c506ed79f1209f995856c42c4936b4872
Having a standard tool for formatting saves reviewers' valuable time.
google-java-format is Google's standard formatter and is somewhat
inspired by gofmt[1]. This commit formats everything using
google-java-format version 1.2.
The downside of this one-off formatting is breaking blame. This can be
somewhat hacked around with a tool like git-hyper-blame[2], but it's
definitely not optimal until/unless this kind of feature makes its way
to git core.
Not in this change:
* Tool support, e.g. Eclipse. The command must be run manually [3].
* Documentation of best practice, e.g. new 100-column default.
[1] https://talks.golang.org/2015/gofmt-en.slide#3
[2] https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/git-hyper-blame.html
[3] git ls-files | grep java$ | xargs google-java-format -i
Change-Id: Id5f3c6de95ce0b68b41f0a478b5c99a93675aaa3
Signed-off-by: David Pursehouse <dpursehouse@collab.net>
This configuration file is not in sync with the latest version
of pylint, and is not (as far as I am aware) being used by anyone.
Change-Id: Ia397f359f6ccd72244586f960e5b3c7838c68f54
The script generated only users with the same first name. In
addition, only one change was created per user. In order to be able to
test whether users can be found by their first name, different first
names are used now. For each of those users, 1 to 5 changes are
created to reflect a more natural user base, on which statistics
don't yield the same values for all users. As we don't want to
possibly specify valid gmail accounts, we use another suffix for the
email address.
Change-Id: Ieea72bb45a374eebaa2c51ec74789b337f256958
Tested with:
go run contrib/build-consistency.go
Gives (before the current fix on master):
SHA1 of lib gson does not match: buck has
751f548c85fa49f330cecbb1875893f971b33c4e while bazel has
f1bc476cc167b18e66c297df599b2377131a8947
SHA1 of lib jsr305 does not match: buck has
f7be08ec23c21485b9b5a1cf1654c2ec8c58168d while bazel has
516c03b21d50a644d538de0f0369c620989cd8f0
SHA1 of lib auto_value does not match: buck has
b764e0fb7e11353fbff493b22fd6e83bf091a179 while bazel has
6873fed014fe1de1051aae2af68ba266d2934471
SHA1 of lib junit does not match: buck has
dc7edb9c3060655c7fb93ab9b9349e815bab266f while bazel has
4e031bb61df09069aeb2bffb4019e7a5034a4ee0
SHA1 of lib joda_time does not match: buck has
1c295b462f16702ebe720bbb08f62e1ba80da41b while bazel has
9f2785d7184b97d005a44241ccaf980f43b9ccdb
SHA1 of lib joda_convert does not match: buck has
675642ac208e0b741bc9118dcbcae44c271b992a while bazel has
35ec554f0cd00c956cc69051514d9488b1374dec
Can't parse lib sha1/name on target
maven_jars(name='lucene_core_and_backward_codecs',
srcs=[':backward_codecs_jar',':lucene_core',],visibility=['PUBLIC'],
SHA1 of lib lucene_core does not match: buck has
a74fd869bb5ad7fe6b4cd29df9543a34aea81164 while bazel has
c52b2088e2c30dfd95fd296ab6fb9cf8de9855ab
SHA1 of lib lucene_analyzers_common does not match: buck has
1e0e8243a4410be20c34683034fafa7bb52e55cc while bazel has
c2aa2c4e00eb9cdeb5ac00dc0495e70c441f681e
SHA1 of lib lucene_misc does not match: buck has
504d855a1a38190622fdf990b2298c067e7d60ca while bazel has
95f433b9d7dd470cc0aa5076e0f233907745674b
SHA1 of lib lucene_queryparser does not match: buck has
0fddc49725b562fd48dff0cff004336ad2a090a4 while bazel has
dccd5279bfa656dec21af444a7a66820eb1cd618
SHA1 of lib ow2_asm does not match: buck has
5ef31c4fe953b1fd00b8a88fa1d6820e8785bb45 while bazel has
dcc2193db20e19e1feca8b1240dbbc4e190824fa
SHA1 of lib ow2_asm_analysis does not match: buck has
6d1bf8989fc7901f868bee3863c44f21aa63d110 while bazel has
c7126aded0e8e13fed5f913559a0dd7b770a10f3
SHA1 of lib ow2_asm_commons does not match: buck has
25d8a575034dd9cfcb375a39b5334f0ba9c8474e while bazel has
a7111830132c7f87d08fe48cb0ca07630f8cb91c
SHA1 of lib ow2_asm_tree does not match: buck has
87b38c12a0ea645791ead9d3e74ae5268d1d6c34 while bazel has
287749b48ba7162fb67c93a026d690b29f410bed
SHA1 of lib ow2_asm_util does not match: buck has
b60e33a6bd0d71831e0c249816d01e6c1dd90a47 while bazel has
1512e5571325854b05fb1efce1db75fcced54389
Change-Id: I536b3eecf61a2cd1e7ce9d1c19335f1c2238b6c5
This is just a first version of a py script that
populates a Gerrit instance with some data for
local monkey testing. I'll add some more sugar to
it when I have more time.
Change-Id: I49ecf1ce4f288c5f07254a445a7168cbf83ea2f2
People who would like to use the Diffy logo in their third-party
application for Gerrit probably would start looking for the original logo
sources in the Gerrit repository instead of the discussion group. So copy
the SVG images from [1] to the repository.
[1] https://groups.google.com/d/msg/repo-discuss/nLCvwG2POpM/ENLsQX3ldugJ
Change-Id: Ia9877d9c0a67a1a8c233d9bc49acd1ea3184f9a8
If the Bouncy Castle Crypto libraries are unsigned, issues result with
the Eclipse build, since they rely on the copy that exists in the
libraries copied by the download_file.py script. As a workaround, use
a genrule in ConvertKey to unsign the JARs manually.
Change-Id: I44d6ad5b05a18258e8bf5400c42f1cbd159e59b2
Since we're a BUCK shop, convert the SSH key converter accordingly.
This requires we mark Bouncy Castle as unsign, even though we
do not include this in our normal Gerrit builds. Also, we had to
add slf4j-nop, since this app doesn't require logging.
Change-Id: I85031192f9172a90512d5f28cf1621c10ad6ebf4
If SSH keys are created without Bouncy Castle, the keys are stored in
a non-standard format. These can be read back in and converted back to
standard OpenSSH format through the use of this tool. This may be used
by anyone trying to support new key types after installing Bouncy
Castle.
Change-Id: I52c00fcd44a55c855b5e3a6ebac1283f860e08b8
Fetches a list of open changes that have not been updated since a
given age (default 6 months), and then abandons them.
Assumes that the user's credentials are in the .netrc file. Supports
either basic or digest authentication.
Example to abandon changes that have not been updated for 3 years:
./abandon_stale --gerrit-url http://review.example.com/ --age 3years
Supports dry-run mode to only list the stale changes but not actually
abandon them.
Requires pygerrit (https://github.com/sonyxperiadev/pygerrit).
Change-Id: Ie0edb54847f9f2ab8204647e17e3893ed0a057ea
Use the canonical syntax to specify the python executable to use.
Avoids a fatal error if /usr/bin/python is a too old version (< 2.7).
Change-Id: I3e8affb52be993d35c0dcf90774d962a59ef5635
Fix some minor issues that were reported by pyflakes and pylint.
- Rename arguments to prevent redefinition of built-in 'dir'
- Rename method call to prevent redefinition of built-in 'help'
- Remove unused imports
- Prefix unused variable with underscore to prevent warning
Change-Id: Ia9e21c0f1a69af43f6e4566be46c31bdda540d2f
This is a sort of simplified version of git-review[1] for users like
myself who don't mind most git command line tools, and therefore don't
feel the need to switch to a full git-review workflow, but still don't
like the HEAD:refs/for/master%r=user@domain.com syntax for specifying
reviewers during a push.
Reviewer aliases can be specified in a git config file:
[reviewer]
sop = sop@google.com
$ git push-reviewer --dry-run sop
git push origin HEAD:refs/for/master%r=sop@google.com
[1] http://www.mediawiki.org/wiki/Gerrit/git-review
Change-Id: Ib0c8d609ed9eab17b71ddb13da417a9bfd013611
This script is useful if an existing history should be pushed into a
Gerrit project but the push fails because the server has a max object
size limit configured and the existing history contains objects that
are too large. The script helps to identify the large objects so that
they can be removed from the history by using the 'git filter-branch'
command, or so that the limit can be increased.
Change-Id: I99d21d76ac204bf9b53fd589c0ffcbeee2e02422