Render the clone URI input field as readonly.

Summary:
There's no particular reason to allow the user to edit the clone URI field in Diffusion; editing it has no meaning and if you fat finger the keyboard, it's quite possible that the user will either accidentally clear and/or modify the URI before copying (bit me this morning).

Adding a readonly attribute to the input field allows the same benefit (URI is easily selectable) while preventing such accidental input.  Fixes T4246.

Test Plan: Verified that the desired behavior is present in both Chrome, Safari, and Firefox. Field remains selectable with one click, but field is not editable.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Maniphest Tasks: T4246

Differential Revision: https://secure.phabricator.com/D7810
Move commit hash querying to DiffusionLowLevelCommitQuery

Summary: Ref T4195. I need this for the Herald pre-commit rules, and it generally simplifies things.

Test Plan: Used `reparse.php` plus `var_dump()` to inspect refs in Git, Mercurial and SVN repos. They all looked correct and reparsed correctly.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4195

Differential Revision: https://secure.phabricator.com/D7804
Move commit message/metadata field query to a separate class

Summary: Ref T4195. I need to query commit metadata to figure out which revision a commit is associated with. Move this out of the MessageParser so the code can be called from the HookEngine.

Test Plan: Used `reparse.php` to reparse a variety of SVN, Mercurial and Git commits. Used `var_dump()` to verify sensible fields were returned.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4195

Differential Revision: https://secure.phabricator.com/D7805
Implement "Differential Revision" fields in Herald pre-commit content adapter

Summary: Ref T4195. Allows you to write revision-based commit hooks, e.g. block all commits with no corresponding revision.

Test Plan:
Here's are the fields populating:

{F90989}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4195

Differential Revision: https://secure.phabricator.com/D7806
Add an "Accepted Differential revision" field to Commit and pre-commit Content Herald rules

Summary: Refs T4195. Fixes T3936. You can't currently write rules like "block commits unless they're attached to an **accepted** revision"; allow that.

Test Plan: Pushed commits into a rule with this field, saw it work / not crash.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, mbishopim3

Maniphest Tasks: T3936, T4195

Differential Revision: https://secure.phabricator.com/D7807
Modernize Diffusion `commitparentsquery`

Summary: Ref T4195. Ref T2783. We have an old-school implementation of this; move it into a LowLevel query and make callers all run through Conduit. I need the LowLevel query for hooks, to implement an "is merge commit" Herald rule.

Test Plan:
  - Ran query via Conduit for SVN, Mercurial, Git.
  - Parsed a commit which closed a revision, attach/closed worked correctly.
  - Browsed Diffusion.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4195, T2783

Differential Revision: https://secure.phabricator.com/D7808
Add "is merge commit" Herald field for pre-commit rules

Summary:
Ref T4195. This allows you to write rules which disallow merge commits.

Also make the reject message a little more useful.

Test Plan:
  remote: This push was rejected by Herald push rule H27.
  remote: Change: commit/daed0d448404
  remote:   Rule: No Merges
  remote: Reason: No merge commits allowed. If you must push a merge, include "@force-merge" in the commit message.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4195

Differential Revision: https://secure.phabricator.com/D7809
Fix breadcrumb issue on Macro Create page

Summary: uhoh

Test Plan: !!!

Reviewers: frgtn, Korvin, btrahan

Reviewed By: Korvin

CC: aran

Differential Revision: https://secure.phabricator.com/D7811
Minor cleanup for task rendering in Daemons

Summary:
Fixes two issues:

  - When rendering a task's details, we currently issue a policy-oblivious query. Instead, issue a policy-aware query.
  - The formatting is a little bit weird, with the top half in a box and the bottom half with an older style. Make them consistent.

Test Plan: Looked at the detail pages for several tasks in queue.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D7812
Enable the "Accepted Differential Revision" field for Herald post-commit hooks

Summary: I implemented this field, but didn't actually enable it.

Auditors: btrahan
Enable figlet to render text using custom fonts

Summary:
Figlet with more fonts will make Phabricator
```
    _/    _/      _/    _/_/    _/
 _/_/  _/  _/  _/  _/  _/_/  _/
  _/  _/  _/  _/  _/      _/
 _/  _/  _/  _/  _/    _/  _/_/
_/    _/      _/    _/    _/_/

   _/_/_/  _/_/      _/_/    _/  _/_/    _/_/
  _/    _/    _/  _/    _/  _/_/      _/_/_/_/
 _/    _/    _/  _/    _/  _/        _/
_/    _/    _/    _/_/    _/          _/_/_/

                                  _/
     _/_/_/    _/_/    _/  _/_/        _/_/    _/    _/    _/_/_/
  _/_/      _/_/_/_/  _/_/      _/  _/    _/  _/    _/  _/_/
     _/_/  _/        _/        _/  _/    _/  _/    _/      _/_/
_/_/_/      _/_/_/  _/        _/    _/_/      _/_/_/  _/_/_/
```

Test Plan:
Use figlet in comment with no font/various fonts as argument (e.g. lean, script)
and see preview with no errors.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: epriestley

CC: epriestley, aran

Differential Revision: https://secure.phabricator.com/D7815
Herald - add support for "assignee" conditions

Summary: add support for "assignee" conditions

Test Plan: Create a Herald rule where condition is assignee, and create a task assign to someone.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Differential Revision: https://secure.phabricator.com/D7813
Minor, make sure we release locks in pull daemon if we fail in unusual ways

Summary: A user is reporting a re-lock in this daemon, which I can't
reproduce, but might be possible if this throws. Stop it from throwing in
a way which evades unlock.

See: <https://github.com/facebook/phabricator/issues/476>

Auditors: btrahan