blob: 2c14fa13d8ce6384bec7dc8caf6d0c020d73988a [file] [log] [blame]
Martin Fick95092702011-12-22 14:46:33 -07001Release notes for Gerrit 2.2.2
2==============================
3
4Gerrit 2.2.2 is now available:
5
6link:http://code.google.com/p/gerrit/downloads/detail?name=gerrit-2.2.2.war[http://code.google.com/p/gerrit/downloads/detail?name=gerrit-2.2.2.war]
7
8Schema Change
9-------------
10*WARNING:* This release contains schema changes. To upgrade:
11----
12 java -jar gerrit.war init -d site_path
13----
14
15*WARNING:* Upgrading to 2.2.x requires the server be first upgraded
16to 2.1.7 (or a later 2.1.x version), and then to 2.2.x.
17
18New Features
19------------
20
21Prolog
22~~~~~~
23* issue 971 Use Prolog Cafe for ChangeControl.canSubmit()
24
25* Add per-project prolog submit rule files
26+
27When loading the prolog environment, now checks refs/meta/config
28branch for a file called rules.pl. If it exists, consult the
29file. Expects a predicate called submit_rule. If no file is found,
30uses the default_submit predicate in common_rules.pl.
31
32* Add inheritance of prolog rules
33+
34Projects now inherit the prolog rules defined in their parent
35project. Submit results from the child project are filtered by the
Magnus Bäckc392e3c2012-03-27 09:52:19 -040036parent project using the filter predicate defined in the parent's
Martin Fick95092702011-12-22 14:46:33 -070037rules.pl. The results of the filtering are then passed up to the
38parent's parent and filtered, repeating this process up to the top
39level All-Projects.
40
41* Load precompiled prolog rules from jar file
42+
43Looks in (site)/cache/rules for a jar file called:
44 rules-(sha1 of rules.pl).jar
45Loads the precompiled prolog rules and uses them instead of
46consulting rules.pl. If the jar does not exist, consults rules.pl.
47If rules.pl does not exist, uses the default submit rules.
48
49* Cmd line tool rulec to compile jar from prolog
50+
51Rulec takes rules.pl from the refs/meta/config branch and creates a
52jar file named rules-(sha1 of rules.pl).jar in (sitepath)/cache/rules.
53Generates temporary prolog, java src, and class files which are
54deleted afterwards.
55
56* prolog-shell: Simple command line Prolog interpreter
57+
58Define a small interactive interpreter that users or site
Magnus Bäckc392e3c2012-03-27 09:52:19 -040059administrators can play around with by downloading the Gerrit WAR
Martin Fick95092702011-12-22 14:46:33 -070060file and executing: java -jar gerrit.war prolog-shell
61
62Prolog Predicates
63^^^^^^^^^^^^^^^^^
64* Add Prolog Predicates to check commit messages and edits
65+
66commit_message returns the commit message as a symbol.
67+
68commit_message_matches takes in a regex pattern and checks it against
69the commit message.
70+
71commit_edits takes in a regex pattern for filenames and a regex
72pattern for edits. For all files in a commit that match the filename
73regex. Returns true if the edits in any of those files match the
74edit regex.
75
76* Add Prolog Predicates to expose commit filelist
77+
78commit_delta/1,3,4 each takes a regular expression and matches it to
79the path of all the files in the latest patchset of a commit.
80If applicable (changes where the file is renamed or copied), the
81regex is also checked against the old path.
82+
83commit_delta/1 returns true if any files match the regex
84+
85commit_delta/3 returns the changetype and path, if the changetype is
86renamed, it also returns the old path. If the changetype is rename,
87it returns a delete for oldpath and an add for newpath. If the
88changetype is copy, an add is returned along with newpath.
89+
90commit_delta/4 returns the changetype, new path, and old path
91 (if applicable).
92
93* Add Prolog predicates that expose the branch, owner,
94project, and topic of a change, the author and committer of the most
95recent patchset in the change, and who is the current user.
96
97* For user-related predicates, if the user is not a gerrit user, will
98return user(anonymous) or similar. Author and committer predicates
99for commits return user(id), name, and email.
100
101* Make max_with_block/4 public
102+
103This is the current rule generally applied to a label function. Make
104it exportable for now until we can come back and clean up the legacy
105approval data code.
106
107Web
108~~~
109
110* Support in Firefox delete key in NpIntTextBox
111+
112Pressing the delete key while being in a NpIntTextBox (e.g. in the
113text box for the Tab Width or Columns preference when comparing a
114file) now works in Firefox.
115
116* Make sure special keys work in text fields
117+
118There is a bug in gwt 2.1.0 that prevents pressing special keys like
119Enter, Backspace etc. from being properly recognized and so they have no effect.
120
121ChangeScreen
122^^^^^^^^^^^^
123* issue 855 Indicate outdated dependencies on the ChangeScreen
124+
125If a change dependency is no longer the latest patchSet for that
126change, mark it OUTDATED in the dependencies table and make
127its row red, and add a warning message to the dependencies
128header, also keep the dependencies disclosure panel open
129even when an outdated dependent change is merged.
130Additionally make the link for dependencies link to the
131exact patchSet of the dependent change.
132
133* issue 881 Allow adding groups as reviewer
134+
135On the ChangeScreen it is now possible to add a group as reviewer for
136a change. When a group is added as reviewer the group is resolved and
137all its members are added as reviewers to the change.
138
139* Update approvals in web UI to adapt to rules.pl submit_rule
140+
141The UI now shows whatever the results of the submit_rule are, which
142permits the submit_rule to make an ApprovalCategory optional, or to
143make a new label required.
144
145Diff Screen
146^^^^^^^^^^^
147* Add top level menus for a new PatchScreen header
148+
149Modify the PatchScreen so that the header contents is selectable
150using top level menus. Allow the header to display the commit
151message, the preferences, the Patch Sets, or the File List.
152
153* Add SideBySide and Unified links to Differences top level menus
154+
155These new menu entries allow a user to switch view types easily
156without returning to the ChangeScreen. Also, they double as a
157way to hide the header on the PatchScreen (when clicking on the
158currently displayed type).
159
160* Add user pref to retain PatchScreen Header when changing files
161
162* Flip the orientation of PatchHistory Table
163
164* Remove the 'Change SHA1:' from the PatchScreen title
165
166* Remove scrollbar from Commit Message
167
168* Allow comment editing with single click on line numbers
169+
170Make it easier to comment (and now possible on android devices which
171zoom on double click) on a patch by simply clicking on the line number.
172
173* Add a "Save" button to the PatchScriptSettingsPanel
174+
David Pursehouse4d7ac772013-06-25 17:14:30 +0900175The "Update" button now only updates the display. Additionally,
Martin Fick95092702011-12-22 14:46:33 -0700176for logged in users, a "Save" button now behaves the way that
177"Update" used to behave for logged in users.
178
179* issue 665 Display merge changes as differences from automatic result
180+
181Instead of displaying nothing for a two-parent merge commit, compute
182the automatic merge result and display the difference between the
183automatic result that Git would create, and the actual result that
184was uploaded by the author/committer of the merge.
185
186Groups
187^^^^^^
188* Add menu to AccountGroupScreen
189+
190This change introduces a menu in the AccountGroupScreen and
191different screens for subsets of the functionality (similar as it's
192done for the ProjectScreen). Links from other screens to the
193AccountGroupScreen are resolved depending on the group type.
194
195* Display groupUUID on AccountGroupInfoScreen
196+
197To assign a privilege to a new group by editing the
198'project.config' file, the new group needs to be added to the
199'groups' file in the 'refs/meta/config' branch which requires
200the UUID of the group to be known.
201
202Project Access
203^^^^^^^^^^^^^^
204* Automatically add new rule when adding new permission
205+
206If a new permission was added to a block, immediately create the new
207group entry box and focus it, so the user can assign the permission.
208
209* Only show Exclusive checkbox on reference sections
210+
211In the access editor, hide the Exclusive checkbox on the
212Global Capabilities section since it has no inheritance and
213the exclusive bit isn't supported.
214
215* Disable editing after successful save of Access screen
216+
217When the access has been successfully modified for a project,
218switch back to the "read-only" view where the widgets are all
219disabled and the Edit button is enabled.
220
221Project Branches
222^^^^^^^^^^^^^^^^
223* Display refs/meta/config branch on ProjectBranchesScreen
224+
225The new refs/meta/config branch was not shown in the ProjectBranchesScreen.
226Since refs/meta/config is not just any branch, but has a special
227meaning to Gerrit it is now displayed at the top below HEAD.
228
229* Highlight HEAD and refs/meta/config
230+
231Since HEAD and refs/meta/config do not represent ordinary branches,
232highlight their rows with a special style in the ProjectBranchesScreen.
233
234URLs
235^^^^
236* Modernize URLs to be shorter and consistent
237+
238Instead of http://site/#change,1234 we now use a slightly more
239common looking http://site/#/c/1234 URL to link to a change.
240+
241Files within a patch set are now denoted below the change, as in
242http://site/#/c/1234/1/src/module/foo.c
243+
244Also fix the dynamic redirects of http://site/1234
245and http://site/r/deadbeef to jump directly to the corresponding
246change if there is exactly one possible URL.
247+
248Entities that have multiple views suffix the URL with ",view-name"
249to indicate which view the user wants to see.
250
251* issue 1018 Accept ~ in linkify() URLs
252
253SSH
254~~~
255* Added a set-reviewers ssh command
256
257* Support removing more than one reviewer at once
258+
259This way we can batch delete reviewers from a change.
260
261* issue 881 Support adding groups as reviewer by SSH command
262+
263With the set-reviewers SSH command it is now possible to also add
264groups as reviewer for a change.
265
266* Fail review command for changing labels when change is closed
267+
268If a reviewer attempts to change a review label (approval) after a
269change is closed using the ssh review command, cause it to fail the
270command and output a message.
271
272* ls-projects: Fix display of All-Projects under --tree
273+
274Everything should be nested below All-Projects, since that is actually
275the root level.
276
277* ls-projects: Add --type to filter by project type
278+
279ls-projects now supports --type code|permissions|all. The default is
280code which now skips permissions only projects, restoring the output
281to what appears from Gerrit 2.1.7 and earlier.
282
283* show-caches: Improve memory reporting
284+
285Change the way memory is reported to show the actual values,
286and the equation that determines how these are put together
287to form the current usage. Include some additional data including
288server version, current time, process uptime, active SSH
289connections, and tasks in the task queue. The --show-jvm option
290will report additional data about the JVM, and tell the caller
291where it is running.
292
293Queries
294^^^^^^^
295* Output patchset creation date for 'query' command.
296
297* issue 1053 Support comments option in query command
298+
299Query SSH command will show all comments if option --comments is
300used. If --comments is used together with --patch-sets all inline
301comments are included in the output.
302
303Config
304~~~~~~
305* Move batch user priority to a capability
306+
307Instead of using a magical group, use a special capability to
308denote users that should get the batch priority behavior.
309
310* issue 742 Make administrator, create-project a global capability
311+
312This gets rid of the special entries in system_config and
313gerrit.config related to who the Administrators group is,
314or which groups are permitted to create new projects on
315this server.
316
317* issue 48 & 742 Add fine-grained capabilities for administrative actions
318+
319The Global Capabilities section in All-Projects can now be used to
320grant subcommands that are available over SSH and were previously
321restricted to only Administrators.
322
323* Disallow project names ending in "/"
324
325* issue 934 query: Enable configurable result limit
326+
327Allow site administrators to configure the query limit for user to be
328above the default hard-coded value of 500 by adding a global
329[capability] block to All-Projects project.config file with group(s)
330that should have different limits.
331
332* Introduced a new PermissionRule.Action: BLOCK.
333+
334Besides already existing ALLOW and DENY actions this change
335introduces the BLOCK action in order to enable blocking some
336permission rules globally.
337
338* issue 813 Use remote.name.replicatePermissions to hide permissions
339+
340Administrators can now disable replication of permissions-only
341projects and the per-project refs/meta/config in replication.config
342by setting the replicatePermissions field to false.
343
344* Add a Restored.vm template and use it.
345+
346The restore action has been erroneously using the Abandoned.vm
347template. Create a template and sender for the restorecommand.
348
349* sshd.advertisedAddress: specify the displayed SSH host/port
350+
351This allows aliases which redirect to gerrit's ssh port (say
352from port 22) to be setup and advertised to users.
353
354Dev
355~~~
356* Updated eclipse settings for 3.7 and m2e 1.0
357
358* Fix build in m2eclipse 1.0
359+
360Ignore the antrun and the build-helper-maven-plugin tasks in m2eclipse.
361
362* Make Gerrit with gwt 2.3.0 run in gwtdebug mode
363
364* Fix a number of build warnings that have crept in
365
366* Accept email address automatically
367+
368Enable Gerrit to accept email address automatically in
369"DEVELOPMENT_BECOME_ANY_ACCOUNT" mode without a confirmation email.
370
371* Added clickable user names at the BecomeAnyAccountLoginServlet.
372+
373The first 5 (by accountId) user names are displayed as clickable
374links. Clicking a user name logs in as this user, speeding up
375switching between different users when using the
376DEVELOPMENT_BECOME_ANY_ACCOUNT authentication type.
377
378Miscellaneous
379~~~~~~~~~~~~~
380* Permit adding reviewers to closed changes
381+
382Permit adding a reviewer to closed changes to support post-submit
383discussion threads.
384
385* issue 805 Don't check for multiple change-ids when pushing directly
386to refs/heads.
387
388* Avoid costly findMergedInto during push to refs/for/*
389+
390No longer close a change when a commit is pushed to res/for/* and the
391Change-Id in the commit message footer matches another commit on an
392existing branch or tag.
393
394* Allow serving static files in subdirectories
395
396* issue 1019 Normalize OpenID URLs with http:// prefix
397+
398No longer violate OpenID 1.1 and 2.0, both of which require
399OpenIDs to be normalized (http:// added).
400
401* Allow container-based authentication for git over http
402+
403Gerrit was insisting on DIGEST authentication when doing git over
404http. A new boolean configuration parameter auth.trustContainerAuth
405allows gerrit to be configured to trust the container to do the
406authentication.
407
408* issue 848 Add rpc method for GerritConfig
409+
410Exposes what types of reviews are possible via json rpc, so that the
411Eclipse Reviews plugin currently can parse the javascript from a
412gerrit page load.
413
414
415Performance
416-----------
417* Bumped Brics version to 1.11.8
418+
419This Brics version fixes a performance issue in some larger Gerrit systems.
420
421* Add permission_sort cache to remember sort orderings
422+
423Cache the order AccessSections should be sorted in, making any future
424sorting for the same reference name and same set of section patterns
425cheaper.
426
427* Refactor how permissions are matched by ProjectControl, RefControl
428+
429More aggressively cache many of the auth objects at a cost of memory,
David Pursehouse4d7ac772013-06-25 17:14:30 +0900430but this should be an improvement in response times.
Martin Fick95092702011-12-22 14:46:33 -0700431
David Pursehouse4d7ac772013-06-25 17:14:30 +0900432* Substantially speed up pushing changes for review
Martin Fick95092702011-12-22 14:46:33 -0700433+
434Pushing a new change for review checks if the change is related to
435the branch it's destined for. It used to do this in a way that
436required a topo-sort of the rev history, and now uses JGit's
437merge-base functionality.
438
439* Add cache for tag advertisements
440+
441To make the general case more efficient, introduce a cache called "git_tags".
442+
443On a trivial usage of the Linux kernel repository, the average
444running time of the VisibleRefFilter when caches were hot was
4457195.68 ms. With this commit, it is a mere 5.07 milliseconds
446on a hot cache. A reduction of 99% of the running time.
447
448* Don't set lastCheckTime in ProjectState
449+
450The lastCheckTime/generation fields are actually a counter that
451is incremented using a background thread. The values don't match
452the system clock, and thus reading System.currentTimeMillis()
453during the construction of ProjectState is a waste of resources.
454
455
456Upgrades
457--------
458* Upgrade to GWT 2.3.0
459* Upgrade to Gson to 1.7.1
460* Upgrade to gwtjsonrpc 1.2.4
461* Upgrade to gwtexpui 1.2.5
462* Upgrade to Jsch 0.1.44-1
463* Upgrade to Brics 1.11.8
464
465
466Bug Fixes
467---------
468* Fix: Issue where Gerrit could not linkify certain URLs
469
470* issue 1015 Fix handling of regex ref patterns in Access panel
471+
472regex patterns such as "\^refs/heads/[A-Z]{2,}\-[0-9]\+.\*" were being
473prefixed with "refs/heads/", resulting in invalid reference patterns
474like "refs/heads/^refs/heads/[A-Z]{2,}-[0-9]+.*".
475
476* issue 1002 Check for and disallow pushing of invalid refs/meta/config
477+
478If the project.config or groups files are somehow invalid on
479the refs/meta/config branch, or would be made invalid due to
480a bad code review being submitted to this branch, reject the
481user's attempt to push.
482
483* issue 1002 Fix NPE in PermissionRuleEditor when group lacks UUID
484+
485If a group does not have an entry in the "groups" table within
486the refs/meta/config branch render the group name as a span,
487without the link instead of crashing the UI.
488
489* issue 972 Filter access section rules to only visible groups
490+
491Users who are not the owner of an access section can now only
492see group names and rules for groups which they are a member of,
493are visible to all users, or that they own.
494
495* Correctly handle missing refs/meta/config branch
496+
497If the refs/meta/config branch did not exist, getRevision() no longer
498throws an NPE when trying to access the ProjectDetail.
499
500* Allow loading Project Access when there is no refs/meta/config
501+
502Enable loading the access screen with a null revision field,
503and on save of any edits require the branch to be new.
504
505* create-project: Fix creation vs. replication order
506+
507Create the project on remote mirrors before creating either the
508refs/meta/config or the initial empty branch. This way those can be
509replicated to the remote mirrors once they have been created locally.
510
511* create-project: Bring back --permissions-only flag
512+
513If a project is permissions only, assign HEAD to point to
514refs/meta/config. This way the gitweb view of the project
515shows the permissions history by default, and clients that
516clone the project are able to get a detached HEAD pointing
517to the current permission state, rather than an empty
518repository.
519
520* create-project: Fix error reporting when repository exists
521+
522If a repository already exists, tell the user it already is
523available, without disclosing the server side path from gerrit.basePath.
524
525* Do not log timeout errors on upload and receive connections
526
527* Only automatically create accounts for LDAP systems
528+
529If the account management is LDAP, try to automatically create
530accounts by looking up the data in LDAP. Otherwise fail and reject an
531invalid account reference that was supplied on the command line via
532SSH.
533
534* Add missing RevWalk.reset() after checking merge base
535+
536This fixes an exception from RevWalk when trying to push a new
537commit for review.
538
539* issue 1069 Do not send an email on reviews when there is no message.
540+
541No longer send an email when reviewing a change via ssh, and
542the change message is blank (when no change message is actually
543added to the review).
544
545* Ignore PartialResultException from LDAP.
546+
547This exception occurs when the server isn't following referrals for
548you, and thus the result contains a referral. That happens when
549you're using Active Directory. You almost certainly don't really want
550to follow referrals in AD *anyways*, so just ignore these exceptions,
551so we can still use the actual data.
552
553* issue 518 Fix MySQL counter resets
554+
555gwtorm 1.1.5 was patched to leave in the dummy row that incremented
556the counter, ensuring the server will use MAX() + 1 instead of 1 on
557the next increment after restart.
558
559* Don't delete account_id row on MySQL
560+
561If the table is an InnoDB table deleting the row after allocation may
562cause the sequence to reset when the server restarts, giving out
563duplicate account_ids later.
564
565
566Documentation
567-------------
568
569New Documents
570~~~~~~~~~~~~~
571* First Cut of Gerrit Walkthrough Introduction documentation.
572+
573Add a new document intended to be a complement for the existing
574reference documentation to allow potential users to easily get a
575feel for how Gerrit is used, where it fits and whether it will
576work for them.
577
578* Introducing a quick and dirty setup tutorial
579+
580The new document covers quick installation, new project and first
581upload. It contains lots of quoted output, with a demo style to it.
582
583Access Control
584~~~~~~~~~~~~~~
585* Code review
586
587* Conversion table between 2.1 and 2.2
588+
589Add a table to ease conversion from 2.1.x. The table tries to address
590the old permissions one by one except for the push tag permission which
591in effect needed two permissions to work properly. This should
592be familiar to the administrator used to the 2.1.x permission model
593however.
594
595* Reformatted text
596
597* Verify
598+
599Updated some text in the Per project-section and edited the verified
600section to reflect the current label.
601
602* Capabilities
603+
604Adds general information about global capabilities, how the server
605ownership is administered.
606
607* Added non-interactive users
608+
609This change adds the non-interactive user group.
610It also adds that groups can be members of other groups.
611The groups are now sorted in alphabetical order.
612
613* Reordering categories
614+
615Access categories are now sorted to match drop down box in UI
616
617Other Documentation
618~~~~~~~~~~~~~~~~~~~
619* Added additional information on the install instructions.
620+
621The installation instructions presumes much prior knowledge,
622make some of that knowledge less implicit.
623
624* Provides a template to the download example.
625+
626Clarifies that the example host must be replaced with proper
627hostname.
628
629* Provided an example on how to abandon a change from
630the command line
631
632* update links from kernel.org to code.google.com
633
634
635* Rename '-- All Projects --' in documentation to 'All-Projects'
636
637* Explain 'Automatically resolve conflicts'
638
639* Update documentation for testing SSH connection
640+
641The command output that is shown in the example and the description
642how to set the ssh username were outdated.
643
644* Remove unneeded escape characters from the documentation
645+
646The old version of asciidoc required certain characters to be escaped
647with a backslash and when the upgrade to the new version was done all
648those backslashes that were used for escaping became visible.
649
650* Clean up pgm-index
651+
652Break out the utilities into their own section, and correct
653some of the item descriptions.
654
655* Update manual project creation instructions
656
657* Update project configuration documentation
658+
659Remove the textual reference to obsolete SQL insert statement to
660create new projects.
661
662* Clean up command line documentation, examples
663+
664The formatting was pretty wrong after upgrading to a newer version
665of AsciiDoc, so fix up most of the formatting, correct some order
666of commands in the index, and make create-project conform to the
667same format used by create-account and create-group.
668
669* Correct syntax of SQL statement for inserting approval category