Commit Graph

483 Commits

Author SHA1 Message Date
Ian Wienand 234ed85a92 Retire repo
Change-Id: I7d68f82c75cbc4dc7e843198593846e19cf88f14
2022-04-05 13:20:00 +10:00
James E. Blair 1e35b2096f Add OpenID SSO support. Configuring OPENID_SSO in gerrit.config
will allow the admin to specify an SSO entry point URL so that
users clicking on "Sign In" are sent directly to that URL.
2011-07-22 23:27:06 +00:00
Shawn Pearce 045b76c6d6 Merge "Implement multiple branches in ls-project" 2011-06-07 09:50:09 -07:00
Shawn O. Pearce 106e5b7b00 Merge branch 'stable'
* stable:
  Update 2.1.7 release notes
  ExportReviewNotes: Default to 2 threads

Change-Id: Icc576083ec6ffa5cbbe5163ab34b8c843dc3ab66
2011-05-31 10:13:41 -07:00
Shawn O. Pearce bf9d9ed987 ExportReviewNotes: Default to 2 threads
Not all systems have enough database connections in the connection
pool to support 2 threads per CPU. Exporting lots of changes doesn't
take that long, so 2 threads is acceptable.

Change-Id: I69bbade7f67023689ca54665833bc764d2d5503d
Signed-off-by: Shawn O. Pearce <sop@google.com>
2011-05-31 09:52:46 -07:00
Shawn O. Pearce b645c639fc Merge branch 'stable'
* stable:
  Escape spaces in HTTP URLs during replication
  Invert signed-in and signed-out background colors
2011-05-27 15:51:03 -07:00
Anatol Pomazau 3739569aad Implement multiple branches in ls-project
Allow users request SHA1 of multiple branches per command:

$ ssh -p 29418 review.example.com gerrit ls-projects -b eclair -b gingerbread

In case if a branch is not visible or does not exists then stub is shown. Here is
a sample of the command output:

---------------------------------------- d8a9e45c7ec6ff97b44fdbd0b21cabdb69f5f15b foo
---------------------------------------- 87e4297f8f508e9b73863b27c25a551a4d4b5ed5 bar
a7e9587229246f6eb876795bc45a09c17b3bed51 862b2ce84f38e93a50d29510e713475f11228b28 baz
405cd3f5d7df7bae701b313dad9ce2ef797eb754 6a7eb2f0c885d03320b58afb662ee4fc14659063 hello
---------------------------------------- 782effdaeba782a656f799c9584dcc82fbfb7fa7 world
b8240b951de6c03f72278dd3d7790c2355878197 e8099cc12a3b64aa4e58b319e61f0190e27bd3ac kext

Change-Id: Ib05a6fc770ed0b70a3c180b2a41bec5e95a7117b
2011-05-24 11:14:03 -07:00
Shawn O. Pearce 9ca8ae3eca Invert signed-in and signed-out background colors
Most users work in the signed-in mode when reading source files
during review. Using the white background makes it easier to read
the text, especially with syntax coloring enabled.

Change-Id: If49aa62c0ff26971c64fd75505265c58ac859062
Signed-off-by: Shawn O. Pearce <sop@google.com>
2011-05-24 08:28:40 -07:00
Shawn O. Pearce b7ebfe1d90 Merge "Automatically check for refs/meta/config changes" 2011-05-20 17:50:49 -07:00
Shawn O. Pearce b8e4e35949 Automatically check for refs/meta/config changes
Periodically check a project's refs/meta/config for modifications
made outside of Gerrit Code Review.  This ensures slave servers will
eventually pick up new access controls or project settings without
requiring administrators to flush the "projects" cache over SSH.

Checks are done only every cache.projects.checkFrequency period, as a
local disk check requires at least one stat() call to examine the
loose reference's last modified time. This is relatively inexpensive
for a single project request like git clone, but not feasible for
multiple project lookups like a query results page or user dashboard.

To prevent many calls to System.currentTimeMillis() a background
thread (managed by Executors.newScheduledThreadPool) is used to update
a generation flag every checkFrequency period. During a cache get the
ProjectState rechecks its refs/meta/config if the generation does not
match, and gets replaced if there were changes.

Bug: issue 962
Change-Id: I9ad4db27329968e2993b4dd142d1325446190065
Signed-off-by: Shawn O. Pearce <sop@google.com>
2011-05-20 17:48:38 -07:00
Shawn O. Pearce b352fc6c5e Merge branch 'stable'
* stable:
  Fix SLF4J StaticLoggerBinder warning
  ExportReviewNotes: Dump submitted changes to refs/notes/review

Conflicts:
	gerrit-server/src/main/java/com/google/gerrit/server/git/CreateCodeReviewNotes.java

Change-Id: I147ba04af6d8af4177dcdd94d55e8b1c7d9b10e9
2011-05-20 17:02:49 -07:00
Shawn O. Pearce 1b8810f411 ExportReviewNotes: Dump submitted changes to refs/notes/review
This program allows site administrators to dump their existing notes
out to the refs/notes/review branch, making the prior data available
to Git clients.

Change-Id: Iebaf1e4b2fb4620443e80d2a8f840cb30ae1e389
Signed-off-by: Shawn O. Pearce <sop@google.com>
2011-05-20 14:44:28 -07:00
Shawn O. Pearce 0bfcc2181c Merge branch 'stable'
* stable:
  Support different color pallete when not signed in
  Send new patchset event after its available
  Enable git:// download URLs if canonicalGitUrl set
  Fix NPE on Gerrit startup if mail.from doesn't include a name
  Add config setting to only suggest users which are in a visible group

Change-Id: I2bc9ca40e616c7f7b0c12de41f631c916439289c
2011-05-20 11:43:43 -07:00
Shawn O. Pearce a83bb1c344 Support different color pallete when not signed in
If the user is not signed in a different theme of colors can be
applied to the UI, making it more obvious that login is necessary.

Bug: issue 913
Change-Id: Id8c780042740b3b93dcee7ed84b3f9f6be06d9de
Signed-off-by: Shawn O. Pearce <sop@google.com>
2011-05-20 09:45:27 -07:00
Edwin Kempin 4248881072 Add config setting to only suggest users which are in a visible group
Add a new setting for the suggest section in the Gerrit configuration
that limits the suggested users to those which are in at least one
group that is visible to the current user.

Change-Id: I89654bfdf63e2b780c5e0c93ee54b14afc1640a0
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2011-05-20 03:11:43 +02:00
Shawn O. Pearce a56d834d2b Move "projects" table into Git
Project settings are now saved in the project.config file of the
refs/meta/config branch within each Git repository.  This offers
us free version control over the lifespan of the project, and will
help reduce schema version issues as the configuration file is
more free-form.

Project owners can edit the configuration of their project by
hand and push the results back up, possibly even going through
code review, if the proper access rules are assigned in the
project's access panel.  Project users can inspect the history of
the configuration by reading the history of the refs/meta/config
branch with their favorite history browser.

Change-Id: Id63414d86dbfb9033021f76e1d5e782373525a77
Signed-off-by: Shawn O. Pearce <sop@google.com>
2011-05-19 16:53:02 -07:00
Shawn O. Pearce 89cefced8d Remove the GitProjectImporter
Since projects are listed by recursively walking the filesystem,
we don't need to import them into the database.

Change-Id: I86613ac34a9c0ac68ba82b70b2c0312f877a8e69
Signed-off-by: Shawn O. Pearce <sop@google.com>
2011-05-19 16:53:01 -07:00
Shawn Pearce 7ee84a14ca Merge "Documenting when different regexp libraries are used" into stable 2011-05-19 12:21:42 -07:00
Magnus Bäck e56118329b Documenting when different regexp libraries are used
The documentation hasn't been clear on which regular expression
implementations were used when e.g. interpreting different
configuration variables. In trivial cases this doesn't matter
as most regular expression metacharacters are widely supported,
but for complex expressions it can be beneficial to know.

Change-Id: I2a479aba68779cf857dac9999bc4a90ac2685838
2011-05-19 10:54:39 -07:00
Shawn O. Pearce 71ae872238 Update openid4java to 0.9.6
Change-Id: I05b21ca4f2ee75fc0e3ec789712f7314c7fd1cda
Signed-off-by: Shawn O. Pearce <sop@google.com>
2011-05-15 18:03:07 -07:00
Shawn O. Pearce d6296556c6 Move SSH command creation off NioProcessors
Creating an SSH command for an incoming user request may require
looking up group information in LDAP if the user's groups are not hot
in the cache. This can take some time and may temporarily block an
NioProcessor thread preventing network IO from occurring for other
active user sessions.

Shift command creation onto a background work queue that only does
command construction for incoming requests. This way active commands
are not blocked by LDAP group lookups.

Two threads are used to try and avoid a single LDAP lookup from
blocking all new command creation on the server.

Change-Id: I1b49a836ba3443a9a85c29b7e3156558ca34ac47
Signed-off-by: Shawn O. Pearce <sop@google.com>
2011-05-15 14:19:19 -07:00
Shawn O. Pearce 7929d874a0 Support HTTP authentication for replication
Gerrit now supports HTTP Basic and Digest authentication when
a remote http:// URL is configured for replication.  The password
can be supplied by secure.config.

Change-Id: Id1277ba8d9a8653f1b2f94d8b5fe94323623c5c5
Signed-off-by: Shawn O. Pearce <sop@google.com>
2011-05-15 13:34:28 -07:00
Shawn Pearce efc81b8ea4 Merge "Fix formatting issues in error documentation" 2011-05-14 16:54:31 -07:00
Edwin Kempin ddfc41abb1 Fix formatting issues in error documentation
Most of the bulleted and numbered list in the error documentation
were incorrectly formatted.

Change-Id: Ib3ef44427c97dd8ed68b28414d477df372330a54
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2011-05-06 10:32:05 +02:00
Edwin Kempin 913eab173a Fix broken links in error documentation
Change-Id: Iad5799c0622ee400593a82543a81a6813112dcd3
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2011-05-06 08:18:24 +02:00
Shawn O. Pearce 07bd6fbd26 Use suggest.accounts to control user completion suggestions
Sites may not want to show all users when completing.  Enable
two other alternatives: OFF shows nothing, SAME_GROUP requires
them to have a common group.

Change-Id: I50fc4c7c37c4197351ac537123d93083e8ff73d2
Signed-off-by: Shawn O. Pearce <sop@google.com>
2011-04-29 19:15:47 -07:00
Piotr Sikora 2e6a4ae7b2 "Better" nginx configuration.
1) Use "review" subdomain instead of "reviews" to be consistent with
   rest of the documentation.
2) Remove "/r/" from proxy_pass, because it isn't needed.
3) Remove "X-Real-IP" header, because it's ignored by Jetty anyway.
4) Use $remote_addr in "X-Forwarder-For". $proxy_add_x_forwarded_for
   isn't secure, because it is based on client's input and should be
   used only internally in proxy chains and not on the edge.
5) Use $host variable instead of $http_host, to make it work with
   HTTP/1.0 requests.

Change-Id: I01755e860e32f67469091b4f2b8368ee9a2cea89
Signed-off-by: Piotr Sikora <piotr.sikora@frickle.com>
2011-04-21 17:47:43 +00:00
Francois Marier 624f447d4c Document reverse proxy setups using Nginx
Nginx can also be used in front of Gerrit with or without SSL.

Thanks to this thread for the Nginx settings:

http://groups.google.com/group/repo-discuss/browse_thread/thread/a935e3a2b8e6b228

Bug: issue 905
Change-Id: Iaf4b646e7ffb149b58f428fdd27158200f47460d
Signed-off-by: Francois Marier <francois@debian.org>
2011-04-13 16:07:06 +12:00
Francois Marier d550b46eb8 Documentation: rename "Apache 2 Reverse Proxy"
This will allow users of different web servers to contribute
instructions for non-Apache web daemons.

Change-Id: I94763a428c109c0106e7bef40da1179fa7284165
Signed-off-by: Francois Marier <francois@debian.org>
2011-04-13 14:30:20 +12:00
Shawn O. Pearce ac66dfa4c6 Merge "documentation: Update system scaling data" 2011-04-12 19:02:16 -07:00
Shawn Pearce 5c9cead9e6 Merge "Document change set dependencies and cherry-pick" 2011-04-11 21:21:24 -07:00
Shawn O. Pearce 0825581d88 documentation: Update system scaling data
Change-Id: I7ac6bb8e5330d99a2e946c195930b1d3453167cd
Signed-off-by: Shawn O. Pearce <sop@google.com>
2011-04-12 00:17:12 -04:00
Francois Marier 8748e5e159 Document change set dependencies and cherry-pick
Add a note about dependencies being ignored in cherry-pick mode
to help project administrators choose the right submit action.

This is based on a mailing list discussion:

  http://groups.google.com/group/repo-discuss/browse_thread/thread/aa53fe63197183af

Change-Id: I4131c0fe8725ffc5ccbf0a0f16053665a7a5b50b
Signed-off-by: Francois Marier <francois@debian.org>
2011-04-12 16:07:25 +12:00
Shawn O. Pearce f0cfe53650 documentation: Document cache.diff_intraline
This cache was added in an earlier version of Gerrit, but was not
covered in the documentation.

Change-Id: Iec90f07449d50b9033c4925c1b3f372c5aea1cf7
Signed-off-by: Shawn O. Pearce <sop@google.com>
2011-04-11 23:40:06 -04:00
Matt Fischer 620255aef7 Added support for included groups
This change adds a new item to the group configuration: a list of
groups whose members should be included in this one.  This makes it
possible to set up a hierarchy of included groups, which can make it
easier to maintain complex access control lists.

To accomplish this, two new database tables were added,
called AccountGroupIncludes and AccountGroupIncludesAudit.
The relevant support code was added around them, largely based on
the existing code for handling indivdual account membership.  In
addition, caches for group information were added, paralleling the
caches that already exist for accounts.

Change-Id: Ib6990c17739f28f38bc13961143db7ce79251567
2011-04-11 15:02:15 -04:00
Shawn Pearce eab5103ff2 Merge "Added explanation for "non-fast forward" error" 2011-04-11 08:18:03 -07:00
Edwin Kempin 19433418f7 Added explanation for "you are not allowed to upload merges" error
Change-Id: I326dd2674ea893e09707ecf43e4f8d9f4cf906a0
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2011-04-11 13:29:47 +02:00
Shawn Pearce 513283a533 Merge "Add ownerin and reviewerin search predicates" 2011-04-08 13:24:23 -07:00
Shawn Pearce d9292dfeb8 Merge "Add alternative URL for Gerrit's managed Gitweb." 2011-04-08 13:22:02 -07:00
Piotr Sikora 6a9d47edb1 Add alternative URL for Gerrit's managed Gitweb.
This patch allows configuration of alternative base URL for:
- "(gitweb)" links in Gerrit,
- all links in Gerrit's managed Gitweb.

Please note that this changes only URL of the links and not real URL
under which Gerrit's managed Gitweb is served ("<gerrit>/gitweb").
This means that this feature is useful only in setups with front-end
web servers.

To enable this feature, set both: gitweb.cgi and gitweb.url.

Change-Id: I869e2c0e151deb0e0248ed86b9611e1e5ac7e431
Signed-off-by: Piotr Sikora <piotr.sikora@frickle.com>
2011-04-08 19:19:49 +00:00
Martin Fick bcb5b9b4d2 Add ownerin and reviewerin search predicates
These predicates make it possible to search for changes
which are owned or reviewed by users in a specific group.

Bug: issue 722
Change-Id: Ibc60a4e9345f7425d449f4bdaa611184986405eb
2011-04-08 11:11:08 -06:00
Shawn Pearce bbafdfa02f Merge "Added explanation for "contains banned commit" error" 2011-04-08 10:04:41 -07:00
Edwin Kempin b2e42c8c0f Fix spelling mistake in user-upload documentation
Change-Id: Id1b372d8e54d8d57fe02ca678cca94e755b85484
Signed-off-by: Edwin Kempin <edwin.kempin@gmail.com>
2011-04-08 11:38:31 +02:00
Edwin Kempin fffa3dfaff Added explanation for "contains banned commit" error
Added a documentation page that explains the
"contains banned commit ..." error in details.

Change-Id: Ie574a0cf84be5d97d11c2eaee3cabbcf759c3ce3
Signed-off-by: Edwin Kempin <edwin.kempin@gmail.com>
2011-04-08 11:00:40 +02:00
Shawn Pearce 94f52d2875 Merge "Performs a project name substring search." 2011-04-07 19:57:55 -07:00
Shawn Pearce 278f317f6f Merge "Add adminUrl to replication for repository creation" 2011-04-07 19:43:55 -07:00
Shawn Pearce 4b4d78a45a Merge "Add control over attributes of the authentication cookie." 2011-04-07 19:38:37 -07:00
Shawn Pearce 44b0426e72 Merge "Added explanation for "not Signed-off-by" error" 2011-04-07 19:35:56 -07:00
Piotr Sikora 7cec2f8128 Add control over attributes of the authentication cookie.
auth.cookiePath:
Sets "path" attribute of the cookie. This settings allows for more
complex Gerrit/Gitweb setups, such as:
- /review/ - Gerrit,
- / - Gitweb (managed by Gerrit).

auth.cookieSecure:
Sets "secure" flag of the cookie. Without this flag, clients accessing
HTTP site (even if it's only redirecting to HTTPS) are susceptible to
eavesdropping.

Change-Id: I4f2d4514d7995894fd2ae69a3e3280c676219c51
Signed-off-by: Piotr Sikora <piotr.sikora@frickle.com>
2011-04-08 02:31:35 +00:00
Shawn Pearce 761fbb668e Merge "Added explanation for "no changes made" error" 2011-04-07 19:29:01 -07:00