prolog: Fix NoBlock and NoOp functions.

Probably been broken since the prolog cafe introduction. The
status was never updated, resulting in broken rules.

(PS2, but the original change has already been merged)

Change-Id: If036577e9827be6263d7470efa2b3f466176d71f
Fix errors in MergeOp when using CherryPick

Commit 31050f2 adds a feature to make sure the Gerrit web UI is aware
of the cherry-picked commit used as the final patch set in a change.
However, we weren't including the submit approval on that last patch
set, which caused a NPE when merging the change.  For more discussion
of this bug see http://groups.google.com/group/repo-discuss/browse_thread/thread/975c57d88806f903

Also with 31050f2, there was another bug that would cause review scores
from all previous patch sets to show up on the final commit.  For example,
if Alice gave patch set 1 a +1 score and didn't give patch set 2 a score
at all, her +1 would show up when patch set 2 is submitted and patch set 3
is generated by Gerrit.  This bug is also now fixed.

Signed-off-by: Brad Larson <bklarson@gmail.com>
Change-Id: I492b588c31f6d81ce63e90967dfec5b823721ed4
Allow loading Project Access when there is no refs/meta/config

If the project does not have refs/meta/config the revision is
null. Enable loading the access screen anyway with a null revision
field, and on save of any edits require the branch to be new.
This is already handled by MetaDataUpdate, provided that the base
revision we supply is null, so make it @Nullable inside of the
ChangeProjectAccess handler.

Change-Id: I4417bf802e329eb7193a7cb514f7ebcd7d68f26e
Serialize updateContact and enterAgreement AJAX RPCs

Some datastores (namely my custom NoSQL one) can't update a user
account in parallel from two different request threads.  Serialize
the new agreement code to be storing the contact information first,
and only record the new agreement once the updateContact RPC has
completed. This ensures the enterAgreement RPC has a lower chance
of failure due to concurrency limitations in the datastore.

Change-Id: Iebd684eb187c9460ace9d89247ea529fe749007f
Docu-Fix: Correct syntax of SQL statement for inserting approval category

Change-Id: I23a2219590fd2bd311e985d9c505d93b5276daed
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Make macros in templates local to the template

We define macro 'elipses' in a number of templates. The template
code seems to assume the macro is local to the template file, but
this isn't the case by default in Velocity. For unknown reasons the
macro is made public to the entire set of templates being processed,
but this is hard to work with because we do not know what order
the macro files will be loaded and defined in, nor do we know what
macros a site admin might try to declare for their own templates.

Set all macros to be private to the file they are declared in, as
this makes the behavior more predictable. It does require a site
admin to copy common macros across all templates, but I think this
is already what a site admin might expect from our template format.

For reference see http://wiki.apache.org/velocity/MacroIssues

Change-Id: If2dc09a1246f49fb032f0c8c9b7d1a9afefdfca5
Merge "Docu-Fix: Correct syntax of SQL statement for inserting approval category"
Fixing asciidoc makefile to include images.

With the next release of Gerrit there will be images in the documentation.
With the current makefile they are not included. This patch will solve
this problem and include them.

With the advent of Internet Explorer 8 all major web browsers now support
the data URI scheme for embedded images and this patch use this feature.

Bug: issue 1231
Change-Id: I4e675ae42105f38c6ef1287621ac7d738930c82e
Merge "Fix errors in MergeOp when using CherryPick"
Merge "Fixing asciidoc makefile to include images."
Fixing asciidoc makefile to include images.

With the next release of Gerrit there will be images in the documentation.
With the current makefile they are not included. This patch will solve
this problem and include them.

With the advent of Internet Explorer 8 all major web browsers now support
the data URI scheme for embedded images and this patch use this feature.

Bug: issue 1231
Change-Id: I4e675ae42105f38c6ef1287621ac7d738930c82e
Docu-Fix: Correct syntax of SQL statement for inserting approval category

Change-Id: I23a2219590fd2bd311e985d9c505d93b5276daed
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Merge "prolog: Fix NoBlock and NoOp functions."
prolog: Fix NoBlock and NoOp functions.

Probably been broken since the prolog cafe introduction. The
status was never updated, resulting in broken rules.

Change-Id: If036577e9827be6263d7470efa2b3f466176d71f
Allow loading Project Access when there is no refs/meta/config

If the project does not have refs/meta/config the revision is
null. Enable loading the access screen anyway with a null revision
field, and on save of any edits require the branch to be new.
This is already handled by MetaDataUpdate, provided that the base
revision we supply is null, so make it @Nullable inside of the
ChangeProjectAccess handler.

Change-Id: I4417bf802e329eb7193a7cb514f7ebcd7d68f26e
Merge "prolog: Fix NoBlock and NoOp functions." into stable
Merge "Allow loading Project Access when there is no refs/meta/config" into stable
Merge "Fixing asciidoc makefile to include images." into stable
Fix git push authentication over HTTP

Dynamically look up the request's CurrentUser each time it is
requested inside of Guice. It is possible for the session user
to change when the ProjectDigestFilter authenticates, as the
current session changes from anonymous to being identified.

The fact that this is a bug implies someone is asking for the
CurrentUser object earlier in the filter pipeline than we used
to be seeing. If it is before ProjectDigestFilter the result is
the AnonymousUser, which is incorrect.

Change-Id: I702c56237a54e7061b780cd5e5b419ef494b6d51
daemon: Fix --disable-sshd when HTTP is enabled

If the HTTP server is enabled, but SSH is disabled with the command
line flag, the HTTP server module setup must not try to use the
sshdInjector and needs to have the NoSshModule bound in Guice.

Change-Id: Ie07c85e3fe344a1d4275c0ce845c98340d25ab40