77 Commits

Author SHA1 Message Date
Orgad Shaneh
67ad391ee0 TrivialRebase: Aggregate approvals
Change-Id: I5c07e5e9b879dc3fc0ebbe2b2179f68ff5e763d3
2013-04-11 22:01:52 +03:00
Orgad Shaneh
f18e1e0d2f TrivialRebase: Correctly handle empty patch-id
If only one of the patch-ids is empty, it should not be
considered a trivial rebase

Change-Id: Ie5196bc81d4d3bcdd16572ade265f96c086fabed
2013-04-11 13:41:48 +03:00
Orgad Shaneh
eecfa12b27 TrivialRebase: Support alternative ssh executable
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
2013-04-11 07:24:55 +00:00
Orgad Shaneh
5fe0860ca1 TrivialRebase: Add server argument
listenAddress can be bound to any interface, not only localhost

Change-Id: I672ca6b8b762e50ceaa62839786eb8372eab3a8a
2013-04-11 07:23:58 +00:00
Orgad Shaneh
e507cf90e5 TrivialRebase: Make private key argument optional
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
2013-04-11 07:23:13 +00:00
Orgad Shaneh
c9c4272b77 TrivialRebase: Pipe subprocesses directly
Change-Id: Ic45a8752cb2b6f5a1b85835700658a5cd8127369
2013-04-11 07:22:35 +00:00
Orgad Shaneh
0ee021b543 TrivialRebase: Skip unsupported categories
No reason to fail on such cases

Change-Id: I58cf2c119c377a8e525f2dd307d437c56b6dadbd
2013-04-11 07:22:04 +00:00
Orgad Shaneh
a17f23c525 TrivialRebase: Raise exception on error
If previous revision is not found for patchsets greater than 1

Change-Id: Ifb8b16d5be7c984a5a01773320786b56cc3b9e33
2013-04-11 07:21:35 +00:00
Orgad Shaneh
18f50ed920 TrivialRebase: Refactor as a class
And improve input validation

Change-Id: I379b457ac72e13259f73610b199dc8db68e9b369
2013-04-11 05:44:32 +03:00
Orgad Shaneh
a581ad2ad2 TrivialRebase: Fix the fix of pylint error :)
Didn't notice the call to group()

Change-Id: I71a5aa712b3005551182812db9236de93ec1a2b7
2013-04-09 05:48:58 +03:00
Orgad Shaneh
54d646fb7e TrivialRebase: Fix pylint errors
Change-Id: Ief140acdc9975eaecd96781d7d594fb029a94c43
2013-04-08 23:18:19 +03:00
Edwin Kempin
505b427d33 Add theme that displays Diffy on the left side of the top menu
Change-Id: Ic2e125f3d7d19cf5d2b07be6e102c28bc814fe17
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2013-04-04 17:01:34 +02:00
Orgad Shaneh
1a41273e24 TrivialRebase: Use change-url flag for ChangeId
Change-Id: I90d1586e5e7f483a4e6160401cf8c9d3c080405b
2013-02-19 09:18:03 +02:00
Orgad Shaneh
0f6870f39d TrivialRebase: Adapt options to gerrit 2.6
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
2013-02-19 09:18:03 +02:00
David Pursehouse
9e56ab322f Merge "TrivialRebase: Prevent exception for empty commit" 2013-02-19 06:54:06 +00:00
David Pursehouse
4a8613fa25 Merge "TrivialRebase: Use plain python instead of python2.6" 2013-02-19 06:49:23 +00:00
Orgad Shaneh
642acaea63 TrivialRebase: Prevent exception for empty commit
Change-Id: I2c3dc5fb81144bd14feee8dc5f1d2308a11e23d2
2013-01-20 11:46:43 +02:00
David Pursehouse
ea8b627b8d trivial-rebase: Fix pylint errors
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
2013-01-18 16:05:54 +09:00
David Pursehouse
b597b3641a Add pylint configuration for contributed Python scripts
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
2013-01-16 20:03:23 +09:00
Orgad Shaneh
c7cfce387a TrivialRebase: Use plain python instead of python2.6
Windows installation only has python.exe

Change-Id: I779d8e38be333e7580f00158e1b08166934155a4
2013-01-16 08:37:43 +00:00
Olivier Croquette
4b6de14811 Lightweight LDAP server for debugging
Change-Id: I4550d6e2193f97d317cd3e04fe5808cb2d98229a
2012-12-19 22:28:34 -05:00
Gabriel Lorin
c9a8024246 Spotify theme for gerrit
Change-Id: Iffcec8606b428be88b6bc7cb45113ce457d90ba0
2012-11-13 16:48:19 -08:00
Martin Fick
43a4e17fbb Add an exponentially rolling garbage collection script
git-exproll is a git garbage collection script aimed
specifically at reducing exccessive garbage collection and
particularly large packfile churn for Gerrit installations.

Excessive garbage collection on "dormant" repos is wasteful
of both CPU and disk IO.  Large packfile churn can lead to
heavy RAM and FS usage on Gerrit servers when the Gerrit
process continues to hold open the old delete packfiles.
This situation is most detrimental when jgit is configured
with large caching parameters.  Aside from these downsides,
running git gc often can be very beneficial to performance
on servers.  This script attempts to implement a git gc
policy which avoids the downsides mentioned above so that
git gc can be comfortably run very regularly.

git-exproll.sh uses keep files to manage which files will
get repacked.  It also uses timestamps on the repos to
detect dormant repos to avoid repacking them at all.  The
primary packfile objective is to keep around a series of
packfiles with sizes spaced out exponentially from each
other, and to roll smaller packfiles into larger ones once
the smaller ones have grown.  This strategy attempts to
balance disk space usage with avoiding rewriting large
packfiles most of the time.

The exponential packing objective above does not save a
large amount of time or CPU, but it does prevent the
packfile churn.  Depending on repo usage, however the
dormant repo detection and avoidance can result in a very
large time savings.

Change-Id: I5e8c3cc02f6ca382d34f62af2cf12a9cb8ffd21e
2012-06-14 18:24:17 -06:00
JT Olds
b7b202049d updating contrib trivial_rebase.py for 2.2.2.1
only required a small sql change.

Change-Id: I4f5b76041fc0494811dbf3eb459401ea8b1f17f3
2012-02-24 18:12:12 +00:00
Brad Larson
c575f030fe Add an example hook script for checking valid commits
This script can give negative scores to commits with improperly formatted
commit messages.  This will help save reviewer's time and get developers in
the habbit of writing proper commit messages.
2010-06-18 16:15:22 -05:00
Nasser Grainawi
9770323472 Fix all the occurrences of port
Change-Id: I122fd31162ae45a7d86b0a21f64212fc645e4f7d
2010-04-14 15:50:10 -06:00
Nasser Grainawi
592c8f5c8f Add the trivial rebase auto-re-approve hook
Also create a contrib area for further contributions.

Change-Id: Idf37ae6ac89193649653f030ca19d88626cfc454
2010-04-14 15:43:16 -06:00