Increase phd sanity check timeout

Summary:
A user reported that their install (on an unusual piece of hardware) was hitting this timeout. We don't need to be quite so stingy; just use the default 30s timeout.

Also remove some kind of sentence fragment since I no longer remember what it meant and it doesn't make sense.

Test Plan: This change resolved the issue.

Reviewers: btrahan, jungejason

Reviewed By: jungejason

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1805
Add "mark committed" action to the web UI

Summary: When a revision is accepted, allow users to manually mark it committed if there's a daemon/tracking problem. This shouldn't happen in most installs but we have less-robust support for Mercurial and some installs may not be fully configured.

Test Plan: Marked a revision committed.

Reviewers: btrahan, Makinde

Reviewed By: Makinde

CC: aran, epriestley

Maniphest Tasks: T948

Differential Revision: https://secure.phabricator.com/D1808
Reduce laziness for "Mark Committed"

Summary:
  - Enforce proper workflow rules.
  - Fix a derp-bug with patches.

Test Plan:
  - Tried to mark a revision I didn't own.
  - Tried to mark a revision already marked committed.
  - Tried to mark a revision otherwise not accepted.
  - Verified daemon can override workflow rules and mark from arbitrary states.

Reviewers: btrahan, Makinde

Reviewed By: Makinde

CC: aran, epriestley

Maniphest Tasks: T948

Differential Revision: https://secure.phabricator.com/D1809
Improve tokenizer sorting rules

Summary:
Currently, we sort all results alphabetically. This isn't ideal. Instead, sort them like this:

  - If the viewing user appears in the list, always sort them first. This is common in a lot of contexts and some "Ben Evans" guy is sorting first on secure.phabricator.com and causing me no end of aggravation.
  - If the tokens match a "priority" component (e.g., username), sort that before results which do not have a "priority" match.
  - Within a group (self, priority, everything else) sort tokens alphabetically.

NOTE: I need to go add setUser() to all the tokenizers to make the "self" rule work, but that's trivial so I figured I'd get this out first.

Test Plan:
https://secure.phabricator.com/file/data/4s2a72l5hhyyqqkq4bnd/PHID-FILE-x2r6ubk7s7dz54kxmtwx/Screen_Shot_2012-03-07_at_9.18.03_AM.png

Previously, "aaaaaepriestley" (first alphabetic match) would sort before "epriestley" (the viewing user). Now, "epriestley" sorts first because that is the viewer.

https://secure.phabricator.com/file/data/rmnxgnafz42f23fsjwui/PHID-FILE-yrnn55jl3ysbntldq3af/Screen_Shot_2012-03-07_at_9.18.09_AM.png

Previously, "aaaagopher" (first alphabetic match) would sort before "banana" (the "priority" match). Now, "banana" sorts first because it priority matches on username.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T946

Differential Revision: https://secure.phabricator.com/D1807
Forbid mailing list names contianing spaces or commas

Summary:
They end up in "CCs:" fields where they can't be parsed.

Not bothering to migrate since I think only Dropbox has hit this.

Also improved another error condition's handling.

Test Plan: Tried to save a mailing list with spaces and commas in the name.

Reviewers: btrahan, Makinde

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T947

Differential Revision: https://secure.phabricator.com/D1813
Respect query string when redirecting from missing trailing /

Test Plan: /differential/filter/active/jakubv?status=all

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1798
Display blame colors in multiline highlighting

Summary:
Multiline highlighting didn't work well together with blame.

Blame Rev: rPe24a6ac

Test Plan: /diffusion/...$596-598?view=blame

Reviewers: epriestley

Reviewed By: epriestley

CC: Koolvin, aran, epriestley

Differential Revision: https://secure.phabricator.com/D1814
Improve Diffusion parsing of submoudule changes

Summary: We currently parse these as directory changes and discard them. Instead, parse them as a new "SUBMODULE" type of change.

Test Plan:
  - Reparsed a commit which changes submodules and verified it parses correctly.
  - Reparsed a commit which adds submodules and verified it parses correctly.

Reviewers: btrahan, kdeggelman

Reviewed By: btrahan

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1815
Use only the first line of update comment in revision history description

Summary:
More complicated updates deserves title and explanation.
This diff uses only the first line from comment in diff's description.
It also removes the truncating at 80 chars which looks as an error.

Test Plan:
  var_dump(preg_replace('/\n.*/s', '', "abc"));
  var_dump(preg_replace('/\n.*/s', '', "abc\ndef"));
  var_dump(preg_replace('/\n.*/s', '', "abc\ndef"));
  var_dump(preg_replace('/\n.*/s', '', "abc\ndef\nghi"));
  var_dump(preg_replace('/\n.*/s', '', "\nabc")); // empty string

Display revision with 255 chars description in update history - it looks OK.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1812
Adding explicitly set ircbot notifications

Summary:
This adds a new configuration setting:

  "notification.actions" : [
    "commit",
    "abandon",
    "actions"
  ]

if not set, displays all actions, if is set, display only what is set to display

Test Plan: add the notification.actions settings and set accordingly

Reviewers: epriestley, zeeg

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1820
GitFetch daemon: more verbose

Summary: A smidgen more messaging about what's going on.

Test Plan:
Ran it, saw this:

  2012-03-07 5:37:30 PM [STDO] >>> [0] <exec> $ /data/phabricator/bin/list_db_services --tier_name 'cdb.phabricator'
  <<< [0] <exec> 47,101 us
  ...
  >>> [9] <exec> $ mkdir -p '/var/repo'
  <<< [9] <exec> 41,374 us
  Creating new directory /var/repo/fbcode for repo FBCode
  >>> [10] <exec> $ git clone --origin origin 'ssh://fbcode.git.vip.facebook.com/data/gitrepos/fbcode.git' '/var/repo/fbcode'

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1819
Add a "properties" table to the Repository view in Diffusion

Summary: Notably, expose the clone URI / remote URI, after stripping credentials.

Test Plan: Looked at a repository.

Reviewers: btrahan, nh

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T91

Differential Revision: https://secure.phabricator.com/D1811
Resolve implicit fallthrough in Phabricator

Summary: New implicit fallthrough linter detected a few issues; none of these have behavioral impacts but they can clearly be tightened up. See D1824.

Test Plan: Lint; inspection.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1825
When updating git repositories, use --prune to prune old branches

Summary: We'll keep deleted branches around right now because Git's behavior is not to remove them without --prune.

Test Plan: Ran "git fetch --all --prune" to make sure it at least ostensibly works.

Reviewers: btrahan, 20after4

Reviewed By: 20after4

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1833
PhabricatorRepository: temporarily change the localPath

Summary:
I'm on a host where I have the PhabricatorRepositoryPullLocalDaemons
tracking a remote repo.  In my case, these end up as local git repos in
/var/repo/$name.

I'm working on another daemon that is going to automatically make
changes and commit them back upstream.  I figured it would be best to do
this in a new local repo.  I'll put these in /var/repo-clones/$name.

It's nice to use the exec*() functions in PhabricatorRepository, so the
approach I thought of was to load the PhabricatorRepository object from
the database, then change its localPath to point at the
/var/repo-clones/$name directory instead.

I didn't really want to change the local-path detail with setDetail(),
as that risks committing the change upstream.  It's nice to use the
repo's execLocalCommand() methods though, hence wanting to change the
local path.

Test Plan: None yet.

Reviewers: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1821
[LiskDAO] make objects ephemeral, aka read-only

Summary:
Make any Lisk object ephemeral, aka read-only, so that we can fiddle
around with their state safe in the knowledge that we'll never end up
writing that updated state back to the db.

Test Plan: Added a new test; ran test suite.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1836
Merge pull request #99 from Koolvin/derp

Adding explicitly set ircbot notifications
Remove AprhontDefaultApplicationController

Summary: This class is unsused and completely useless.

Test Plan: Grepped for callsites.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1840
Add a script to programmatically add image macros

Summary: Urgent request.

Test Plan: Ran "add_macro.php" on some things; verified results in web console.

Reviewers: btrahan, tcook

Reviewed By: btrahan

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1832
Revert "PhabricatorRepository: temporarily change the localPath"

Summary:
Reverts an unwanted commit (579941b866f2abcfc104c29bd3b016c48e718a02)
that got pushed by mistake.