Allow init steps to do initialisation after the site is created

If an init step wants to modify the project.config file of the
All-Projects project this can only be done after the site has been
created.

The AllProjectsConfig can now be injected even if the site does not
exist yet.

Change-Id: Ic2dd15e1bae2dcca3aba8138f31b99c14bff2a02
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Improved documentation on the Change-Ids

They are not necesseraly unique anymore

See also:
https://groups.google.com/forum/#!topic/repo-discuss/fdfpHzyDD_E

Change-Id: Ie21a357c77cce423481236a0872c0e4feb279d8f
SideBySide2: Support linking directly to a line of code or comment

Using "@nnn" as a suffix on the URL token will open the file at
the given line on the B (right) side of the file. "@aNNN" can be
used to open the file relative to the line NNN on the A (left) side.

In the History section of ChangeScreen2 hyperlink each line number
to the line that comment appears on.

Bug: issue 348
Change-Id: I37de37d63d5deb6dc38f040e7e9b2bf5b09ef909
Simplify PatchSetInserter.Factory signature

Pass a ChangeControl instead of a RefControl, from which the change
and user can be gotten.

Change-Id: I95e682bdda69071237ad878586f06b10e4266146
Use the new section title style in Asciidoctor.

We previous use the section title style like:

Section level 1
===============

Section level 2
---------------

Which have a problem in Asciidoctor that the number of "="s or "-"s must match
the number of characters in the header exactly, as a result it's easy to make
mistakes while changing the titles. Asciidoctor provides a better style like:

= Section level 1

== Section level 2

So we switched to this style.

Also fixed a bug in replace_macros.py, which will not cause any problem in the
old style.

Change-Id: I811dd7238735d98f662767c17086152cd69aea02
Merge ChangeIndexerImpl into ChangeIndexer

The secondary index is required so there is no longer a no-op
implementation; skip the abstract base class.

Change-Id: I17a810a26b29afb70d8508b18181d8c861f750d7
Merge "Merge ChangeIndexerImpl into ChangeIndexer"
ChangeIndexer: Set request contexts more correctly

For the non-async calls, don't use Task, as it's executing in the same
thread so doesn't need to open a new ReviewDb and set the
RequestContext.

Delete the async calls that take ChangeData (which were unused).
ChangeData's internal data structures are very much not threadsafe.
This means we might be duplicating some work if the caller had
available a partially-populated ChangeData, but not a whole lot, and
it's async, so slower is less worrisome (and besides, these methods
were unused),

In the future we might inject a ReviewDb into ChangeData at creation
time instead of passing it in to practically every method; that would
make it so ChangeData must always be constructed from the thread where
it's used, in this case inside Task.call().

Change-Id: Ic292cdd6ac2e81a7450626402d5eb4ce6b4c3083
Stop passing ReviewDb, etc. to ChangeData methods

Many methods that are intended for lazy initialization take a
ReviewDb, and some take other helper objects such as
GitRepositoryManager. This achieves the intended lazy-loading behavior
but requires a lot of injection of dependencies into callers, and may
become untenable as lazy loading of ChangeData requires more helpers.

Instead, since after all this is Java, construct ChangeData with a
Factory. This is subtle because it is used from a lot of places that
need control over which ReviewDb handle to pass in, so the factory
methods still need to take a db. ChangeData objects are still intended
(i.e. safe) for use only by one thread, so having a single ReviewDb
instance stored for the lifetime of the ChangeData should be fine. We
just need to be careful about which we pass in, particularly in a
place like ChangeIndexer.

As a side effect, clean up some other injection, particularly in the
predicate class hierarchy.

Change-Id: I52e1eb2a76788c12dd95767e89095ab80df7e1cc
Fix column alignment for new project parent suggestions

The state icons recently added by 34dfcd32357f0b342a237 ("Adding
display of project state to Projects -> List page") introduced a new
column, throwing off the alignment.  This caused the description to
appear as the project name and the name to be line wrapped on every
short strings like "Public-Projects".

Change-Id: I4aa9520db4c8951e97bcdf864324dfd7c685e11a
Merge "SideBySide2: Support linking directly to a line of code or comment"
Merge changes I52e1eb2a,Ic292cdd6

* changes:
  Stop passing ReviewDb, etc. to ChangeData methods
  ChangeIndexer: Set request contexts more correctly
Merge "Allow init steps to do initialisation after the site is created"
Merge "Improved documentation on the Change-Ids"
Add init step for installing the 'Verified' label

Change-Id: I508b88b9de73ee6db30482c6c9ec9c3404195241
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Merge "Add init step for installing the 'Verified' label"
Merge "Fix column alignment for new project parent suggestions"
Don't wrap "Merge Conflict" in status column

Previously all status strings were one word, so the status column
never word wrapped and caused changes to occupy two lines.  With the
addition of "Merge Conflict" as a possible status string wide subjects
and narrow browser windows can force word wrapping, making some change
rows take up 2 lines.  Force the column to be one line, truncting the
subject when there is insufficient horizontal space.

Change-Id: I6e4ab43ed7f044d564abaa621eaf3e5dfd37894b
Merge "Don't wrap "Merge Conflict" in status column"