87 Commits

Author SHA1 Message Date
David Pursehouse
fc92706aec Update cookbook plugin revision
- Update GWT to 2.6.1 to match version used in core Gerrit

Change-Id: Idcefc11b9228d2c26fcff31261f9f8f1397ade02
2014-05-29 00:51:44 +00:00
David Pursehouse
7b0f0ccb42 Update plugins to latest revisions
This adds the following changes:

replication:
  - Clean not used SchemaFactory<ReviewDb> parameter

commit-message-length-validator:
  - Allow threshold of too long lines to be configured

Change-Id: If4da3e54df1a13635bf8d3244a36e78ec9dc2297
2014-05-13 15:34:05 +09:00
Shawn Pearce
3772abdc3c Update replication plugin to fix test build failure
Change-Id: I7285892d539932e81feeabb4000fb88737842f96
2014-05-05 15:33:05 -07:00
Edwin Kempin
a1e08c9e04 Update cookbook-plugin
Change-Id: I0430ac8886917b6da182cf165e4ebd9c79024248
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-04-29 14:23:44 +02:00
Shawn Pearce
5c4d3ed332 Merge branch 'stable-2.9'
* stable-2.9:
  Add support for JCE (Java Cryptography Extension) ciphers
  Buck: Respect gerrit-gwtui-common dependency for GWT plugins
  More improvements in the change info block UI
  Add a section about the submit type to the project owner guide
  Fix: Wrong exception mapping in ReceiveCommmits
  Fix REST example for removing included groups from a group
  rest-api-groups.txt: Correct input examples to use [] for lists
  Document project options
  Allow service users to access REST API if auth.gitBasicAuth = true
  Improve documentation about project creation
  Make singleusergroup a core plugin
  Rename 'Change Submit Action' in documentation to 'Submit Type'
  ProjectInfoScreen: Display submit type and content merge next to each other
  Add guide for project owners
  Improve description of the auth.gitBasicAuth parameter

Conflicts:
	Documentation/config-gerrit.txt
	Documentation/rest-api-groups.txt
	gerrit-gwtui/src/main/java/com/google/gerrit/client/GerritResources.java
	gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/ProjectInfoScreen.java

Change-Id: I269f8f1395c352d8d90ba4f770a19296a50967de
2014-04-21 13:57:18 -07:00
David Pursehouse
5788a5143d Make singleusergroup a core plugin
This plugin might be useful for a lot of users.  Make it a core plugin
so it gets included in the distributed war file and offered to the user
during installation.

Change-Id: Ic69e01018d11b1989b36150584b104a98d48ea99
2014-04-17 22:19:07 +09:00
Dave Borowitz
8e36bbdcd7 Copy labels dynamically in ApprovalsUtil.byPatchSet
The intent is to use this method from ChangeJson to dynamically copy
labels every time the change detail is loaded, thus not relying on
one-time copying of labels in the notedb read path.

To do so requires a bit of refactoring, since the ChangeControl now
needs to be passed into this method.

Change-Id: I8bc25d32a91218e074517dcacf4bf3a77d4ae957
2014-04-14 12:12:54 -07:00
David Pursehouse
23b3b6d59f Update cookbook plugin to latest revision
Change-Id: I47f8cc99f5caec2b00389fc991e58babb78af2ae
2014-04-10 18:47:49 +09:00
David Pursehouse
676c52c19b Update cookbook plugin to latest revision
- Correct grammar of greeting configuration options

Change-Id: Iee919ad038c34a50505062e9629a7d45365d6973
2014-04-08 17:16:14 +09:00
Edwin Kempin
2212801e98 Update cookbook plugin
Change-Id: I313b57b97b4c8573b79a106d446476fb8e9098aa
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-03-25 23:50:29 +01:00
David Pursehouse
499aa1031a Update cookbook plugin to latest revision
- Update GWT to 2.6.0
- Add weblink example

Change-Id: I9fe7f39dfc3dabc6f3e8382b5cf81b984267af96
2014-03-24 18:05:23 -07:00
David Pursehouse
11d0354f83 Update cookbook plugin to latest revision
- Add build instructions
- Add implementation title and URL

Change-Id: I2f4bc04510422b3536d4efc218c53183e20fe0c7
2014-03-14 17:31:22 +09:00
David Pursehouse
5e5e0dd0d4 Update cookbook plugin
- Remove duplicated plugin name

Change-Id: I5d706905fe9b7983abf9c64441467aae351724ef
2014-03-07 19:07:34 +09:00
David Pursehouse
5cc0690f7d Update replication plugin
Changes merged in from stable-2.8:

- Fix JAR manifest claiming it is Commons IO project

Change-Id: Id3a67871d3c9c578a01fff57ac9a2789d426ddf5
2014-03-04 10:58:31 +09:00
David Pursehouse
b2a3e990f8 Upate cookbook plugin to latest revision
- Add example for ARRAY ProjectConfigEntry

Change-Id: I48095a80a7c15314d0452e7e7595f474c5a77dda
2014-02-25 17:49:00 +09:00
David Pursehouse
f4dc7d41f4 Update the cookbook plugin to the latest revision
- Configure plugin specific list parameters as ProjectConfigEntries
- Changed merged from stable-2.8

Change-Id: Ifbf1222ecbc64a988d7e61bfd891b28c2488eac6
2014-02-24 19:04:14 +09:00
Dave Borowitz
e0dc089fb8 LabelNormalizer: record what happens to each approval
Unchanged, updated, and deleted approvals may need to be handled
separately by the underlying storage layer, e.g. in Submit. Record
this information in the result of LabelNormalizer.normalize().

For callers that don't care whether approvals were updated or not,
provide a convenience method to concatenate them.

Change-Id: Ifea7db3f7333d3ddb5e4d647a1d7e8eeb8cbff11
2014-02-19 14:52:04 -08:00
David Pursehouse
39f88c65b9 Update the revision of the replication plugin
To get the following changes:

- Rename WrappedLogger to ReplicationStateLogger
- Retry replications failed due to "failed to lock" errors
- Do not retry replications with UnknownHostKey

Change-Id: I726dc5d8ca99bc41cbb08ab3e87469544b0623bb
2014-02-19 16:39:52 +09:00
David Pursehouse
f81d3d127b Update replication plugin to latest revision
To get the following fixes and updates:

- Change default push refSpec to 'refs/*:refs/*' (non-forced push)
- Allow default force update to be configurable
- Correct misspelled method name

Change-Id: Ic734a7290a303562e42b11a0b64697a0fcbc1d71
2014-01-30 10:37:03 +09:00
David Pursehouse
d921e85c1f Update plugins to latest revisions
Update the plugins to the latest revisions to get the
following changes:

replication:
- Minor improvements in the config documentation
- Replication settings auto-reload and restart

singleusergroup
- Remove pom.xml

Change-Id: Ie75091d9ced8962a30797a7ad8160454c8a3ab7c
2014-01-17 18:05:32 +09:00
Dave Borowitz
d064abea4f Start migration to notedb implementation of PatchSetApprovals
Encapsulate the current state of the migration in a NotesMigration
class. For each database table (or broader group of functionality)
that we migrate to notedb, configure a boolean indicating whether that
data should be read from notes, defaulting to false.

Unlike reads, NotesMigration contains just a single boolean
indicating that data should be written. We don't attempt to write
just some types of data; as the migration continues we will just
rewrite history.

Since most existing reads of the PatchSetApprovals table have been
migrated to ApprovalsUtil, most implementation changes happen there.
There are a few other implementations scattered around, and some that
will require a bit more work (e.g. stamping normalized approvals at
submit time).

Change-Id: I5676267d4de607c385e8c9917a89333863b9c9e7
2014-01-08 11:58:24 -08:00
Edwin Kempin
02e63816a3 Update cookbook-plugin
* Use extension screens in cookbook example

Change-Id: Iaa0db0d2eea6c1d84245bad7cd62df55ddd3ff3e
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-01-08 08:48:54 +01:00
Dave Borowitz
b5b6f615ec Move more functionality from elsewhere into ApprovalsUtil
The commonality of these methods is they will have a different
implementation when approvals are read from an eventual notedb, so
it makes sense to keep them located together.

Change-Id: I5de63a4210f29863274111964480fb1f5720ca60
2013-12-19 10:30:56 -08:00
David Pursehouse
7fcd202680 Buck: Fix infinite loop when trying to build non-existing core plugins
Running `buck build plugins:core` before initialising the submodules
causes buck to throw FileNotFoundException and then go into an infinite
loop.

The genrule in the plugins' BUCK configuration has a check in the `cmd`
to make sure the required core plugins (`NEED`) exist, but it looks
like this gets evaluated after the `srcs` which is using `CORE`.

Change `srcs` to use `HAVE`.  Now buck will exit with an error when the
core plugins do not exist.

Bug: issue 2343
Change-Id: I1bc2f67bcf6aacfe553c00e54fff18f959ac4b79
2013-12-16 16:26:26 +09:00
Dave Borowitz
31b599b40f Move "refs/..." constants to a RefNames class
This class lives in gerrit-reviewdb because "refs/changes/" needs to be
referenced from PatchSet in reviewdb/client (and other UI classes).

Rename constants to all use REFS_* instead of being inconsistent.

Change-Id: I76e6ee7e63a4549b51a43698fb50b54a19dabfc6
2013-12-11 12:41:07 -08:00
David Pursehouse
a8c54b47f5 Update download-commands plugin to latest revision
To get fixes merged from stable-2.8:

* Always show repo download command if repo download scheme is enabled

Change-Id: I8de4c0c19073fb7b5ea2d9e8e34e0a7e1944ace4
2013-12-11 17:30:50 +09:00
Shawn Pearce
c8e96ad49d Wait for UI plugins to load
If a screen is registered by a plugin this registration needs to be
completed before the dispatcher tries to parse the token.  Wait for
plugin scripts to finish loading and evaluating.  The old method of
injecting a script tag was not waiting correctly, especially for GWT
based plugins.

JavaScript plugins are now required to use Gerrit.install() as this
method updates internal Gerrit state tracking the script.  Not using
install() will eventually cause the UI to report the plugin as failing
to load.

GWT plugins must override onPluginLoad() not onModuleLoad().  All
plugins must recompile with the new glue code, as there is now a
handshake between the GWT plugin and the main Gerrit code.

All plugins must load within 5 seconds, otherwise the page marks them
as failed and reports loading errors.  During loading a glass pane is
used to prevent the user from interacting with a partial initialized
UI.  Plugins may be making critical contributions that need to be
registered before use.

A chunk of the API glue code was moved around to make each JSNI block
smaller, and better isolate purpose.  Plugin is now declared in its
own Java class.

Plugin instances are now tracked in the map $wnd.Gerrit.plugins.
This allows the main code to later figure out if any instance failed
to load. Any loading errors are usually reported on the JavaScript
console as script failures, and may include stack traces.

Change-Id: Id03581437ae1010cf995ef7ba8626ece37dfc2f4
2013-12-10 23:37:13 -08:00
David Pursehouse
044a6c983f Update core plugin revisions to remove Maven support
Gerrit and core plugins are now built with buck.  The Gerrit
build no longer supports Maven; all the pom.xml files have
already been removed.

Remove Maven build support, i.e. the pom.xml files, from all
core plugins except the cookbook plugin which should keep it as
long as we still actually support Maven-based plugins.

Change-Id: Id299ade79ae1f94976c9b18634aa4b458bf1eeff
2013-12-05 00:32:58 +09:00
David Pursehouse
8d80726ec8 Update plugins to latest revisions merged from stable-2.8
No functional changes.  Changes from stable-2.8 are not applicable
on master and are discarded.

Change-Id: I265c19ff9aa806a3e75287ce69311ee6836845aa
2013-12-05 00:29:00 +09:00
Edwin Kempin
66a8411583 Update core plugins
* plugins/commit-message-length-validator:
    575115c Bump Maven driven build to java 7

* plugins/cookbook-plugin:
    97f6e1d Bump Maven driven build to java 7

* plugins/replication:
    efd7d03 Eclipse: Bump java source and target level to 7
    3a04654 Bump Maven driven build to java 7

* plugins/reviewnotes:
    7f5178b Eclipse: Bump java source and target level to 7
    c235d38 Bump Maven driven build to java 7

Change-Id: Id6dd294a24187fda4c65a8330609e91297a7ff90
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2013-11-29 20:38:34 +01:00
Edwin Kempin
82338198bb Update replication plugin
* Fix replication at start-up
* Support replication of HEAD updates
* Splitting replication queue from config.
* Extra info log on replication 'git push' to remote

Change-Id: I57e41ef1b8b0c63e60ee202172c944a0d3f6a409
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2013-11-21 07:26:48 +01:00
Edwin Kempin
9f4296eb95 Update cookbook-plugin
* Cookbook-plugin: Add GWT greetings dialog

Change-Id: I32e705b6a103ab5f50f5bb48b0879a7a167cdc1c
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2013-11-15 10:25:44 +01:00
Hugo Arès
7b1584305c Update replication plugin to latest revision
Change-Id: Ic30f045239d1089c2c97de80d791548e1ea3a4dd
2013-11-14 13:43:48 -05:00
David Pursehouse
fee21ba1d5 Update replication plugin to latest revision
- Add method onRefReplicatedToAllNodes to PushResultProcessing
- Add missing easymock dependency

Change-Id: I44eafd98b22591e1bbf0ba87b2b15e52a15dfb1f
2013-11-11 14:41:45 +09:00
Shawn Pearce
fde6370071 Add singleusergroup plugin
Like the cookbook plugin, keep the singleusergroup plugin in the
primary build to make it easier to detect API version changes,
but do not (yet) include it as a core plugin in release binaries.

Change-Id: I24d2d3c7eb461d573d1666a1af631a3caeee2eac
2013-11-09 07:45:00 +01:00
Jonathan Nieder
935ce8afdc Make DownloadScheme.isAuthSupported an abstract method
It is too easy to forget to override isAuthSupported in download
schemes that support but do not require authentication.  Make it
abstract so anyone adding a new download scheme has to make an
explicit choice about whether it should show up on changes that are
not world-readable.

Change-Id: Ifbc70c0d3b6eea08ceee726317381cabd3892e03
2013-10-31 14:42:01 -07:00
Jonathan Nieder
5d7a8decfe Merge branch 'stable-2.8'
* stable-2.8:
  Update download-commands plugin

Change-Id: I917142d445d6b6db98a64bd089e4c688ff01f750
2013-10-31 13:05:37 -07:00
Jonathan Nieder
783d60eed8 Update download-commands plugin
* "repo download" supports authentication

Change-Id: I71e278f2306deb169a4d4f387cb2b686956f4f69
2013-10-31 13:01:25 -07:00
Edwin Kempin
551bf70b5a Update cookbook-plugin
* Add example of getting canonical web URL injected

Change-Id: I59a964adc91ae3bbc0a64b91499bc6e7977c7241
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2013-10-29 10:43:46 +01:00
David Pursehouse
e55d199aee Merge branch 'stable-2.8'
* stable-2.8:
  Update replication plugin to latest revision
  Allow download schemes to support but not require authentication
  Don't mention label abbreviation in search documentation
  Don't mention Verified as a default label in search documentation
  Minor fixes in dev-plugin documentation
  Document how a plugin can force state update of UiAction

Change-Id: I9ba217e20291271bdb1ec6d579efe37f9efc91ba
2013-10-24 11:06:14 +09:00
David Pursehouse
5e48c19a34 Update replication plugin to latest revision
This updates the replication plugin to the latest revision
on the stable-2.8 branch, and adds the following change:

- Fix invalid syntax in SSH config file example

Change-Id: I79ac7cc93f14d9ca0dc6937f8e8cec6301301da2
2013-10-24 09:48:14 +09:00
David Pursehouse
ead4b18738 Update core plugins to latest revisions
This updates the core plugins to the latest revisions on their
master branch, adding the following changes:

All plugins:
- Update API version to 2.9-SNAPSHOT in pom.xml

Cookbook:
- Add example of getting plugin name injected

Replication:
- Delete the ReplicationType enum and simplify ReplicationState

Change-Id: If3af328a3e9be33e9182db75459b834ad44db83c
2013-10-23 18:31:39 +09:00
Shawn Pearce
a8bfab9d32 Update download-commands plugin
Change-Id: Ib439c2c8b6edc4c5393848ad986173fc55fcb679
2013-10-17 18:40:04 -07:00
Edwin Kempin
3e019c2a65 Update download-commands plugin
* Simplify logic in RepoCommand
* Fix `repo download project nn/p` formatting

Change-Id: Ia319abd27a73b311b158b9f2e2740acf4b767a16
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2013-10-17 19:35:57 +02:00
David Pursehouse
78e868ef89 Merge "Register core plugin that implements the standard download commands" 2013-10-17 02:24:56 +00:00
Edwin Kempin
7bfe1686e4 Register core plugin that implements the standard download commands
Change-Id: I07e7f9f0a7f68f3491d26afbacee4992c87e81c5
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2013-10-16 22:08:17 +02:00
David Pursehouse
df254424f0 Update the replication and reviewnotes plugins
This updates the plugins to versions that are adapted to the
simplified GitReferenceUpdatedListener.Event API.

Change-Id: I0d01639c4738945aafd3920acdfbe26cf23c176b
2013-10-16 10:22:37 +02:00
Edwin Kempin
de480c7fdc Update replication plugin to latest revision
* Add port to replication status and display path for local
  replication

Change-Id: I483b95255b4b7e15581836fba8bc3b4d69206b47
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2013-10-11 16:24:46 +02:00
Sasa Zivkov
2aec8a3d9f Update the reviewnotes plugin to the latest revision
Change-Id: I05a0b0040a63cad0bc0f7e6503aa7bc95c72db3a
2013-10-09 13:09:37 +02:00
David Pursehouse
d9692b8e88 Update the reviewnotes plugin to the latest revision
This adds the following commits:

- Fix note creation when the same commit exists in another Git repository.
- Fix committing the notes from the export command.

Change-Id: I7d679235da70ae0939e83ed11c0b2e8a753d8997
2013-10-08 19:00:02 +09:00