112 Commits

Author SHA1 Message Date
Saša Živkov
ccba043447 Update reviewnotes plugin to the latest revision.
Change-Id: Ic9a4fb9461d3bfc96c14c1598456eb89aef5531d
2014-10-01 10:50:32 +02:00
Saša Živkov
1c48a7ee1c Revert "Use javax.inject.Inject instead of com.google.inject.Inject"
This reverts commit 5db3bba3e2d85662bacedc5d2f215fff7d8d2805.

I was too fast to submit 5db3bba. Besides forgetting to submit the
referenced changes in some submodules some people reported issues
with the interception of the javax.inject.Inject in some JEE containers.

Change-Id: I931ad329d2e7be6f6ce804b8395489a021c8240b
2014-09-30 10:53:50 +02:00
Dave Borowitz
5db3bba3e2 Use javax.inject.Inject instead of com.google.inject.Inject
The Guice team is discouraging use of its specific annotation where
possible, to increase JSR330 compliance.

Leave optional injection alone for now, which needs to be manually
replaced with OptionalBinder.

Change-Id: I4f53a518ba6f36fd67af12f3540dc44cbad07ff8
2014-09-29 16:36:18 -07:00
David Pursehouse
c07d0d0f04 Update cookbook plugin with example of hashtag validator
Change-Id: Ib4d5e6e3b91946023860101efbac7d96b4dbd390
2014-09-14 16:42:35 +09:00
David Pursehouse
7839a1bc79 Update cookbook plugin
- Implement new mandatory getTarget() method for web links
- Added BranchWeblink to HelloWeblink
- Add example plugin demonstrating MergeValidationListener

Change-Id: Ifb04f7a34fa9f184d84e40639805c01586a74d89
2014-09-13 08:34:15 +02:00
David Pursehouse
f54fc13ac7 Remove its-base submobule
Change-Id: I3306d6f73e3cc966d54927183ce0f819c0a2293f
2014-09-12 14:29:41 +02:00
Edwin Kempin
c4dc7a85dd Update cookbook plugin
* Implement new mandatory getTarget() method for web links

Change-Id: Ieae2990c3fdae8dd73525c6c23bc6b73945ec1ca
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-09-12 10:08:28 +02:00
Edwin Kempin
ceeed6b48a Allow to control target of web links
Plugins can now control the target window in which a web link should
be opened.

This is an incompatible change and plugins implementing web links must
be adapted.

Change-Id: I5aec40ce425251b10fcb912131d547982d27cd55
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-09-12 10:08:22 +02:00
Edwin Kempin
db32b536c9 Update cookbook plugin
* Added BranchWeblink to HelloWeblink

Change-Id: I28d04559ff99d35bc6e52c96071c71a335c7dab6
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-09-11 12:13:10 +02:00
David Pursehouse
a88660952a Update plugin revisions
replication:
- Fix infinite retry loop if createMissingRepositories enabled

cookbook:
- Replace cookbook-plugin with @PLUGIN@ in the docs.

Change-Id: If470d06eab52745e0ae339fc2a94e43b544d0daa
2014-09-10 11:01:51 +02:00
David Pursehouse
e678639b9f Update cookbook plugin
- Added imageUrl to HelloWeblink

Change-Id: I8402202a057dae4a57cb74d3f794f6cf0e5fc418
2014-09-09 12:27:02 +00:00
David Pursehouse
75b0219ce2 Update replication and cookbook plugins
- Fix deprecation warnings caused by Guava upgrade

Change-Id: I15c48ea4d87d0f4517e4654309b12703d281752c
2014-09-08 16:27:26 +02:00
David Pursehouse
b9b9513688 Update plugins to latest revisions
Update the plugins:

- commit-message-length-validator
- download-commands
- reviewnotes
- singleusergroup

to add the fix:

- Add Gerrit-PluginName in BUCK file

Change-Id: Icb0e51be909c124598e9e7d2f5d8d648dfd97a0d
2014-08-22 15:04:56 +09:00
Hugo Arès
efd394f1af Update replication plugin
- Fix replication_log no longer logging after plugin reload

Change-Id: I9140c8d4f391e69102eacc901e74a4c6367b812d
2014-08-21 08:44:46 -04:00
David Pursehouse
34852bf69b Update plugins to latest revisions
- Organize imports
- Add buck resources to .gitignore

Change-Id: Iec18c0bbc60c3f921c175edb1005a4cb6b54b2a1
2014-08-20 10:50:47 +09:00
Dave Borowitz
7e6531c3e1 Update replication plugin to use correct ref names in tests
Change-Id: I667fcc9d9de6e8b2e20fe105ec83f7141b57b850
2014-08-01 14:19:34 -07:00
Edwin Kempin
503270ca41 Update replication plugin
* Move replication logs into a separate file
* Add id to PushOne and print it in the log and in show-queue command
* Add buck resources to .gitignore
* Debug logging when replication is scheduled
* Promote replication scheduled logs to info

Change-Id: I8e31556ab34c77088649af79fdfadb77b5a297c1
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-07-15 21:02:59 +02:00
David Pursehouse
5f945d68a2 Update cookbook plugin to latest revision
- Add UsageDataPublishedListener example
- Add UploadValidationListener extension point example

Change-Id: I73891ab371289df63478827ef3728372aaa32783
2014-07-03 17:23:50 +09:00
David Pursehouse
272d279356 Update cookbook plugin to latest revision
- Guice Modules automatically retrieved from Manifest
- Showcase of the non-Jar plugin providers cookbook

Change-Id: Ic6fc8e1aa774c8c4f13c7a952f0c1084fca6c25c
2014-07-02 19:27:37 +09:00
David Pursehouse
1a9d928a1e Move powermock and easymock library definitions to separate BUCK files
Move the definitions to a separate file, thus making the lib/BUCK file
smaller.

Add a VERSION definition for powermock and reuse it for all the libary
declarations, rather than hard-coding the same version string every
time.

Depends-On: I695efcfabe67416104b0efb71f090a5303393702
Change-Id: I8840ef29d9ddfa241740fb0e4c4715c52ff07e30
2014-06-30 15:35:13 +00:00
David Pursehouse
46e241adf9 Update replication plugin to latest revision
- Add logs in PushOne class

Change-Id: I126802fe86d6d3105aa07f85191131e232a9edb6
2014-06-30 11:17:13 +09:00
David Pursehouse
bfdcec0071 Update cookbook-plugin to latest revision
- Buck: Add license parameter to maven_jar() invocation
- Implement standalone Buck driven build on top of gerrit_plugin()
  bucklet

Change-Id: Ic5a80478c5ddc634fcc276eff0f21d557576b662
2014-06-27 10:14:53 +00:00
David Pursehouse
05bbead21d Update replication plugin to latest revision
- Fix double packaging of commons-io

Change-Id: I7d9159e7ba6dd1e209e613d6804b1b345604c56d
2014-06-16 14:19:31 +09:00
David Ostrovsky
5dacc8bcc2 Buck: Make deps to $(exe :foo) and $(location :bar) implicitly
Apply [1] on our Buck tree.

[1] https://github.com/facebook/buck/issues/128

Change-Id: Ie3a9de0b2ee3725170bcbd06df059ea5d9ae5252
2014-06-10 07:29:42 +00:00
David Ostrovsky
d8af092c0a Buck: Remove usage of genfile()
genfile() is considered to be deprecated and is going to be discontinued
in future Buck releases [1].

[1] https://groups.google.com/forum/#!topic/buck-build/Ci8Y95USD8I

Change-Id: I7a5a1ee99d1448c412bb51b793c1e874dd3c62f4
2014-06-10 07:14:18 +00:00
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