commit | 7a7fa9cc1cb3fdf6e1e1a603dc06fc06206f0265 | [log] [tgz] |
---|---|---|
author | Dave Borowitz <dborowitz@google.com> | Mon Jan 26 13:51:30 2015 -0800 |
committer | Dave Borowitz <dborowitz@google.com> | Thu Oct 08 09:34:01 2015 -0400 |
tree | f138098eb539763849c5de7066d2005675bc1d41 | |
parent | 7b9f5910fbb60a3b52d4fdc648ca934d19b9b4ea [diff] |
Add a new interface to batch many update operations together Complex workflows like MergeOp combine many database operations and ref updates spanning potentially many changes into a single logical operation. MergeOp and ReceiveCommits are the most complex of these obviously, but this pattern is very common. Most batch operations share the following general outline: - Flush all Git data, if applicable. - Write any new refs referring to that data. - Write all database data, including references to new patch set SHA-1s. - Reindex any changes that were modified. - Perform other post-update operations, such as sending email. Moreover, they share the property that *all* Git data should be flushed first, before *any* database data is written, and both of these steps should complete before doing any post-update operations. Encapsulate this batching into a new class, BatchUpdate. This (currently) operates on a single repository and intelligently batches ref updates and database updates together into transactions. Notedb and other ref operations are not currently grouped together into a batch, though this should be possible without too much change to the existing interface. As an example operation, convert PatchSetInserter to use BatchUpdate. This is a good example because it has a fair amount of complexity at each step, including: saving out results read within the change transaction; optionally modifying multiple changes; optionally applying several post-update steps. However, the fact that we have to support both internally- externally-managed BatchUpdates from this class means that the creation and execution of the BatchUpdate is a little more complicated than it otherwise would be. Change-Id: I0771f5e87fcf89b83de6be027fdb71bcbddf2aa8
Gerrit is a code review and project management tool for Git based projects.
Gerrit makes reviews easier by showing changes in a side-by-side display, and allowing inline comments to be added by any reviewer.
Gerrit simplifies Git based project maintainership by permitting any authorized user to submit changes to the master Git repository, rather than requiring all approved changes to be merged in by hand by the project maintainer.
For information about how to install and use Gerrit, refer to the documentation.
Our canonical Git repository is located on googlesource.com. There is a mirror of the repository on Github.
Please report bugs on the issue tracker.
Gerrit is the work of hundreds of contributors. We appreciate your help!
Please read the contribution guidelines.
Note that we do not accept Pull Requests via the Github mirror.
The IRC channel on freenode is #gerrit. An archive is available at: echelog.com.
The Developer Mailing list is repo-discuss on Google Groups.
Gerrit is provided under the Apache License 2.0.
Install Buck and run the following:
git clone --recursive https://gerrit.googlesource.com/gerrit cd gerrit && buck build all
The instruction how to configure GerritForge/BinTray repositories is here
On Debian/Ubuntu run:
apt-get update & apt-get install gerrit=<version>-<release>
NOTE: release is a counter that starts with 1 and indicates the number of packages that have been released with the same version of the software.
On CentOS/RedHat run:
yum clean all && yum install gerrit-<version>[-<release>]
NOTE: release is optional. Last released package of the version is installed if the release number is omitted.