964 Commits

Author SHA1 Message Date
David Ostrovsky
0561211396 Remove old EditCommitMessage RPC
Change-Id: Ic25c5d68f3bb27423b7c6b829169e33c8361eba5
2013-12-06 22:11:00 +01:00
Shawn Pearce
4cb50ad3a5 Merge "Replace 'indexOf()' expression with 'contains()'" 2013-12-06 06:54:42 +00:00
Matt Baker
d62b60e13b use variable instead of calculating again and use final
Change-Id: I04ea7c1940a5f4c6a4cf990a520a877eec065404
2013-12-05 21:22:08 -07:00
Matt Baker
c7dbfed9f0 Replace 'indexOf()' expression with 'contains()'
Change-Id: Ida566a24d78174690b11d758c769b1d559b7fae9
2013-12-05 21:13:38 -07:00
Shawn Pearce
d043611713 Add server config option to disable new features
Some user groups are intolerant of any sort of new feature or
funcationalty being added to the web interface.  Add a server
variable that disables or hides most new functionality.

Change-Id: Ide3a6a5e66cbba9c58575345a4a9ad1da209bb16
2013-12-05 17:40:28 -08:00
Dave Borowitz
87a8c5938e Remove unused variable in ProjectAccessFactory
Change-Id: Ib0c58d71164e976f85b8fff6462ed1e5a221f773
2013-12-05 09:53:04 -08:00
Dave Borowitz
8d2ab515cb Fix various unchecked warnings
Checked type inference has changed slightly in Java 7, so many of the
suppressions are no longer necessary.

Change-Id: I73585e888b8204429ea67c8f4822d81d4dad8c46
2013-12-05 09:11:11 -08:00
Shawn Pearce
d0414f2eda Merge "Hyperlink to groups in access editor" 2013-12-04 22:57:23 +00:00
Colby Ranger
faef658f38 Include addReviewer in ChangeApi.
Also, update the PostReviewers.Input to be named AddReviewerInput.

Change-Id: Ide60a3f261d59a3af988d94c3c1bdbd1dcfdcd79
2013-12-04 13:56:05 -08:00
Shawn Pearce
8eb4eb75ba Merge changes I14c49cb4,I12d17fe1
* changes:
  Inject ChangeUtil, making most methods non-static
  Inject ApprovalsUtil in more places
2013-12-04 00:36:20 +00:00
Shawn Pearce
2a2bfa483b Merge "Replace 'indexOf()' expression with 'contains()'" 2013-12-03 23:59:21 +00:00
Shawn Pearce
0a70c69cb8 Hyperlink to groups in access editor
Internal group names are automatically hyperlinked in the access
control editor. This makes it easy to view the members of the group
and determine if access is correctly assigned.

Plugins supplying group systems may include a url to a group
information page. If present use these URLs as hyperlinks in the
access editor, providing the same functionality.

Change-Id: I9605fdc1d43d6705a01ec2b68b083e8678dbc88a
2013-12-03 15:13:47 -08:00
Dave Borowitz
ef6cca84cb Inject ChangeUtil, making most methods non-static
Change-Id: I14c49cb4a0b9829d751ea96cd2d909f234654508
2013-12-03 15:08:54 -08:00
alex.ryazantsev
db721d46f0 Replace 'indexOf()' expression with 'contains()'
Change-Id: I10a5ed7c813af7ab40707369bf4c1953c030b10d
2013-12-04 01:15:19 +04:00
alex.ryazantsev
05872efbbd Replace 'for' loop with 'foreach'
Change-Id: I5ca01d678b8cf9e9fc75b21270329b483e31694e
2013-12-04 01:02:53 +04:00
Edwin Kempin
70259293e7 Update mergeability flag when access rights are saved for review
Change-Id: If38083bc5c815c510a25da196d8b9ac98505bd42
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2013-12-03 08:55:44 +01:00
Shawn Pearce
f43e915c5d Move system groups into their own backend
Delete 'Anonymous Users', 'Registered Users', 'Project Owners' and
'Change Owner' from the database and account_groups table.  Define
them inside of a specialized SystemGroupBackend class.

Change-Id: Ia67add4630579f3d0ce25edcfd662bbcf918dc8f
2013-12-02 11:36:27 -08:00
Shawn Pearce
05cb053378 Save GWT compile time by avoiding javac
GWT only needs the rebind code for CSS and ServerLinker to be
precompiled as bytecode. Save build time by passing no source
files to the java_library() used by gwt_module().

For a full draft build of ui_safari this cuts the refresh time
down from 32.015s to 26.158s on my MacBook. Saving 6s on each
UI reload adds up during development.

The common annotations need to be provided as bytecode, avoiding
spurious warnings from GWT when there is a Java syntax error.

Change-Id: I37826498650c65c05303e7d4d1177d05781c56f6
2013-11-30 11:06:50 -08:00
Shawn Pearce
da07edd370 Merge "Delete SQL index support" 2013-11-29 20:48:26 +00:00
Shawn Pearce
d4ae3a16d5 Delete SQL index support
Require the secondary index to be enabled in Gerrit 2.9.  Unless
configured differently, Lucene is used for the secondary index.

Change-Id: I3d2d804170835d69ffbfef586ddc3873ea3cd1c8
2013-11-29 11:35:39 -08:00
Edwin Kempin
a7e04e4eea Merge "Fix unclosed resource warnings" 2013-11-29 19:35:12 +00:00
Shawn Pearce
72fb6cc514 Remove unused .gitignore
These were necessary only for the Maven based build.

Change-Id: Ie26669e6ccae60a52d2db1b8ad362e2fa88a26f2
2013-11-28 22:56:51 -08:00
David Ostrovsky
c53fd3ae49 Delete eclipse left-over files from the Maven poop era
Change-Id: Ie3a75e8c6a2d274cd39e362259ab20cff474eb8d
2013-11-28 22:55:09 -08:00
Shawn Pearce
0b17d5f178 Fix unclosed resource warnings
Eclipse Kepler thinks these resources are unclosed.

The refactoring in JettyDaemon combines three duplicate invocations
and confuses Kepler's JDT enough that the unclosed resource warning
goes away.

Change-Id: I0f376ac6116082ed645d6712fe5d98add66f493e
2013-11-28 22:34:32 -08:00
Edwin Kempin
475b241f4d Always keep Submit button enabled even if change is not mergeable
If 'changeMerge.test' is set to true Gerrit checks if a change is
mergeable and shows this on the ChangeScreen. If a change is not
mergeable the submit button is hidden. There are two problems with
hiding the submit button:

1. Users get confused why the change cannot be submitted. They are
searching for the submit button and do not understand that they have
to rebase the change. Gerrit administrators are annoyed to answer
questions about this. If trying to submit the change fails there is a
good error message that tells the user that he needs to rebase the
change. This is mostly a problem with the old change screen. On the
new change screen the red "Cannot Merge" and the "Merge Conflict"
status can hardly be overlooked.

2. If a change has a conflict it is possible to resolve the conflict
in a merge commit which is a successor of the conflicting change. If
this merge commit is submitted it is in state 'Submitted, Merge
Pending'. If now the conflicting change is submitted the merge
succeeds. This way of resolving conflicts is not possible if the
submit button is not available on conflicting changes.

Since we are now always showing the submit button (if the approvals
allow submit and the user has the permission to submit) and we are
also always computing the mergeability flag for each open change,
there is no need for the 'changeMerge.test' configuration parameter
anymore. This feature is now enabled by default and the
'changeMerge.test' configuration parameter is removed.

Change-Id: I37e69e67992b3aea153e134a5f21fe76ba7e2b91
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2013-11-25 14:14:23 +01:00
Bruce Zu
1128c602cc Update of parent project: defaults to be 'All-Projects'
When users upate parent project, the default value of
parent project will be 'All-Projects' if users leave it
to be empty, just as that in ceating new project scenario,
thus users need not to recall it should be 'All-Projects'
or 'All_Project' or 'All-projects'.

Change-Id: I831da9cc5fa19c50e8754a0e2a86fc849e21f785
2013-11-25 09:33:40 +00:00
Shawn Pearce
dd218662c0 Replace <code> with {@code} in javadoc
{@code foo} is shorter and easier to read and write than
<code>foo</code>, which is why it was introduced years ago in the
javadoc processor.  Make consistent use of it throughout the
documentation comments.

Change-Id: I59d428cb6c5015453629398b0697891b83c8e91d
2013-11-24 13:12:20 -08:00
Shawn Pearce
0ca2b59c89 Cleanup PatchLineComment writtenOn
Get rid of updated() and just use setWrittenOn().
In PostReview create the new comment object with
the transaction timestamp rather than wall clock.

Change-Id: I4cfef0ca82bd031d1b855fa14592489bbad9d25b
2013-11-23 22:38:18 -08:00
Edwin Kempin
662e55f6af Visualize sizes of changes in change tables and user dashboards
Add a new column to change tables and user dashboards in which the
size of a change is visualized by a colored bar. For small changes a
short green bar is shown, for medium sized changes a middle sized
yellow bar is shown and large changes have a full red bar.

Visualizing the change sizes gives a hint to the reviewers about how
complex a change is and how long it will take to review it.

For contributors the visualization of the change size may be a
motivation to split large changes into smaller pieces which will speed
up the review process.

How many changed lines are considered as a large change is
configurable.

Change-Id: I88497b8aea00047d93ad7d079eecc5e1052187d2
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2013-11-23 21:10:28 -08:00
Edwin Kempin
fb3e5b43b8 Show tab with conflicting changes only if secondary index is enabled
This tab makes use of the 'conflicts' operator which is only supported
if a secondary index is enabled.

Change-Id: I25cc023e10f10a80efce12c1a3e62a65cb8940f3
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2013-11-22 16:46:19 -08:00
Shawn Pearce
a4455eab77 Hide multi-master cache coherency issues on preferences
User preferences are held in memory in the accounts cache, but can be
stale in a multi-master configuration due to writes being handled on a
different server process.  Paper over the lack of cache coherency by
reading the preferences from the database anytime they are requested
through the RPC or REST APIs.

Change-Id: I2a14e1f50e908a1d5ea5628e5a05e392be2e0d42
2013-11-20 23:19:39 -08:00
Shawn Pearce
3eb9776740 Delete dead old style myDiffPreferences RPC
This method is not invoked by any UI code. Drop the method.
/accounts/self/preferences.diff provides the same data on
a supported REST API.

Change-Id: If88d8449f48e898fc84fdabad19341bd8063a737
2013-11-20 23:13:09 -08:00
Shawn Pearce
8e6b4ec9c9 Merge "Allow users to save update of parent project for review" 2013-11-19 22:50:35 +00:00
alex.ryazantsev
bbf93f85cf Remove unnecessary local variables
Change-Id: I20ee3f7258d7e98b9c57b49c21b1e2d1582f626f
2013-11-19 13:56:25 -08:00
Edwin Kempin
91fefc45e9 Allow users to save update of parent project for review
Only Gerrit administrators are allowed to change the parent of a
project. Now normal users can change the parent project in the WebUI
and save the modification for review. This creates a change for the
refs/meta/config branch that can be approved and submitted by
administrators. Since the administrators are the only ones who can
submit this change they are automatically added as reviewer. This way
we have an integrated workflow for requesting and approving changes of
parent projects, instead of having requests by email outside of
Gerrit.

Change-Id: I080649990f80edf78fd6eb465cef25fb8012352d
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2013-11-19 10:45:44 +01:00
alex.ryazantsev
d4634ccacc Remove redundant type arguments and type cast
Change-Id: I85be0f1fcceb51333d25eeca51cc53f842cef860
2013-11-18 23:48:11 +04:00
Shawn Pearce
68badcfa52 Merge "Remove deprecated html tag attribute for 'strict' doctype" 2013-11-18 04:04:24 +00:00
Shawn Pearce
40b526ae33 Merge "Remove unnecessary 'return' statements" 2013-11-18 03:51:16 +00:00
alex.ryazantsev
cc2bccfdfd Remove unnecessary 'return' statements
Change-Id: Ie517a85ad5d0d53479b8f726b932048acce4f889
2013-11-18 02:23:53 +00:00
alex.ryazantsev
5c96817e31 Remove unnecessary assignments
Change-Id: I7890b296474811b16f57e029f9142655df1bc945
2013-11-18 02:12:52 +00:00
alex.ryazantsev
cdf8a863fd Remove deprecated html tag attribute for 'strict' doctype
Change-Id: Id6f678fbbcd5595727b3a6b3717c75ea1c3d8f42
2013-11-18 01:22:41 +04:00
Dave Borowitz
ec6fca88a5 Make LifecycleModule inherit from FactoryModule
Cut down on a bunch of one-offs of install(new *Module() {...}) by
choosing a more appropriate base module class. This doesn't solve all
such cases, for example RpcServletModule must still inherit from
ServletModule, but it does clean up some code. (And who knows, fewer
modules may even mean faster startup time.)

Change-Id: Ie1aed05d0a64f7f11b121c9a637bb30d80e9a595
2013-11-13 16:14:00 +00:00
Edwin Kempin
b0b0bbba71 Allow updating the parent project from the WebUI
This change adds support for updating the parent project of a child
project from the WebUI. This functionality is offered in the
ProjectAccessScreen. When the access rights are changed the user is
also able to change the parent project (if the user has the needed
privileges, means if he is administrator). When the user saves the
new settings only one RPC to the server is done that updates both the
access rights and the parent project property. Technically both
updates are modifications of the 'project.config' file in the
'refs/meta/config' branch. There will be only one commit for this
file that does both updates.

In the UI only valid parent projects are suggested as new parent
project (all projects that would cause a cycle in the line of parent
projects are not suggested).

Bug: issue 1298
Change-Id: Ic63bdb039ea5057a0551138f8fef9ede280b2be3
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2013-11-13 08:09:32 +01:00
David Ostrovsky
bbb688edc5 ChangeScreen2: turn it to be the default change screen
Bug: issue 2065
Change-Id: I65e402c15ac8c7b7b0d60b8502b79d3261a94fc5
2013-11-09 12:13:16 +01:00
Shawn Pearce
4c62f72ff4 Merge branch 'stable-2.8'
* stable-2.8:
  Bump SSHD version to 0.9.0.201311081
  Add REST API to toggle starred change state

Change-Id: Ic8d7a1802f6d6319f8f1012f9fe0c7f0c030f60a
2013-11-08 21:36:02 -08:00
Shawn Pearce
f4a8de43a6 Merge "Add REST API to toggle starred change state" into stable-2.8 2013-11-09 03:35:53 +00:00
Shawn Pearce
d4765db816 Add REST API to toggle starred change state
Tests-by: David Ostrovsky <david@ostrovsky.org>
Change-Id: I4c1da5f7e0a1514e091eaab8c532b356c53f138a
2013-11-08 19:21:45 -08:00
alex.ryazantsev
d215908bae Completed test migration to junit4, easymock updated to version 3.2
Change-Id: I6381045b3dae7133cc3589c5dd20ed977118a83d
2013-11-07 11:22:24 -08:00
Shawn Pearce
e3080fd093 Merge branch 'stable-2.8'
* stable-2.8:
  Make plugin servlet's context path authorization aware
  Support 'id' attribute for menu items contributed by plugins
2013-11-06 12:50:39 -08:00
Shawn Pearce
321a4adc1a Merge branch 'stable-2.7' into stable-2.8
* stable-2.7:
  Make plugin servlet's context path authorization aware
2013-11-06 12:50:33 -08:00