25156 Commits

Author SHA1 Message Date
Paladox none
7580853b58 PolyGerrit: Fix undefined url in gr-dropdown
If link.url is undefined lets return it as '' so no url is applied.

Bug: Issue 6352
Change-Id: I9492e48b14e4387cbdbe87c562ffa4966323948c
2017-05-31 16:10:12 +00:00
Viktar Donich
5b208b4f2b Merge "Keep gr-fixed-panel floating on page resize" 2017-05-31 16:04:55 +00:00
Alice Kober-Sotzek
afbb4187f5 Merge "Use Guava's Stream.stream rather than StreamSupport" 2017-05-31 07:50:30 +00:00
David Pursehouse
a48bfb56da Merge branch 'stable-2.14'
* stable-2.14:
  Consider plugin's test deps in eclipse classpath generation

Change-Id: I0c19e013f28c1100d341b13e2a6a22484d8f6dea
2017-05-31 15:57:57 +09:00
David Ostrovsky
f2f4ee165c Consider plugin's test deps in eclipse classpath generation
Introduce the CUSTOM_PLUGINS_TEST_DEPS in tools/bzl/plugins.bzl
that allow plugin with external test dependencies to be listed.
That way Eclipse classpath generation process can consider these
dependencies.

Because the plugin's own test rule need these dependencies, it
should expose java_library rule called: <plugin>__plugin_test_deps:

  java_library(
      name = "high-availability__plugin_test_deps",
      visibility = ["//visibility:public"],
      exports = [
          "@byte-buddy//jar",
          "@mockito//jar",
          "@objenesis//jar",
          "@wiremock//jar",
      ],
  )

and re-use this rule in junit_tests rule, e.g.:

  junit_tests(
      name = "high_availability_tests",
      [...]
      deps = [
          [...]
          ":high-availability__plugin_test_deps",
      ]
  )

Bug: Issue 6351
Change-Id: I55b402fa6edb9f2506a91451d70e68d44d1a7762
2017-05-31 06:42:48 +00:00
Luca Milanesio
1339491aeb Allow rebinding of PermissionBackend by libModules
Set the DefaultPermissionBackend as default binding and leave
the door opened to rebinding it.

Allow alternative backend implementations provided via libModules.

Change-Id: Ifebc666cb9309e34ced0c653a1646d279923d18d
2017-05-31 06:17:36 +00:00
David Pursehouse
42ae6c0977 Use Guava's Stream.stream rather than StreamSupport
Change-Id: I0547a5a4c9f69e0c0c06ad66e4ba2352da1e45a5
2017-05-31 12:42:00 +09:00
David Pursehouse
a20767c849 Merge branch 'stable-2.14'
* stable-2.14:
  Add support for 384 and 521 bit ECSDA keys

Change-Id: I27e81740f219cc70e3ff1112c82c8105daf91505
2017-05-31 11:03:47 +09:00
Paladox none
56517ff895 Add support for 384 and 521 bit ECSDA keys
Previously only the 256 bit key was generated.

Change-Id: I37b97088537e1508076264c6eeacd0487b15ae3d
2017-05-31 10:32:42 +09:00
David Pursehouse
91c8d02af4 Merge "Merge branch 'stable-2.14'" 2017-05-31 01:19:29 +00:00
Wyatt Allen
d90a02aedb Merge "Add stricter <script> indentation linting" 2017-05-31 01:08:28 +00:00
Viktar Donich
c4f2499c74 Keep gr-fixed-panel floating on page resize
As an attempt to handle scrolling, gr-fixed-panel detaches when floating
on page scrolling.
It appeared that this was causing page to relayout and cause more visual
issues than when "floating" during resize.

Change-Id: Ibdd840e8d3ee588f0ce78f1149b893f6d81c1b69
2017-05-30 23:43:31 +00:00
Viktar Donich
09c98980e8 Move mobile file navigator block into diff view header panel
Change-Id: I647472e083febdd8c2600233e63cdfe66ff24c0b
2017-05-30 16:16:02 -07:00
David Pursehouse
d6724b7ca9 Merge branch 'stable-2.14'
* stable-2.14:
  PolyGerrit: If your account does not have a name use a default name

Change-Id: Icfcb8e9e7c16a0d9a9bcc6ca68550a39ec86ff57
2017-05-31 08:05:35 +09:00
Viktar Donich
87d50f367c Make app footer stay in place on horizontal scroll
Change-Id: I50ae67993f6abd8c7810314f3ab16c22795edd82
2017-05-30 15:34:56 -07:00
Becky Siegel
060f70f188 Merge "PolyGerrit: Add loading text to project list when projects are loading" 2017-05-30 21:58:28 +00:00
Kasper Nilsson
765b18f748 Merge "PolyGerrit: Encode url for projects" 2017-05-30 21:40:46 +00:00
Paladox none
3618295756 PolyGerrit: Encode url for projects
Replace item.id with item.name to make sure the url is encoded.

Change-Id: I6192f44f756a53a73bc1c2b455b87f42ee60af02
2017-05-30 21:39:31 +00:00
Viktar Donich
75bbc87be7 Merge "Put horizontal scrolling on screen, take 3" 2017-05-30 21:11:51 +00:00
Paladox none
512baa29a9 PolyGerrit: Add loading text to project list when projects are loading
Bug: Issue 6320
Change-Id: I443ea9a4ffe34fe784ad5ab2abc1a569f7c826d3
2017-05-30 18:14:57 +00:00
Becky Siegel
4306144c59 Merge "PolyGerrit: Allow everyone to view /admins/project(/)? page" 2017-05-30 16:50:39 +00:00
David Pursehouse
a6d8c51550 Merge "Fix example result for check consistency endpoint" 2017-05-30 10:44:47 +00:00
Edwin Kempin
dadd303b94 Fix example result for check consistency endpoint
Change-Id: Ibd9f950f7122bbf7d3bdf77cfdcff791c3f1bf7b
Signed-off-by: Edwin Kempin <ekempin@google.com>
2017-05-30 09:48:32 +02:00
Patrick Hiesel
4d2dd189b5 Add project~changeNumber as changeId pattern
This change adds support for a new change identifier in the /changes
REST API endpoint. It follows the discussion on
Idac92e61ee1471b074034eef39901b1b8e961706 and the two recent Gerrit
Hackathons.

The new change identifier serves multiple purposes:

1) Since it contains the project name, we can directly construct the
   ChangeApi without a secondary index lookup. This means that we can
   still serve requests to some endpoints, even in case of a complete
   index failure.
   When the project is added in the UI, we will still be able to serve
   change pages in case of an index failure. While the triplet also
   contains the project, it is unfeasible for the UI since it requires a
   branch name (which we don't want to have in the UI URLs) and has the
   changeId instead of the change number.
2) Reducing the number of secondary index lookups is a performance gain.
3) The project name being contained in the URL enables load balancers
   to shard requests based on the project without a need for an index
   lookup (which most load balancers do not support). The sharding
   configuration can then be as easy as a regular expression and a
   static project-to-machine mapping.
4) This change is also a first step in deprecating the other three
   change identifiers and unifying our API access pattern. This will
   happen gradually in upcoming changes. Also the UI will be adapted.

This change also adds extensive testing to both the new parsing logic as
well as all change identifiers in both the Java and the REST API.

Change-Id: I7a904fdd001c065af9897d9c08edce1cfbd43a14
2017-05-30 09:42:34 +02:00
David Pursehouse
1ead0c68f1 Consistently use Truth8 for assertions about Optional.isPresent
Instead of:

  assertThat(a.isPresent()).isTrue();
  assertThat(b.isPresent()).isFalse();

with Truth8 we can do:

  assertThat(a).isPresent();
  assertThat(b).isEmpty();

Change-Id: Id8578ea1a0b67378dd2761e4181f276c4a0146c0
2017-05-30 08:40:16 +09:00
Changcheng Xiao
7f2f880118 Add another test for DeleteComment API
This change adds a test to delete one comment multiple times,
which ensures that the same comment and the same commit can be
rewritten multiple times correctly.

This change also refines the DeleteCommentRewriter.

Change-Id: I8ab171d0f0e8ca5b07692b9a662280bf01ef8d68
2017-05-30 08:40:16 +09:00
Paladox none
b177e56c71 PolyGerrit: Allow everyone to view /admins/project(/)? page
gwtui allows anon's to view this page so allow this with polygerrit.

Change-Id: Ic59ccc0cd1861115971f3d5c9401496cc4f0a488
2017-05-29 18:32:27 +00:00
Dave Borowitz
3fc8cf8a1a Merge "Convert MergeOp and related classes to use RetryHelper" 2017-05-29 17:55:14 +00:00
Alice Kober-Sotzek
978c90c112 Merge "Fix some ErrorProne issues in ChangeQueryBuilder" 2017-05-29 12:07:18 +00:00
Changcheng Xiao
e875a0f330 Fix some ErrorProne issues in ChangeQueryBuilder
Reference types that declare an equals() method, or that
inherit equals() from a type other than Object, should
always compare for value equality with .equals().

Change-Id: I8dd924603d84eb930b6dab3fc5d0b3afbf102dce
2017-05-29 11:56:46 +00:00
Edwin Kempin
062c9aa512 RevisionApi: Add support to get commit
This change includes tests for the new API which increases the test
coverage for GetCommit from 25% to 94%.

Change-Id: I19457b47bc92f846446a2fc7d3a9127aeaae476d
Signed-off-by: Edwin Kempin <ekempin@google.com>
2017-05-29 11:42:44 +02:00
David Pursehouse
b2eb61e4f0 AbstractSubmitByMerge: Format with google-java-format
Change-Id: I8fdfa3d2fc7b8841d7a4358ee3f2c9ae055e6b92
2017-05-29 05:49:43 +00:00
Paladox none
797d4cc7ff PolyGerrit: If your account does not have a name use a default name
When you create an account with no name it is very hard to go to
settings to change the name as the dropdown will be hidden. Lets do
what gwtui does and provide a fake name so that dropdown works.

Change-Id: I7a6cb6fadff6e12f02611af4020781eb7191e0f6
2017-05-28 10:23:23 +00:00
David Pursehouse
d7a4075cb9 Merge branch 'stable-2.14'
* stable-2.14:
  PolyGerrit: Update docs on install nodejs 6
  Don't fail in loadJARs when there are no jar files to load
  Fix build failure with Bazel 0.5rc3.

Change-Id: I466935303024a33ea3d1ac4084b2b75f55450bea
2017-05-28 09:30:59 +09:00
Paladox none
9d00f8e216 PolyGerrit: Update docs on install nodejs 6
nodejs 4 is no longer supported in polymer.

See https://github.com/Polymer/web-component-tester/blob/master/CHANGELOG.md#600---2017-05-15

Which is causing failures for ci. Lets update to nodejs 6.

Change-Id: Ie0e314785e5672e9f557e63c76616d33f601fe24
(cherry picked from commit 722987a7ab91cb6848348a1f83ba5068e05e44c3)
2017-05-27 23:59:36 +00:00
Saša Živkov
e00456ca9e Don't fail in loadJARs when there are no jar files to load
The loadJARs method throws an exception if the class loader which
needs to be extended is not an URLClassLoader. However, there is
no reason to fail when there are not jars to load.

Change-Id: I263384af81e7af1e2e8d8e0a3aee428f029c9d35
(cherry picked from commit 027764a06cd2fd386909a5cd7b4b9d3c135fa94e)
2017-05-27 21:48:22 +00:00
Kasper Nilsson
cc363ed6f1 Merge "Use downloaded bower components in polylint_test.sh" 2017-05-27 00:38:13 +00:00
Kasper Nilsson
498d71adf7 Merge "Remove modifier pressed check for bracket key" 2017-05-27 00:38:02 +00:00
Wyatt Allen
1cf01b0744 Merge "Fix manual transpilation error" 2017-05-26 22:04:30 +00:00
Paladox none
180a8f5795 PolyGerrit: Remove blacklist for Repository Browser
This allow every other link appart from gitiles and gitweb to work.
This fixes it so gerrit-review should now work with links on the project
list.

Change-Id: I451aa352c80c59298f7373f7a6e9d04d53a5c398
2017-05-26 21:25:08 +00:00
Viktar Donich
eeb2d53331 Put horizontal scrolling on screen, take 3
Diff header scrolls with content and sticks to the top, too.
Doesn't scroll the footer horizontally with the header.

Bug: Issue 4491
Change-Id: I5d76aad38a7ae76c15528abcb572cf993f7f595e
2017-05-26 14:16:57 -07:00
Kasper Nilsson
caa93d2e16 Fix manual transpilation error
Also adds a regression test.

Bug: Issue 6315
Change-Id: Ib839834259085109ec297981bd99d6f48d36ce39
2017-05-26 20:33:48 +00:00
Kasper Nilsson
7f173f22bb Merge "Fix scroll bar added to gr-textarea when more content added" 2017-05-26 19:27:14 +00:00
Kasper Nilsson
eb07531a6d Remove modifier pressed check for bracket key
On Latin American keyboards, the square bracket cannot be typed without
a modifier. An added check to exit if modifiers are pressed meant that
the shortcut could thus not be used on these keyboards.

Instead, check only for the meta key to avoid overriding native Chrome
shortcuts in OSX.

Bug: Issue 6217
Change-Id: Ia737c4c411b73b2ba42fe5f33fff5082c488a5fb
2017-05-26 11:36:55 -07:00
Kasper Nilsson
dfc56184ce Merge "Refactor to allow usage of getKeyboardEvent in behavior" 2017-05-26 18:31:06 +00:00
Paladox none
2ea7f19aa8 PolyGerrit: Fix display of list to not go out of screen.
Also make description have a width to prevent the list from looking
ugly with big descriptions.

Change-Id: Ia9e0affe789e2ffc122519ced668084497f550f0
2017-05-26 17:37:48 +00:00
Becky Siegel
f8d42a0144 Fix scroll bar added to gr-textarea when more content added
2px of padding in iron-autogrow-textarea on the native textarea added an
unwanted scroll bar when content was taller than the original textarea.
Add 2px of padding on the iron-autogrow textarea in gr-textearea so that
the scrollbar does not appear.

http://imgur.com/a/5hMz9

Change-Id: I3a112af1859a4a9c0f8dc7febf6d11e418cd92a2
2017-05-26 10:06:49 -07:00
Becky Siegel
8b3e97f3c8 Fix next button on gr-admin-project-list
Previously, the logic assumed that the API request would fetch all
projects, not just the current page. In order to properly display the
next button, modify the API request to ask for one result than wanted,
but only display the original number desired. If the full amount + 1 is
returned, there should be a next button.

Change-Id: I67c6fb9cd6009220a1d9ac24fe4506bd6383428e
2017-05-26 09:59:32 -07:00
Han-Wen Nienhuys
9fff29bdef Fix build failure with Bazel 0.5rc3.
both method assertThat(Iterable<?>) in Truth and method <T>assertThat(T) in Truth match
  where T is a type-variable:
    T extends Comparable<?> declared in method <T>assertThat(T)

Change-Id: I8a938ace1917d867efd59c6e43ecaf8a7998dafc
(cherry picked from commit cb074f917f1d614681f92fcf26456c17c8da864e)
2017-05-26 16:43:14 +00:00
Viktar Donich
ab46e993ca Merge "Fix two issues with autocomplete dropdown" 2017-05-26 16:26:40 +00:00