Merge branch 'stable-2.6' into stable-2.7

* stable-2.6:
  Rename "Old Version History" to "Reference Version" on the change screen
  Documentation: Rename Server Programs
  Improve submodule subscription documentation
  Fix spelling mistakes in contributor documentation
  Update documentation of the create-account command
  Documentation: Clearer structure on front page
  Update build instructions in developer documentation
  Correct a typo in help text for --draft on push options
  Handle 'Event.ONPASTE' in CreateProjectScreen
This commit is contained in:
Shawn Pearce 2013-05-08 07:12:13 -07:00
commit 8702d2ec1f
8 changed files with 150 additions and 56 deletions

View File

@ -18,9 +18,11 @@ SYNOPSIS
DESCRIPTION
-----------
Creates a new internal only user account for batch/role access, such
as from an automated build system or event monitoring over
link:cmd-stream-events.html[gerrit stream-events].
Creates a new internal-only user account.
If the account is created without an email address, it may only be
used for batch/role access, such as from an automated build system
or event monitoring over link:cmd-stream-events.html[gerrit stream-events].
If LDAP authentication is being used, the user account is created
without checking the LDAP directory. Consequently users can be

View File

@ -31,7 +31,7 @@ out reviewing other people's changes to relieve the load from
the approvers. Even if you are not familiar with Gerrit's
internals, it would be of great help if you can download, try
out, and comment on new features. If it works as advertised,
say so, and if you have the priviliges to do so, go ahead
say so, and if you have the privileges to do so, go ahead
and give it a +1 Verified. If you would find the feature
useful, say so and give it a +1 code review.
@ -161,7 +161,7 @@ Here are some guidelines that Gerrit uses:
* Define non static interfaces after static interfaces in your
class.
* Next you should define static types and members.
* Finally instance members, then constuctors, and then instance
* Finally instance members, then constructors, and then instance
methods.
* Some common exceptions are private helper static methods which
might appear near the instance methods which they help.

View File

@ -31,7 +31,21 @@ Building
From the command line:
----
mvn package
mvn clean package
----
By default the build will run tests and build the documentation.
To build without tests:
----
mvn clean package -DskipTests
----
To build without documentation:
----
mvn clean package -Dgerrit.documentation.skip
----
Output executable WAR will be placed in:

View File

@ -6,27 +6,36 @@ Getting Started
* link:intro-quick.html[A Quick Introduction To Gerrit]
User Guide
----------
End User Guide
--------------
* link:http://source.android.com/submit-patches/workflow[Default Workflow]
* External link: link:http://source.android.com/submit-patches/workflow[Default Android Workflow]
* link:user-search.html[Searching Changes]
* link:cmd-index.html[Command Line Tools]
* link:pgm-index.html[Server Programs]
* link:user-upload.html[Uploading Changes]
* link:user-changeid.html[Change-Id Lines]
* link:user-signedoffby.html[Signed-off-by Lines]
* link:access-control.html[Access Controls]
* link:error-messages.html[Error Messages]
* link:user-notify.html[Subscribing to Email Notifications]
Project Owner and Power User Guide
----------------------------------
* link:access-control.html[Access Controls]
* link:rest-api.html[REST API]
* link:user-dashboards.html[Dashboards]
* link:user-notify.html[Subscribing to Email Notifications]
* link:user-submodules.html[Subscribing to Git Submodules]
* link:prolog-cookbook.html[Prolog Cookbook]
* link:prolog-change-facts.html[Prolog Facts for Gerrit Changes]
* link:config-labels.html[Review Labels]
Admin User Guide
----------------
* link:pgm-index.html[Server Side Administrative Tools]
Installation
------------
~~~~~~~~~~~~
* link:licenses.html[Licenses and Notices]
* link:install.html[Installation Guide]
@ -34,7 +43,7 @@ Installation
* link:project-setup.html[Project Setup]
Configuration
-------------
~~~~~~~~~~~~~
* link:config-gerrit.html[System Settings]
* link:config-contact.html[User Contact Information]
@ -45,16 +54,15 @@ Configuration
* link:config-hooks.html[Hooks]
* link:config-mail.html[Mail Templates]
* link:config-cla.html[Contributor Agreements]
* link:config-validation.html[Commit Validation]
* link:config-labels.html[Review Labels]
Developer Documentation
-----------------------
Gerrit Developer Documentation
------------------------------
* link:dev-readme.html[Developer Setup]
* link:dev-eclipse.html[Eclipse Setup]
* link:dev-contributing.html[Contributing to Gerrit]
* link:dev-plugins.html[Developing Plugins]
* link:config-validation.html[Commit Validation]
* link:dev-design.html[System Design]
* link:i18n-readme.html[i18n Support]
* link:dev-release.html[Developer Release]

View File

@ -1,13 +1,15 @@
Gerrit Code Review - Server Programs
====================================
Gerrit Code Review - Server Side Administrative Tools
=====================================================
Server side programs can be started by executing the WAR file
Server side tools can be started by executing the WAR file
through the Java command line. For example:
$ java -jar gerrit.war program [options]
$ java -jar gerrit.war <tool> [<options>]
[[programs]]Programs
--------------------
Tool should be one of the following names:
Tools
-----
link:pgm-init.html[init]::
Initialize a new Gerrit server installation.
@ -28,7 +30,7 @@ version::
Display the release version of Gerrit Code Review.
Transition Utilities
--------------------
~~~~~~~~~~~~~~~~~~~~
link:pgm-ScanTrackingIds.html[ScanTrackingIds]::
Rescan all changes after configuring trackingids.

View File

@ -1,5 +1,5 @@
Gerrit Code Review - Superprojects subscribed to submodules updates
===================================================================
Gerrit Code Review - Superproject subscription to submodules updates
====================================================================
Description
-----------
@ -25,7 +25,7 @@ commit having the updated gitlinks.
Git Submodules Overview
-----------------------
It is a git feature that allows an external repository to be
Submodules are a git feature that allows an external repository to be
attached inside a repository at a specific path. The objective here
is to provide a brief overview, further details can be found
in the official git submodule command documentation.
@ -37,20 +37,20 @@ at path 'a' by executing the following command when being inside
'super':
=====
git submodule add ssh://server/a a
====
=====
Still considering the above example, after its execution notice that
inside the local repository 'super' the 'a' folder is considered a
gitlink to the external repository 'a'. Also notice a file called
.gitmodules is created (it is a config file containing the
subscription of 'a'). To provide the sha-1 each gitlink points to in
.gitmodules is created (it is a configuration file containing the
subscription of 'a'). To provide the SHA-1 each gitlink points to in
the external repository, one should use the command:
====
git submodule status
====
In the example provided, if 'a' is updated and 'super' is supposed
to see the latest sha-1 (considering here 'a' has only the master
to see the latest SHA-1 (considering here 'a' has only the master
branch), one should then commit the modified gitlink for 'a' in
the 'super' project. Actually it would not even need to be an
external update, one could move to 'a' folder (insider 'super'),
@ -63,11 +63,11 @@ Creating a New Subscription
Defining the Submodule Branch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is required because Submodule subscription is actually the
This is required because submodule subscription is actually the
subscription of a submodule project and one of its branches for
a branch of a super project.
Since it manages subscriptions in the branch scope, we could have
Since Gerrit manages subscriptions in the branch scope, we could have
a scenario having a project called 'super' having a branch 'integration'
subscribed to a project called 'a' in branch 'integration', and also
having the same 'super' project but in branch 'dev' subscribed to the 'a'
@ -77,22 +77,23 @@ After adding the git submodule to a super project, one should edit
the .gitmodules file to add a branch field to each submodule
section which is supposed to be subscribed.
The branch field is not filled by the git submodule command. Its value
should indicate the branch of a submodule project that when updated
will trigger automatic update of its registered gitlink.
As the branch field is a Gerrit specific field it will not be filled
automatically by the git submodule command, so one needs to edit it
manually. Its value should indicate the branch of a submodule project
that when updated will trigger automatic update of its registered
gitlink.
The branch value could be '.' if the submodule project branch
The branch value could be "'.'" if the submodule project branch
has the same name as the destination branch of the commit having
gitlinks/.gitmodules file.
The branch field of a submodule section is a custom git submodule
feature for Gerrit use. One should always be sure to fill it in
editing .gitmodules file after adding submodules to a super project,
if it is the intention to make use of the Gerrit feature introduced here.
If the intention is to make use of the Gerrit feature described
here, one should always be sure to update the .gitmodules file after
adding submodules to a super project.
Any git submodules which are added and not have the branch field
available in the .gitmodules file will not be subscribed by Gerrit
to automatically update the superproject.
If a git submodule is added but the branch field is not added to the
.gitmodules file, Gerrit will not create a subscription for the
submodule and there will be no automatic updates to the superproject.
Detecting and Subscribing Submodules
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -118,17 +119,62 @@ is merged in branch 'dev-of-a' of 'a' project, Gerrit automatically
creates a new commit on branch 'dev' of 'super' updating the gitlink
to point to the just merged commit.
Canonical Web Url
~~~~~~~~~~~~~~~~~
Subscription Limitations
~~~~~~~~~~~~~~~~~~~~~~~~
Gerrit will automatically update only the superprojects that added
the submodules of urls of the running server (the one described in
the canonical web url value in Gerrit configuration file).
Gerrit will only automatically update superprojects where the
submodules are hosted on the same Gerrit instance as the
superproject. Gerrit determines this by checking the hostname of the
submodule specified in the .gitmodules file and comparing it to the
hostname from the canonical web URL.
It is currently not possible to use the submodule subscription feature
with a canonical web URL hostname that differs from the hostname of
the submodule. Instead relative submodules should be used.
The Gerrit instance administrator group should always certify to
provide the canonical web url value in its configuration file. Users
should certify to use the url value of the running Gerrit instance to
add/subscribe submodules.
provide the canonical web URL value in its configuration file. Users
should certify to use the correct hostname of the running Gerrit
instance to add/subscribe submodules.
Relative submodules
~~~~~~~~~~~~~~~~~~~
To enable easier usage of Gerrit mirrors and/or distribution over
several protocols, such as plain git and HTTP(S) as well as SSH, one
can use relative submodules. This means that instead of providing the
entire URL to the submodule a relative path is stated in the
.gitmodules file.
Gerrit will try to match the entire project name of the submodule
including directories. Therefore it is important to supply the full
path name of the Gerrit project, not only relative to the super
repository. See the following example:
We have a super repository placed under a sub directory.
product/super_repository.git
To this repository we wish add a submodule "deeper" into the directory
structure.
product/framework/subcomponent.git
Now we need to edit the .gitmodules to include the complete path to
the Gerrit project. Observe that we need to use two "../" to include
the complete Gerrit project path.
path = subcomponent.git
url = ../../product/framework/subcomponent.git
branch = master
In contrast the following will not setup proper submodule
subscription, even if the submodule will be successfully cloned by git
from Gerrit.
path = subcomponent.git
url = ../framework/subcomponent.git
branch = master
Removing Subscriptions
----------------------

View File

@ -27,6 +27,7 @@ import com.google.gerrit.client.projects.ProjectInfo;
import com.google.gerrit.client.projects.ProjectMap;
import com.google.gerrit.client.rpc.GerritCallback;
import com.google.gerrit.client.ui.HintTextBox;
import com.google.gerrit.client.ui.OnEditEnabler;
import com.google.gerrit.client.ui.ProjectListPopup;
import com.google.gerrit.client.ui.ProjectNameSuggestOracle;
import com.google.gerrit.client.ui.ProjectsTable;
@ -34,11 +35,14 @@ import com.google.gerrit.client.ui.Screen;
import com.google.gerrit.common.PageLinks;
import com.google.gerrit.common.ProjectUtil;
import com.google.gerrit.reviewdb.client.Project;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.dom.client.KeyPressEvent;
import com.google.gwt.event.dom.client.KeyPressHandler;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.History;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Anchor;
@ -110,8 +114,8 @@ public class CreateProjectScreen extends Screen {
final VerticalPanel fp = new VerticalPanel();
fp.setStyleName(Gerrit.RESOURCES.css().createProjectPanel());
initCreateTxt();
initCreateButton();
initCreateTxt();
initParentBox();
addGrid(fp);
@ -129,7 +133,23 @@ public class CreateProjectScreen extends Screen {
}
private void initCreateTxt() {
project = new NpTextBox();
project = new NpTextBox() {
@Override
public void onBrowserEvent(Event event) {
super.onBrowserEvent(event);
if (event.getTypeInt() == Event.ONPASTE) {
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
if (project.getValue().trim().length() != 0) {
create.setEnabled(true);
}
}
});
}
}
};
project.sinkEvents(Event.ONPASTE);
project.setVisibleLength(50);
project.addKeyPressHandler(new KeyPressHandler() {
@Override
@ -139,10 +159,12 @@ public class CreateProjectScreen extends Screen {
}
}
});
new OnEditEnabler(create, project);
}
private void initCreateButton() {
create = new Button(Util.C.buttonCreateProject());
create.setEnabled(false);
create.addClickHandler(new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {

View File

@ -1017,7 +1017,7 @@ public class ReceiveCommits {
@Option(name = "--topic", metaVar = "NAME", usage = "attach topic to changes")
String topic;
@Option(name = "--draft", usage = "mark new/update changes as draft")
@Option(name = "--draft", usage = "mark new/updated changes as draft")
boolean draft;
@Option(name = "--submit", usage = "immediately submit the change")