[Aphront] fix setter for AphrontCrumbsView

Summary:
The idiom is to return $this in all setters; I think this got missed in
AphrontCrumbsView by mistake.

Test Plan: Use an AphrontCrumbsView!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1966
When a URI fails lookup, just 404 if it's POST

Summary: It's rather confusing now since we'll "seamlessly" redirect you to the right URI, but drop the method and parameters.

Test Plan: Hit a bad URI with POST, got 404.

Reviewers: edward, btrahan

Reviewed By: btrahan

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1965
Allow the users to view their unsubmitted inline comments in one view

Summary:
1. Created a filter for user comments that are not submitted yet
2. surface this information to the user by providing a "Draft revisions" link on the differential home page.

Test Plan: tested on one of the diffs

Reviewers: nh, epriestley

Reviewed By: epriestley

CC: aran, epriestley, jungejason

Differential Revision: https://secure.phabricator.com/D1927
Fix batch editor for edits which both add and remove projects

Summary:
Aggregate multiple add/remove transactions so we don't restore removed projects for a (remove + add) batch edit.

(Possibly we should do this in the TransactionEditor as well / instead, but it's fairly easy here and this is the only possible case currently.)

Test Plan: Performed a remove + add batch edit without issues.

Reviewers: btrahan

Reviewed By: btrahan

CC: cpiro, aran, epriestley

Maniphest Tasks: T985

Differential Revision: https://secure.phabricator.com/D1967
Fix commit parsing in owners tool after bug introduced in 30ae22bfcff71fa3f14e38fd3cd597448df501c3

Summary:
A bug was introduced in
rP30ae22bfcff71fa3f14e38fd3cd597448df501c3 which caused commits to start
being parsed as if the repository callsign was empty. This caused errors
and problems and much unhappiness. Example error:

  EXCEPTION: (Exception) No such repository ''. at [.../phabricator/src/applications/diffusion/request/base/DiffusionRequest.php:130]

Test Plan: Saw that commit parsing was breaking. Applied fix. Saw that commits parsed again.

Reviewers: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1974
Merge pull request #103 from dingram/unbreak-commit-parsing

Fix commit parsing in owners tool after bug introduced in 30ae22bfcff71fa3f14e38fd3cd597448df501c3
Ensure displaying PHP Manual function page for PHP function symbols

Summary:
Some PHP functions have the same name as extension or class.
php.net prefers them over functions.

Test Plan:
http://www.php.net/hash
http://www.php.net/function.hash
http://www.php.net/function.hash_final

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1977
Fix a typo in exception message
Jump to PHP Manual for PHP's internal classes and interfaces in symbol search

Test Plan: Clicked on `Exception` in `throw new Exception`.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1978
Fix links after D1921

Test Plan:
Search for some symbol. Click on the result. Verify that there is not // in URL.
Click on the link from generated exception.
View history in Diffusion, click on Browse.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1979
Add "Change Priority", "Open / Close", "Comment" and "Assign" actions to Maniphest batch editor

Summary: I think these are all the actions which make any sense.

Test Plan:
  - Performed and verified each action through the batch editor.
  - Performed a large batch edit which applied each action type multiple times and verified the aggregate behavior was correct.

Reviewers: btrahan, cpiro

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T441

Differential Revision: https://secure.phabricator.com/D1971
Use "~~del~~" remarkup style in Phabricator

Summary: Add @20after4's new rule to the Phabricator engine.

Test Plan: Wrote some ~~deleted~~ text.

Reviewers: 20after4, btrahan

Reviewed By: btrahan

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1972
Improve Diffusion behavior for externals

Summary:
  - Feature request from Airtime that I missed in the feedback notes, came up yesterday.
  - Identify git submodules as "FILE_SUBMODULE", not "FILE_NORMAL".
  - Link git submodules to an external resolver endpoint, which tries to find commits in tracked repositories.
  - Identify git symlinks as "FILE_SYMLINK", not "FILE_NORMAL".
  - Add folder, file, symlink and externals icons.

Test Plan:
  - externals/javelin is now identified as a submoudule and links to Javelin, not identified as a file and links to error.
  - bin/phd is now identified as a symlink.
  - Interfaces have pretty icons.

Reviewers: btrahan, cpiro, ddfisher, keebuhm, allenjohnashton

Reviewed By: btrahan

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1975
Require valid class for certain config settings

Summary:
It is now possible to set config setting requiring class of certain implementation to something completely else.
The consequence is that your Phabricator may stop working after update because you didn't implement some new method.

This diff validates the class upon usage.
It throws exception which is better than fatal thrown currently after calling undefined method.

Better solution would be to validate classes when setting the config but it would be too expensive - respective class definitions would have to be loaded and checked by reflection.

I was also thinking about some check script but nobody would run it after changing config.

The same behavior should be implemented for these settings:

- metamta.mail-adapter
- metamta.maniphest.reply-handler
- metamta.differential.reply-handler
- metamta.diffusion.reply-handler
- storage.engine-selector
- search.engine-selector
- differential.field-selector
- maniphest.custom-task-extensions-class
- aphront.default-application-configuration-class
- controller.oauth-registration

Test Plan:
Send comment, verify that it pass.
Change `metamta.differential.reply-handler` to incompatible class, verify that sending comment shows nice red exception.
Set `metamta.differential.reply-handler` to empty string, verify that it throws.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1919
Rename column Size to Commits in Browser Repositories table

Test Plan: /diffusion/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1981
Use PhabricatorEnv::newObjectFromConfig() wherever possible

Test Plan:
/mail/send/
scripts/aphront/aphrontpath.php /

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1983
T870 - add a refresh button for sync'd OAuth accounts

Summary: nice title!

Test Plan: refreshed my profile pic against my OAuth Phabricator instance.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Maniphest Tasks: T870

Differential Revision: https://secure.phabricator.com/D1980
Fix symbol URI generation to include default branch name for relevant repositories

Summary: We need to build a request in order to pick up an appropriate default branch name, instead of using the raw static generator.

Test Plan: Clicked a symbol link, got /master/path/blahblah

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1982
Allow Maniphest reports to be sorted, filtered by project, and have adjustable window sizes

Summary: Minor UI enhancement requests from Quora.

Test Plan: Filtered / sorted / window'd reports.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T994

Differential Revision: https://secure.phabricator.com/D1976
Detect changes in merge commits as the diff of the merge and the first parent

Summary:
Currently, we use "git log" to detect the change list for all commits, but this produces no output for merge commits.

Instead, parse them as changes against the first parent (the merge destination). This produces generally sensible/expected behavior, and is consistent with what GitHub does.

We need to special-case the first commit because it doesn't have parents.

NOTE: This is a parser change so you need to run `./scripts/repository/reparse.php --all <callsign> --change` to reparse merge commits in already-imported repositories after updating.

Test Plan: Reparsed a merge commit, a non-merge commit, and the first commit in the Phabricator repository.

Reviewers: btrahan, gschmidt

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T961

Differential Revision: https://secure.phabricator.com/D1985