| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: Ied3e6e63ea2d377448dce5d25686f7667b72a691
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|
|
|
|
| |
Change-Id: Ief1f6faeaca9ec819d0b6290610d93406443c4a3
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we started using change queries to implement the default links
I forgot to actually update the menus and keyboard bindings. They
kept using the old anchors and were relying on Dispatcher to rewrite
them to the new change query format.
Move them all over to use the change query anchor instead.
Change-Id: Ibc6e81560d0fc0b6db124e888c81619be49df936
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|
|
|
|
| |
Change-Id: I10278b915925092aa9b07194c6777b8678cbc6f5
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When I cherry-picked in this change I rewrote the comparator, and
messed up the ordering of the compare for the distance between two
regex patterns. We want the most specific first, and that would
have a lower distance from the reference name.
Bug: issue 650
Change-Id: I25331274a015b33e3be04ec11e3197750801176c
CC: Carlos Eduardo Baldacin
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In prior releases the owner: and reviewer: operators performed
substring searching to locate user accounts that match the argument,
and find all changes relevant to those accounts. Fix the operators
to perform that multiple-account searching again.
Bug: issue 646
Change-Id: Ie0d67ad15ddffa7d2d774466c42f84dc1a760f25
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|
|
|
|
|
|
|
|
|
|
| |
If the input string conforms to our username pattern, search the
username cache as it will be quicker than looking at the database
for a full name substring, and probably is going to match an account,
especially in small group settings where people know each other's
local usernames.
Change-Id: I827f59d9c0fc9ce5b515b9611561d718733036d2
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|
|
|
|
|
|
|
| |
This method doesn't do database lookups directly, so it doesn't
throw the exception from them.
Change-Id: I742435a6e6dd92b07d1dff9464d73f940e4b0509
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|
|
|
|
| |
Change-Id: I73d9beb4730a863fb2942e06973f89ee1c734356
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The merge thread was running ChangeMail to send out messages,
but that may need to run queries with the visibleto: predicate,
which incorrectly relied on the ChangeControl.Factory. Using the
GenericFactory instead permits us to get the ChangeControl for a
given user without needing a current user on the calling thread.
Change-Id: I9eb83b4f04665042182b37c4951966d1540248ff
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of usng a span with a click handler, use a proper anchor
tag so the browser will permit the user to focus onto the link for
"Google Account" or "Yahoo! Account" and activate the link with
the keyboard.
Change-Id: I49cb42d9eae2bd00a9666fba7526f34be629d676
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes an issue with rename detection computing the wrong number
of common blocks between files.
Change-Id: Ib0a03a9d93e267bba5fab2c4c8f5ce8335d6b10b
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Often, when creating a new gerrit project a gerrit admin
needs to create a new project owner group and setup an initial
set of group members. This was only possible from gerrit's Web UI
and was a realtively slow process compared to the easiness of
creating the project using the create-project ssh command.
This command makes it possible to create a new group, assign
group members, owner group and description via ssh.
Bug: issue 313
Change-Id: I9fbc013bd5e596f0b23e411ee0cc72d5f67b5f39
Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
|
|\ \
| | |
| | |
| | |
| | | |
* commons-net-20:
Drop Commons Net back to 2.0
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I45b362a7a8290ab34cc44ec638e35697d33a635c
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I69963e0824d1de23df6bf6786e5c589cb93f49d5
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This way we can set which version to copy the documentation files
from when setting up a new revision.
Change-Id: I0c9392e97b6c3da21500f173336e891ee3a91b76
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |/
|/|
| |
| |
| | |
Change-Id: I294c52e571a13798d94622469d87e979319f70ae
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If operators were used in the change query (e.g. "is:starred") its
weird for the user if we jump to the only matching record. Instead
we want to display a table of results, with the one record showing
so its clear there was only one match.
However we still want to direct link to a change if the user
enters a legacy id number from the URL, a newer-style Change-Id,
or a commit SHA-1 and only one change matched.
Change-Id: I6784a1d277fa1c1a991ca338f7dfae8569c1667c
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Search strings can get pretty long now that we have many operators
that are supported, and we use them for every change listing view
we support in the web UI. Widen the box out to 70 makes it more
likely that the entire query string will fit.
Change-Id: If855fa17ee700a85eb770c35715e1c6b51b3c934
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Similar to what we do with the project column, link the branch name
in the branch column to all changes that match that branch, and the
topic field to changes matching the topic.
Bug: issue 509
Change-Id: I9f7c4702c3dde1704ea5a935fcbea3e478108179
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of using the older "#project,merged,name" anchor for a
project link and rewriting it in the dispatcher, use the search
query link directly.
Change-Id: I27c3cfe54bbb35f5b6197fd504a22a53c21adf4b
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| | |
Change-Id: I3f4f579ac5f1a9b745c19f01bd5e03a6316f8585
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Create 2 new getters via refactoring: getSshHost() and
getEmailRegistrationToken() and use them in formatters.
Change-Id: I7f9bc24521b38222c80ed3f57fcbf8de032a6203
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the methods that were duplicated by accident in
ChangeEmail, and fix some access rights to those which
are now solely in OutoingEmail so that ChangeEmail can
still use them.
Change-Id: Iaf53b6314e0f57c84a6c99a7fe4fdb1deaf01f01
|
| |
| |
| |
| |
| |
| | |
If the Message-ID is not set to a specific regenerable string,
don't bother to set it since the smtp server will add the
header for us.
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Split OutgoingEmail into one class for basic OutgoingEmail,
and one class for emails related to changes: ChangeEmail.
This simplifies both classes and allows the registering
emails to not have to worry about changes.
Change-Id: I21811a961fb787af75547381a78e97d391e04e42
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There was some code duplication in these classes. This refactoring
removes the PatchScriptSettings and PrettySettings classes and uses
AccountDiffPreference instead.
Issue: bug 629
Change-Id: I57ab1522b0023503d0cbd29620236ea68b7717ed
Signed-off-by: Sasa Zivkov <zivkov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
* Fixes spurious pack corruption warnings during push.
* Fixes NPE during rename detection while viewing patches.
Change-Id: I7acdd96c36a26a6aacced65ed04e27f21e87b7c9
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the underlying source didn't abort at the result limit count we
have to clip it manually ourselves higher up in the query processor.
I failed to use the limit:N value and instead clipped with the
default, resulting in larger result sets for certain queries.
Change-Id: Ibc68dde8631788ffa1e2ea23266bb736280abc04
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| | |
Change-Id: Ifc93cc69f3f2f321e7da9e6ebbb1b70370621524
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For performance reasons we only permit the file: operator in the
watched project filters. We have the data on hand in memory for
formatting in the message, so its reasonably cheap to scan through
filters using the file operator. But doing it against a database
query is just too slow, odds are the file list isn't in the diff
cache and thus has to be computed on the fly. At 200ms up to as many
as 4 seconds per change, this is simply unacceptable performance.
Bug: issue 70
Change-Id: I15ceb262419132a32c828e4051853b15ab963876
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When searching for approvals we now double check that the user
who applied it to a patch set can still use the value stored.
If the permissions have changed, we retest based on the updated
permissions, potentially skipping the match.
Change-Id: Ia90c42405f6478a62c519b9fe80171c242b26984
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Any valid search string is now a valid filter expression or a
watched project. The only operator not supported here is the
is:watched operator, because that creates a recursive call that
would never succeed.
The change turned out far bigger than it should be due to the request
scope requirement for the query builder. We had to rearrange a lot
of code to ensure we always have the request scope available in order
to construct a query builder and execute the filter expressions.
Bug: issue 492
Change-Id: I199d9b215e000c049279cd8e86e7a36386fee0fb
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Define an SSH command that offers the ability to query for change
summary information. This provides the same information as a listing
on the web interface.
The query command is also available over HTTP under the /query URL,
with the query string supplied as the q parameter.
Bug: issue 504
Change-Id: I72fc11dc8872b781bcd6895b3bcd90d85f22e419
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If there are multiple limit operators in the same AND node,
pick the one with the smaller value as the rewritten result.
This way if a user puts "limit:5" in a search query we only
show them 5 results, even if their page size was bigger.
This however may break pagination in the web UI because we
don't detect the limit as the page size.
Change-Id: Id6e7494d7753f72ddaa9a5cfa4fda694bd540001
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The age operator looks for changes that have not been modified
within the argument. E.g. "age:3d" will find changes that haven't
been touched in the last 3 days.
This supports searching for stale changes that maybe need to be
considered for further action.
Change-Id: I35c843099aac7bb795613c5898e84ef0a60f91cc
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When we ask for the CurrentUser or IdentifiedUser in an SSH request we
kept pulling back some oddity off the SshSession that didn't have a
request scoped Provider<ReviewDb>. This meant that we couldn't get
access to database backed entities like the starred changes of the
user.
Recreate the identity object on the fly when its first asked for
within the command request scope. This way the Provider<ReviewDb> can
be bound and used as expected.
Change-Id: I141e9bf20a52596cfbbf859aa14403ceba164e73
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some of these are really meant for the query results more than
for the streaming event system, but its still good to dump out
the topic in either case.
Change-Id: I47e59458b22647210090d9ec3190eaf71c067f6e
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rather than throwing back an obtuse error about not being able to
execute a query string, add in the status:open and retry to plan the
query with the rewriter. It should succeed this time and give us a
data source that can actually evaluate. We assume status:open because
uses are primarily interested in the open changes when they enter a
query, and the set that is open is smaller than the set that is
closed. Users can also pretty quickly realize we are only showing
them open changes and modify their query if they needed to search
closed ones.
Change-Id: Ieaf78bde3201767eaeb973c015785413597e409a
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Because these need access to the CurrentUser in order to implement
the is:starred or is:visible operators they need to be request scope
and obtained on demand.
Change-Id: Id9f677744c6201176455b15320b8ce45edd75504
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rather than redirect to an old URL, and then display the same thing as
a query, just redirect to the query screen. While we are at it,
define /r/* to be any valid query, which opens up a lot of potential
for linking to different parts of Gerrit.
Change-Id: I93a43e5bfe2e7c3b766e8ba9a05cc1901a285920
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This way they aren't so tied up with the ChangeHookRunner itself,
and we can start to reuse them for a gerrit query implementation.
Change-Id: If531bc193e3569f7df626c303cc8dc54be237ee0
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
All of the change list pages have been rewritten in terms of the
new query operator implementation. If the query exactly matches
a particular navigation call, we use the same underlying function
to scan the database, which gives us about the same performance.
Rather than showing custom page titles, all of the change list pages
update the search bar and show the underlying query. This helps
users to learn what search operators Gerrit supports internally.
If the query has additional filter restrictions, we try to pick a
reasonable scan function to read from the database, but then use
filters inside of the JVM to whack out rows that do not match.
The scan function selection is based on a hand-coded cost based
query rewriter, which is really more of a rule based optimizer than
it is a cost based optimizer. Its rather horrible at picking a good
"query plan", but its good enough given the limitations of the gwtorm
access API that we can still do something reasonable for the user.
Because the query graph is stored in memory as a proper graph,
we may be able to later perform some optimization work where we
transform the graph into a proper SQL SELECT statement and hand
it off to the database server for execution. For most SQL systems
this would outperform what we do now.
Because the query rewriter edits the query, it may produce an invalid
result sometimes. Any old hand-coded search is correct, because the
rewriter just transforms to the same underlying function that we used
to have. More complex filters may still uncover bugs in the rewiter.
Some queries are simply not executable. For example, "is:reviewed"
won't execute, because we don't have a way to scan the database
along that dimension. The access method doesn't exist simply
because the result set would be too large to reasonably process.
The set of operators is still not complete. We should support
things like 'age:3d' to mean changes that were last modified more
than 3 days ago, but we don't yet. Doing so efficiently probably
requires converting the age specification into a sortKey and using
an existing scan operation along that column.
Queries once parsed into a predicate tree can be tested against a
single ChangeData object, to consider just that one change. This
will later be useful for more powerful project watch specifications,
or access control rules.
Bug: issue 259
Bug: issue 287
Bug: issue 239
Bug: issue 504
Change-Id: Ifdf7306bb362484c58df5785054fd9e43363aaa9
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
| |
| |
| |
| | |
Change-Id: Ifbb7fa4f8f19fad42909ccd3bee7f1bdd17bf83b
|