summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update 2.1.4 release notesv2.1.4-rc4v2.1.4Shawn O. Pearce2010-08-061-2/+18
| | | | | Change-Id: Ied3e6e63ea2d377448dce5d25686f7667b72a691 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Don't escape ':' as %253A in query anchorsShawn O. Pearce2010-08-061-2/+8
| | | | | Change-Id: Ief1f6faeaca9ec819d0b6290610d93406443c4a3 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Direct default links to queriesShawn O. Pearce2010-08-066-27/+17
| | | | | | | | | | | | 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>
* Update to JGit 0.8.4.89-ge2f5716Shawn O. Pearce2010-08-061-1/+1
| | | | | Change-Id: I10278b915925092aa9b07194c6777b8678cbc6f5 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix Levenshtein distance when sorting ref regexesShawn O. Pearce2010-08-041-1/+1
| | | | | | | | | | | | 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>
* Fix owner: search operator substring regressionv2.1.4-rc3Shawn O. Pearce2010-08-044-45/+146
| | | | | | | | | | | 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>
* Search username cache before database by nameShawn O. Pearce2010-08-041-4/+7
| | | | | | | | | | | 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>
* Remove unnecessary throws OrmException in AccountResolverShawn O. Pearce2010-08-041-1/+1
| | | | | | | | 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>
* Add Close button to OpenId dialogShawn O. Pearce2010-08-042-3/+19
| | | | | Change-Id: I73d9beb4730a863fb2942e06973f89ee1c734356 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix CurrentUser reference on merge threadShawn O. Pearce2010-08-042-4/+4
| | | | | | | | | | | 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>
* Merge "Make links in OpenId dialog focusable"Shawn O. Pearce2010-08-042-6/+16
|\
| * Make links in OpenId dialog focusableShawn O. Pearce2010-08-042-6/+16
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge "Update JGit to 0.8.4.88-ge64cb03"Shawn O. Pearce2010-08-041-1/+1
|\|
| * Update JGit to 0.8.4.88-ge64cb03Shawn O. Pearce2010-08-041-1/+1
| | | | | | | | | | | | | | | | 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>
* | Merge "Implemented ssh command create-group"Shawn Pearce2010-07-307-7/+216
|\ \ | |/ |/|
| * Implemented ssh command create-groupSasa Zivkov2010-07-307-7/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'commons-net-20'v2.1.4-rc2Shawn O. Pearce2010-07-291-1/+1
|\ \ | | | | | | | | | | | | * commons-net-20: Drop Commons Net back to 2.0
| * | Drop Commons Net back to 2.0v2.1.3.1Shawn O. Pearce2010-07-291-1/+1
| | | | | | | | | | | | | | | Change-Id: I45b362a7a8290ab34cc44ec638e35697d33a635c Signed-off-by: Shawn O. Pearce <sop@google.com>
* | | documentation: Cleanup dk.brics.automaton entry in licensesShawn O. Pearce2010-07-281-3/+3
| | | | | | | | | | | | | | | Change-Id: I69963e0824d1de23df6bf6786e5c589cb93f49d5 Signed-off-by: Shawn O. Pearce <sop@google.com>
* | | documentation: Use a variable to select the prior versionv2.1.4-rc1Shawn O. Pearce2010-07-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Add 2.1.4 to ReleaseNotes indexShawn O. Pearce2010-07-281-0/+1
| |/ |/| | | | | | | Change-Id: I294c52e571a13798d94622469d87e979319f70ae Signed-off-by: Shawn O. Pearce <sop@google.com>
* | Don't direct link to a change found by operatorsShawn O. Pearce2010-07-262-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Widen the search box to 70 charactersShawn O. Pearce2010-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | 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>
* | Make branch columns link to changes on that branchShawn O. Pearce2010-07-263-8/+92
| | | | | | | | | | | | | | | | | | | | 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>
* | Fix project links to be query linksShawn O. Pearce2010-07-265-31/+19
| | | | | | | | | | | | | | | | | | 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>
* | Draft 2.1.4 release notesv2.1.4-rc0Shawn O. Pearce2010-07-261-0/+209
| | | | | | | | | | Change-Id: I3f4f579ac5f1a9b745c19f01bd5e03a6316f8585 Signed-off-by: Shawn O. Pearce <sop@google.com>
* | Merge "Refactor complex logic out of formatters into getters."Shawn Pearce2010-07-233-26/+44
|\ \
| * | Refactor complex logic out of formatters into getters.Martin Fick2010-07-233-26/+44
| | | | | | | | | | | | | | | | | | | | | Create 2 new getters via refactoring: getSshHost() and getEmailRegistrationToken() and use them in formatters. Change-Id: I7f9bc24521b38222c80ed3f57fcbf8de032a6203
* | | Fix method duplication incurred when splitting OutgoingEmailMartin Fick2010-07-232-25/+2
|/ / | | | | | | | | | | | | | | | | 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
* | Don't bother setting Message-ID to a random string.Martin Fick2010-07-221-14/+0
| | | | | | | | | | | | 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.
* | Merge "Split OutgoingEmail into 2 classes"Shawn Pearce2010-07-229-390/+482
|\ \
| * | Split OutgoingEmail into 2 classesMartin Fick2010-07-229-390/+482
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Refactoring AccountDiffPreference vs PatchScriptSettings+PrettySettingsSasa Zivkov2010-07-2115-311/+131
|/ / | | | | | | | | | | | | | | | | | | 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>
* | Update JGit to 0.8.4.87-g395d236Shawn O. Pearce2010-07-201-1/+1
| | | | | | | | | | | | | | | | * 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>
* | query: Fix limit:N clauses on strange iteratorsShawn O. Pearce2010-07-192-2/+12
| | | | | | | | | | | | | | | | | | | | 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>
* | Fix unused import in MergedSenderShawn O. Pearce2010-07-191-1/+0
| | | | | | | | | | Change-Id: Ifc93cc69f3f2f321e7da9e6ebbb1b70370621524 Signed-off-by: Shawn O. Pearce <sop@google.com>
* | Allow file:^regex to match affected filesShawn O. Pearce2010-07-198-6/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Validate scores before matching results in label queriesShawn O. Pearce2010-07-198-40/+125
| | | | | | | | | | | | | | | | | | | | 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>
* | Allow watching specific branches or any other search queryShawn O. Pearce2010-07-1946-431/+905
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | gerrit query SSH commandShawn O. Pearce2010-07-1920-67/+1020
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Always use the smallest limit: in a queryShawn O. Pearce2010-07-191-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Add age: operator to change queriesShawn O. Pearce2010-07-197-9/+145
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fix SSH based CurrentUser to know what the database isShawn O. Pearce2010-07-192-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Add topic, lastUpdated, sortKey to ChangeAttributeShawn O. Pearce2010-07-193-0/+13
| | | | | | | | | | | | | | | | | | 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>
* | Assume status:open if the query isn't executableShawn O. Pearce2010-07-192-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Make query parser and rewriter request scopedShawn O. Pearce2010-07-194-10/+19
| | | | | | | | | | | | | | | | | | 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>
* | Make static links use query redirectsShawn O. Pearce2010-07-181-6/+17
| | | | | | | | | | | | | | | | | | | | 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>
* | Move stream-event JSON objects to a common packageShawn O. Pearce2010-07-1814-147/+327
| | | | | | | | | | | | | | | | 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>
* | Implement full query operatorsShawn O. Pearce2010-07-1774-1275/+4776
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Bump GWT and slf4j versionAnatol Pomazau2010-07-161-2/+2
| | | | | | | | Change-Id: Ifbb7fa4f8f19fad42909ccd3bee7f1bdd17bf83b