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
ui-api-proxy is a reverse http proxy that allows the UI to be served from
a different host than the API. This allows testing new UI features served
from localhost but using live production data.
Change-Id: I1cef74c995ac21f4310c5ced4c042ece59a1a8e8
The script provides tab-completion in the bash shell for the gerrit.sh
script.
It can be invoked on a per-shell basis, or included in the user's bash
profile to be made available on every login.
Change-Id: I7f8afb8885d42c30df909a0520a0c736b8735fb4
* stable-2.7:
Say in gsql documentation that 'Access Database' capability is required
TrivialRebase: Replace category_id with label
TrivialRebase: Avoid re-adding -2 for code-review label
TrivialRebase: Support custom labels
Fix test skipping flag
Release notes for Gerrit 2.6.2
Fix NullPointerException when comparing AccessSections
Conflicts:
ReleaseNotes/index.txt
tools/release.sh
Change-Id: I3babf1752a7c822fc1c3599643308959bb1da7ec
The diffy theme was causing the overlap observed with the top of
ChangeScreen2 sitting on the bottom of the menu. Adjust the position
of Diffy slightly to fix this.
Change-Id: I8129fb30bea9e5066395d764c59ca59d64411576
This script needs a bit more analysis to make sure all pathways
are covered, but this CL fixes an obvious path.
Change-Id: I2a8404b7a6eecd5cedba3daa20f63917a8d18482
The PEP-8 checker tool (pep8.py) [1, 2] is used to check that Python
scripts follow the Style Guide for Python Code [3].
This change adds a configuration file for that tool. The configuration
overrides the defaults for the following settings:
To make it easier to see what's wrong, enable:
- Quote the lines on which violations are found
- Quote the relevant section of the PEP-8 guideline
The maximum line length according to PEP-8 is 80 characters, but for
some reason the checker defaults to 79, therefore:
- Set maximum line length to 80 characters
According to PEP-8, code should be indented at 4 characters, but the
Google Python Style Guide [4] says 2. Code in Gerrit follows the
Google style, so:
- Disable warnings "Indentation is not a multiple of four"
The configuration is invoked with the --config option when running
the check tool:
$ pep8.py --config ./contrib/.pep8rc myfile.py
[1] https://github.com/jcrocholl/pep8
[2] https://pypi.python.org/pypi/pep8
[3] http://www.python.org/dev/peps/pep-0008/
[4] http://google-styleguide.googlecode.com/svn/trunk/pyguide.html
Change-Id: If02dd9e51cf3a6e0c0238e78bcfad1d7081de742
* Mostly involves changing print to be a function, and adding
"from __future__ import print_function" for copatibility.
Change-Id: I3129233726e0116a348753a2e2bb68806a08668c
Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
Tidy up the docstrings to follow PEP-0257 [1], the Python
Docstring Convention.
The following warnings, reported by the pep257 checker [2], are
removed.
- All modules should have docstrings.
- Multiline docstring should end with 1 blank line.
- First line should be in imperative mood ('Do', not 'Does').
- First line should end with a period.
[1] http://www.python.org/dev/peps/pep-0257/
[2] https://github.com/GreenSteam/pep257
Change-Id: Icdda650d77c3b52c6b4dba62467b45ade8229b48
Shrink the Diffy logo in the Diffy theme so that it doesn't consume
more vertical space than the header menu.
This now matches the theme that is used on
gerrit-review.googlesource.com.
Change-Id: I943253a24bf1e4ab8a74c23d68df8ea3fd18d115
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
like plink.
Two arguments are added:
--ssh - ssh executable to be used (default: "ssh")
--ssh-port-flag - port flag for ssh (default: "-p")
Since ssh-port-flag receives a flag it can only be
used with --arg=value notation
plink requires "--ssh plink --ssh-port-flag=-P"
Change-Id: I7f494e099de9a9877a3336fcd4e735a9d9dfd921
The argument was used before peer_keys was introduced.
Sharing the server's private key is insecure.
peer_keys should be used to allow administration from other
hosts.
Argument was not removed to maintain backward compatibility.
Change-Id: I0e9f54154c8c48b496230bb6b07ed3bdfe05d2d4
argparse is now used instead of optparse for parsing command-line
arguments.
This introduces dependency on Python 2.7 (or manual installation of the
argparse module).
Change-Id: I9bf169a15737b3ee21628d52b9ada7c2fc6faab5
W0622: Redefining built-in 'exit'
It is not necessary to explicitly import the `exit` method
from the `sys` module. Remove this import.
W0622: Redefining built-in 'dict'
Rename the variable `dict` to `data` to prevent redefinition
of the built-in.
W0612: Unused variable 'gsql_stderr'
W0612: Unused variable 'args'
Prefix unused variables with `_`.
Change-Id: I6c4f9a54a3a27eab09c419154f9e2ee6689536de
The contrib directory contains some Python scripts.
Add the pylint configuration file as used in the git-repo
project, so that it can also be used to check the scripts
here.
Change-Id: I115cf5773b2a9abcb5e760ac8a7999cfebbfdae6