10885 Commits

Author SHA1 Message Date
David Pursehouse
e6de7b9564 Merge branch 'stable-2.8' into stable-2.9
* stable-2.8:
  Release notes for Gerrit 2.8.4
  Set uploader to current user in "patchset-created" event upon cherry-picking
  Fix JavaDoc warning

Conflicts:
	gerrit-server/src/main/java/com/google/gerrit/server/change/CherryPickChange.java

Change-Id: I28791a3ff28de4d20ded64e180d7ddb02a4e4687
2014-04-11 22:09:14 +09:00
David Pursehouse
429c79d61e Release notes for Gerrit 2.8.4
Change-Id: If89b43f642e2cd06c29e1549273832ca70d07cb4
v2.8.4
2014-04-11 10:27:52 +09:00
Edwin Kempin
db59610367 Merge "Set uploader to current user in "patchset-created" event upon cherry-picking" into stable-2.8 2014-04-10 13:33:23 +00:00
Christian Aistleitner
980c5bf9ef Set uploader to current user in "patchset-created" event upon cherry-picking
When using the web ui (both old and new ChangeScreen) to cherry-pick a
change to a branch that already has this change (e.g.: cherry-picking
on the same branch to get rid of dependencies), the corresponding
patchset-created event had its patchSet.uploader set to the Change's
owner instead of the current user. We now set it to the current user,
so stream-events consumers can properly detect who uploaded the
rebased patch set.

Change-Id: I0613ecae06b7843b8ca0294f83378c3917c26810
2014-04-10 14:30:22 +02:00
Edwin Kempin
69fd3a468d Fix JavaDoc warning
The JavaDoc generation reported the following warning:

  .../EmailReviewCommentsExecutor.java:29: warning - Tag @link:
    reference not found: EmailReviewComments

Change-Id: If30a0e08ccbcea0ee55d208cc2dc6840c4dab00e
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
(cherry picked from commit a5d2ad3933bd021d6a5a947642bf14bcfd1b998b)
2014-04-10 11:50:30 +00:00
David Pursehouse
0cedeb292e Merge "Fix JavaDoc warning" into stable-2.9 2014-04-10 11:49:00 +00:00
Edwin Kempin
a5d2ad3933 Fix JavaDoc warning
The JavaDoc generation reported the following warning:

  .../EmailReviewCommentsExecutor.java:29: warning - Tag @link:
    reference not found: EmailReviewComments

Change-Id: If30a0e08ccbcea0ee55d208cc2dc6840c4dab00e
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-04-10 13:07:11 +02:00
David Pursehouse
ecc86e2bcb Merge branch 'stable-2.8' into stable-2.9
* stable-2.8:
  SideBySide2: Show [ and ] shortcut keys in nav arrow tooltips
  Always auto confirm adding reviewers for set-reviewers SSH command
  Improve wording of 'parents' field description in CommitInfo
  Fix 'parents' field name of CommitInfo in REST documentation
  Implement pagination in project list screen
  Add option 'S' to projects REST API to support query offset
  Fix: Failure of acceptance tests.
  Do not refresh project list if filter did not change
  Fix inconsistent behavior of diff view when viewing binary files
  Update cookbook plugin to latest revision
  Correct Javadoc of RestReadView in extension API
  Fix memory leak of SubIndex.NrtFuture objects

Conflicts:
	gerrit-gwtui/src/main/java/com/google/gerrit/client/Dispatcher.java
	gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/Header.java
	gerrit-server/src/main/java/com/google/gerrit/server/change/PostReviewers.java

Change-Id: I4d432c6ce27d3fd76dd9f86b8685be15ec8f123d
2014-04-10 17:06:45 +09:00
Shawn Pearce
b4eb7ef652 SideBySide2: Show [ and ] shortcut keys in nav arrow tooltips
In the top right corner of a file the navigation cluster has a
tooltip on the up arrow but did not show the tooltip on the left
or right arrows. Show the key in the tooltip.

Change-Id: I192ef0ab8155c15b4bb35a18da33f74f15bb5537
2014-04-10 16:06:42 +09:00
Edwin Kempin
3820703d4c Merge "Fix link behaviour inconsistencies in change info panel" into stable-2.9 2014-04-10 06:59:21 +00:00
Edwin Kempin
9f821d2ba9 Merge "Always auto confirm adding reviewers for set-reviewers SSH command" into stable-2.8 2014-04-10 06:28:47 +00:00
Edwin Kempin
1b9a36a091 Always auto confirm adding reviewers for set-reviewers SSH command
If a group contains more than 'addreviewer.maxWithoutConfirmation'
members adding it as reviewer to a change requires a confirmation. A
user should only be asked for the confirmation when reviewers are
added from the WebUI but not when the set-reviewers SSH command is
used. This is also how 'addreviewer.maxWithoutConfirmation' is
documented in 'config-gerrit.txt'.

Bug: issue 2599
Change-Id: Ieab601e573115a0b034e1dcebe1c602adda6770b
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-04-09 13:01:30 +00:00
Edwin Kempin
cecf90acc1 Improve wording of 'parents' field description in CommitInfo
Change-Id: I5d136856f4d9794b74914579b39f2a1da3eb4ce8
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-04-09 14:58:35 +02:00
Edwin Kempin
0bb245720d Merge "Fix 'parents' field name of CommitInfo in REST documentation" into stable-2.8 2014-04-09 11:06:42 +00:00
Edwin Kempin
50cff2eadd Merge "Merge branch 'stable-2.8' into stable-2.9" into stable-2.9 2014-04-09 11:01:01 +00:00
Edwin Kempin
b89b0c83f2 Fix 'parents' field name of CommitInfo in REST documentation
Change-Id: I804ab1f8034ac9fb1be9d178acce509f6d997d09
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-04-09 12:51:18 +02:00
David Pursehouse
511a35bb6c Merge branch 'stable-2.8' into stable-2.9
* stable-2.8:
  Emit ref-updated event when editing project access via web UI
  Fix ChangeListener auto-registered implementations
  Fix: The email notification of review comments gets stuck.
  Use consistent grammatical tense in command descriptions
  Make skip bar more user friendly
  Bump version to 2.8.4 in plugin API and archetypes
  Helper script to update API version in plugin archetype pom files
  Serialize GWT dbg and opt compiles
  Bump GERRIT_VERSION to 2.8.4
  Update the mysql documentation concerning charsets
  By default don't allow admins to create new branches by push
  Disable commitWithin when running Reindex
  Emit ref-updated event when editing project access via web UI
  SideBySide2: Fix syntax highlighting for shell files
  ChangeScreen2: Respect comment visibility strategy
  Don't add "Patch File" download link for merge commits

The change 'ChangeScreen2: Respect comment visibility strategy' [1]
is dropped intentionally, see [2].

[1] https://gerrit-review.googlesource.com/55081
[2] https://gerrit-review.googlesource.com/#/c/55536/3/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/History.java

Conflicts:
	Documentation/config-gerrit.txt
	VERSION
	gerrit-gwtui/BUCK
	gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen2.java
	gerrit-gwtui/src/main/java/com/google/gerrit/client/change/DownloadBox.java
	gerrit-gwtui/src/main/java/com/google/gerrit/client/change/History.java
	gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/SkipBar.java
	gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/project/ChangeProjectAccess.java
	gerrit-plugin-archetype/pom.xml
	gerrit-plugin-gwt-archetype/pom.xml
	gerrit-plugin-gwtui/pom.xml
	gerrit-plugin-js-archetype/pom.xml
	gerrit-server/src/main/java/com/google/gerrit/server/change/EmailReviewComments.java
	gerrit-server/src/main/java/com/google/gerrit/server/project/PutConfig.java
	gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/ListMembersCommand.java

Change-Id: I16c848cb385080fd25555c983a3030e0f1cc560b
2014-04-09 10:41:52 +00:00
Anthony Chin
20e375ddcd Implement pagination in project list screen
The project list screen was taking a long time to render over a large
amount of projects (1,000+) and with even larger number of projects
(3,000+), it could make the browser unresponsive.

Project list screen now uses pagination to resolve this issue. The
number of projects displayed is determined by the 'Maximum Page Size'
user preference.

Bug: issue 2215
Change-Id: Icd0a7d54fd5c5b3c2301c31026e7c6717a648a24
2014-04-09 09:09:14 +09:00
Anthony Chin
f7c82e1bbc Add option 'S' to projects REST API to support query offset
List projects endpoint has an option to limit the number of results
returned but it was missing an option to start at a nonzero offset in
order to support results paging.

Add and document 'S' option which allow to query project list starting
at a nonzero offset. Also add missing documentation for the 'n' option
which limits the number of results.

Those 2 options will be then used to render project list with pagination
in web UI.

Change-Id: I19c4cd1cfa6ed78f22c84f249af54a5c30387561
2014-04-09 09:09:02 +09:00
Bruce Zu
92e1ea5ac9 Fix: Failure of acceptance tests.
a7e34313 broken the acceptance tests.
Fixed.

Change-Id: I577cc875bcce3013cabd2f1b6813e7be820d4b3c
2014-04-08 21:33:36 +08:00
David Pursehouse
7b83f59157 Fix link behaviour inconsistencies in change info panel
In the change info panel there are links on the project name, branch
name, and topic name.  They all behave differently:

 project: opens the project admin page
 branch: opens a query for changes on the branch and topic
 topic: opens a dialog to edit the topic name

Also, next to the project is a query icon that opens the project
default dashboard which is a query for recent changes.

These inconsistent links reduce the useability of the UI.  With this
change, they are made more consistent:

 project: opens the project default dashboard
 branch: opens a query for changes on the branch (without topic)
 topic: opens a query for changes on the topic

The project query icon is replaced with a settings icon that opens
the project admin page.  The topic can still be edited by clicking
on the edit icon.

Change-Id: I09c36bf80949efd8a6237669c8284275c3372d9c
2014-04-08 13:14:31 +00:00
Shawn Pearce
f1d8cfbe98 Remove message box when editing topic of change
I do not recall why I added this message box below the topic name
field in ChangeScreen2.  I suspect the original idea was to permit
more notes to be added, for example why the topic is being assigned.

At the recent Gerrit hackathon it sounded like nobody ever uses this
box.  Remove it to simplify the UI.

Also remove message from the PutTopic REST API.  We suspect nobody
will notice the missing field.

Change-Id: I8d32287ee3b08d9409dd7d58688cd9effdfd380f
2014-04-08 17:17:08 +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
David Pursehouse
96e2c993ce Update Gerrit 2.9 release notes with info about 2.8.x series
Mention that the 2.9 release includes all the fixes that were
included in the releases 2.8.1 through 2.8.4.

Change-Id: I124d2149ee3f3e604128eefa01d60453b9d54619
2014-04-08 17:15:10 +09:00
David Pursehouse
320fe96778 Update GWT version to 2.6.0 in debug launcher
Change-Id: I6502af84372248f890b3299f5c73fc1c47880ecf
2014-04-08 17:14:05 +09:00
Hugo Arès
f79fd10f3b Do not refresh project list if filter did not change
Every time key up event is raised in the project list filter text box,
the project list was getting refreshed even if the filter did not
change (e.g. moving the cursor was refreshing the list).

Only call the refresh if the filter changed or if enter key is pressed.

Change-Id: I2e608d89e16dbef0cfe1e503ac2feb4639c27f5d
2014-04-08 13:18:52 +09:00
Bruce Zu
72bced0061 Fix inconsistent behavior of diff view when viewing binary files
In the new change screen, if the user clicks on a binary file in
the file list, the unified view is used.  Then when navigating to
a previous or next file that is not binary, the diff view stays in
the old unified setting.  It is only possible to get back to the
new side-by-side view by going back to the change screen and then
opening the non-binary file from there.

To keep consistent behavior of diff view, always use unified diff
for binary files.  Use the user's preference setting for non-binary
files.

Change-Id: Ie4ece4cb740df8a69cbf3d2d42e4b0fb05461520
2014-04-08 12:59:26 +09:00
David Pursehouse
bb9c63a3a9 Update cookbook plugin to latest revision
- Fix plugin name in REST API documentation synopsis lines

Change-Id: I3bcf6da0e4ec3fb76aab3a93e08da427df39c09b
2014-04-07 22:04:15 +09:00
David Pursehouse
503d9b2b33 Correct Javadoc of RestReadView in extension API
The resource parameter specifies the resource to be read,
not the resource to be modified.

Change-Id: I4010674a348cefad02c234118ff25cf332dd76b4
2014-04-04 18:36:44 +09:00
David Pursehouse
3c666334c9 Merge "Fix memory leak of SubIndex.NrtFuture objects" into stable-2.8 2014-04-04 05:52:47 +00:00
Jay Soffian
701218b8d0 Emit ref-updated event when editing project access via web UI
3daa739e13 took care of firing the ref-updated event for updates via the
web UI access pane, but not changes via the web UI general pane, which
uses the REST 'PUT /projects/:project-name/config' endpoint. This commit
takes care of that case, as well as the REST
'PUT /projects/:project-name/description' endpoint.

Note: there's still no ref-updated event for the case of changing a
project from "hidden" state back to read-only or "active" as hooks are
suppressed for hidden projects deeper in the code.

Bug: Issue 2571
Change-Id: I0a260011c0968193ccb5900a18935e654d25f042
2014-04-03 13:29:16 -04:00
Hugo Arès
483f12b8dc Fix ChangeListener auto-registered implementations
Add missing @ExtensionPoint in ChangeListener so implementors can use
@Listen to register.

Change-Id: Ia7fd16a7afdffbfc278880317fd10297f8b9e19d
(cherry picked from commit eff0592a70ce7fb3dee91abd5262dd462339591e)
2014-04-03 08:16:43 +00:00
Bruce Zu
a7e3431317 Fix: The email notification of review comments gets stuck.
Sometimes it is found that one thread goes stuck when waiting
for an answer from the SMTP server.

Fixed. Enable user to

 -config the timeout value of opening a socket connected to a remote
  SMTP server.

 -config the worker-thread pool size of executor used for sending out
  review comments notification when it is not enough to dedicate only
  one thread.

 -config the default size of the background execution thread pool when
  one thread is not enough to handle miscellaneous tasks including
  sending out every kind email notification.

Change-Id: Id8177b374f7049cfac617c50e66b2c83ae71641b
2014-04-03 14:40:23 +08:00
Bruce Zu
4174e56a9a Fix memory leak of SubIndex.NrtFuture objects
The SubIndex.NrtFuture objects are added as listeners of
searchManager who was found to hold on to them forever.

Fixed. There are also some code refactoring in NrtFuture.

Change-Id: If87cb62890a1cfa6c6336f6c7953a1cb56d42937
2014-04-03 13:34:15 +08:00
Dave Borowitz
6ea964a0a1 Split mergeability checks by priority
When a project config is updated or a change is merged, all open
changes on an entire project or branch need to be rechecked for
mergeability. For projects or branches with lots of open changes,
this can flood the queue with potentially slow checks. This will
block simpler cases, such as checking mergeability of a single change
during ReceiveCommits.

Define a new Priority enum on the MergeabilityChecksExecutor so we
can split the queue based on priority, allowing smaller, interactive
changes such as pushes to not wait for the entire queued backlog.

Change-Id: I57f9eb33dbbcd8a560adfe4458ce48d7b0817957
2014-03-27 15:08:24 -07:00
Dave Borowitz
b49726e145 Refactor MergeabilityChecker to use a builder pattern
This class was growing with various permutations of change, project,
branch, sync/async, which are suited to constructing with a Builder.
We also want to add a priority flag to certain checks to support more
fine-grained scheduling.

In general, due to the strategy of kicking off async work that can
fan out and ignoring errors, try to log errors as they happen instead
of depending on callers to call get() on the resulting Futures.

Change-Id: Ia575793e5ceb5aa3148b45a9a49e4e10e50a5108
2014-03-27 15:07:58 -07:00
Shawn Pearce
902686a8d8 Merge "Make skip bar more user friendly" into stable-2.8 2014-03-27 15:50:07 +00:00
David Pursehouse
a8861d04f9 Use consistent grammatical tense in command descriptions
Change-Id: Iee7f99ec9f133b1e7cfb73a29e90cc2f28ac75ca
2014-03-26 22:23:34 -07:00
Dariusz Luksza
48c1f20ef7 Make skip bar more user friendly
It is odd to put block expansion link only on number of skipped lines.
This change puts link on whole sentence "... skipped XX common lines
...".

Change-Id: I5c48a26fa7fa8758e35386994b80ef741e3ffa50
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
2014-03-27 05:11:41 +01:00
David Pursehouse
9808a04b3a Merge "Set http queue size to max integer when maxQueued 0 is provided" into stable-2.9 2014-03-27 01:11:48 +00:00
David Ostrovsky
14fe8bc093 Set http queue size to max integer when maxQueued 0 is provided
In 8e78797190ddb9e04f93190bae86fe3956f08b3d, in migration change from
Jetty 8 to Jetty 9 one special case was missing: maxQueued = 0. By
mapping this value to max capacity of the queue without extra check
for the 0 value makes Jetty fail to start with IllegalArgumentException
when httpd.minThreads (default 5) smaller then maxQueued.

Rectify it by assigning Integer.MAX_VALUE to maxQueued when 0 was set.
Adjust the documenatation to reflect this change.

Change-Id: I686cf75a0bd0af16983e52ba22e7957a65cbb5b9
2014-03-27 01:02:07 +00:00
David Pursehouse
c06a36c1bf Bump version to 2.8.4 in plugin API and archetypes
Change-Id: Icb5153289195b6ea8539f21ef89e0a33c34b37de
2014-03-26 18:01:33 -07:00
David Pursehouse
9a13f852f0 Helper script to update API version in plugin archetype pom files
Running the script in the root of the Gerrit folder:

  ./tools/version NEW_VERSION

will replace the value in the first occurrence of the <version> tag
in the plugin archetype pom files with the value specified by
NEW_VERSION.

Change-Id: I9f529852af22a1eef7f30e2fcaea8acea28057d9
2014-03-26 18:01:33 -07:00
Shawn Pearce
b547ca9d7b Serialize GWT dbg and opt compiles
The GWT compiler swamps a system when it builds, using multiple
threads to build each permutation in parallel. It also requires
a lot of RAM. Buck is not aware of the cost of the genrule and
currently schedules both to build at the same time.

Make ui_opt depend on ui_dbg so Buck is forced to serialize these
build steps, reducing the load on average systems while possibly
extending build time on very powerful (e.g.  16 core) systems.

Change-Id: Icc1856c9c4e7919c28dc533e792fa25aadcdf801
2014-03-26 18:01:32 -07:00
Edwin Kempin
d61ebb1a01 Include only current votes into change message when removing a reviewer
Change-Id: I541d7f7b130a40811f398910169e493acc212537
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2014-03-27 01:28:41 +01:00
David Pursehouse
0337f85377 Bump GERRIT_VERSION to 2.8.4
Change-Id: I3d1300a0d87e9ca59d971cc20f162d9f9eb8237f
2014-03-26 16:42:57 -07:00
Julien Pivotto
3374a0bd63 Update the mysql documentation concerning charsets
This commit changes the mysql setup documentation because
there is no need to use latin1 encoding if you are using
another engine than the MyISAM engine.

Bug: Issue 1273
Change-Id: I432957381385c3e0390bb0db245139954300ecb8
(cherry picked from commit 13d07ecc7cd98cfd928a2b06d8755aea1fddde61)
2014-03-26 23:41:53 +00:00
Lewis Diamond
59e2108311 By default don't allow admins to create new branches by push
When pushing changes it is easy to make a typo in the refspec and
in this case new branches should not be created. If administrators
want to create branches by push they should explicitly assign
themselves the needed access rights.

This was broken by [1].

[1] https://gerrit-review.googlesource.com/#/c/54048/

Change-Id: I768bfd6d7cb193b0ec9f51c3fa768087ceb91acd
Bug: Issue 2557
2014-03-26 23:14:11 +00:00
Bruce Zu
af058e6dd3 Disable commitWithin when running Reindex
Disable the 'commitWithin' from within Reindex by overriding
the configuration with '-1'. Treat negative values as the
original behavior, auto-flushing but not auto-committing, which
is the least safe but the most efficient for reindexing the
entire site. 

Change-Id: Ifdba797bee871d2a3d8928810a6304bacb850c8c
2014-03-26 18:05:10 +00:00
Jay Soffian
3daa739e13 Emit ref-updated event when editing project access via web UI
Bug: Issue 2564
Change-Id: I9426f6969a234b081f72197ed0cb061512bc6e09
2014-03-26 17:00:28 +00:00