Apply cluebat for missing REMOTE_USER in "host" auth mode
Don't import 'bcrypt' when not needed

It's not installed as a dependency unless it will be used, so it's a
good idea not to import it when it won't be used.  Also disable the
/login page, and the /validatelogin and /endsession operations, when
they aren't in use (with "host" authentication or "httpauth" session
type.)
Improve presentation of generic Git errors

Catch gitutils.GitError globally and display a meaningful error message.
Fix display of "watched" category without "active" category

On /dashboard, if the "watched" category was enabled but not the "active"
category, fetchActive() was called between the query for watched reviews
and the processing of the resulting rows.  But fetchActive() used the same
cursor object to make its own query and thus trampled the result of the
query for watched reviews.

(The list of active reviews needs to be fetched so that the active reviews
can be excluded from the list of watched (inactive) reviews where they
don't belong.)
Fix upgrading when installed source file has been modified

An UpdateModifiedFile() object was created with the keyword argument
'prompt' instead of the correct 'message'.
Fix upgrade of installs that predate SMTP configuration

Missing call to installation.smtp.add_arguments() from upgrade.py, so
installation.smtp.prepare() tried to access undefined names in the
'arguments' object.
Don't upgrade configuration strings to unicode
Remove /rawstatistics page
Fix crash in User.__eq__() when RHS is an anonymous user

Applied int() to RHS which fails in User.__int__() when it tries to
return the user id, which is None.
Improve /checkbranch tutorial text a little

Fix language, and remove spurious references to internal Opera host names.
Fix compacting of syntax highlighting cache

Crashed if the cache directory was missing, which it is in a newly
installed system.

Make time of day to run compacting configurable.  In particular useful
in settings where multiple instances share the same cache, in which case
it's now possible to disable the compacting in all but one instance.

Add support for manually triggering compacting by sending a command to
the background process over its command socket.  (No UI yet.)

Also fix some minor bugs that caused the compacting to not compact.

Configurable time of day and manual trigger also applies to the purging
of older custom changesets from the database.
Create correct highlight cache directory when installing

The directory created by the installation script was (by default)

  /var/cache/critic/highlight/

but the directory the highlighting service was configured to use
was

  /var/cache/critic/main/highlight/

The second directory was automatically created the first time
anything was highlighted, so things worked, just with an extra
empty directory.

Also adjust the mode set on the automatically created highlight
cache directories; use 0750 (same as the installation script uses)
instead of 0777 (default for os.makedirs().)
Offer to dump database before upgrading

Offer a bit harder if the upgrade will modify the database schema.
Drop NOT NULL constraint on column changesets.parent

Root commits don't have parents, so a "direct" changeset of a root commit
will have NULL in the parent column.
Sanitize operation arguments value in error messages

If /validatelogin or /changepassword were to fail unexpectedly, the
automatic error message sent to the system administrator would contain
the user's password in plain text.  That's not a great idea, so allow
an operation to sanitize its arguments value before it's used in error
messages (or, in a hypothetical future, in logs.)

Also fix handling of errors (other than the basic "wrong username or
password" failure) on /login; the form submit wasn't cancelled, so the
user would be redirected to the anonymous user's default page instead
of staying at the /login page.
Add params --force-create-system-{user|group} in install.py

When doing lots of clean reinstalls for testing, it's nice to have
install.py run without prompts.
If stdin is not a tty, avoid termio tricks in pwd prompt

I didn't want to add an --admin-password param to install.py
since I it might make someone accidentally leave their password
in bash history (or reveal it via "w" on a poorly configured
system), but I still want to have 100% automated installation
so this was a compromise where I made it possible to do
"install.py < /path/to/secret_password_file" with that file
properly chmoded.
If there is just one repository, always use it as defaultRepository

Beyond making "branches" and filter part of "home" pages more convenient to
use for newly setup single repository Critic instances, this also makes
behavior consistent with what "Config" displays for such an instance.
Although the user had no preference recorded for a newly installed
instance, the "Config" page was populating the defaultRepository dropdown
with a single item representing the only existing repository so for the
user it looked like they had the "Config" properly setup. Just hitting
"Save" without changing anything did indeed set the only repository as
defaultRepository, but such a click should not be necessary ofc.
Fix typos in comments and strings
Switch to american spelling for consistency