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>
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
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>
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>
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>
* 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
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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
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>
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>