Don't explicitly name abstract base classes

Summary:
Ref T5655. It is superfluous to include "base" in the name of an abstract base class. Furthermore, it is not done consistently within the code base.

In order to retain compatibility with external code, I have kept the `ArcanistBaseWorkflow` class (which trivially extends from `ArcanistWorkflow`), but it is now deprecated and should output a warning message. Similarly for `ArcanistBaseUnitTestEngine`.

Test Plan: Created a workflow which extends from `ArcanistBaseWorkflow`. Executed the workflow and saw a deprecation warning.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin, aurelijus

Maniphest Tasks: T5655

Differential Revision: https://secure.phabricator.com/D9983
Restore the old "history.immutable" default behavior

Summary: See rARC104219dd. Per the explanatory text, this should default to `true` in Mercurial and `false` in Git.

Test Plan: Ran `arc get-config` in Mercurial repo.

Reviewers: btrahan, joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D10021
Rename `ArcanistLintRenderer` subclasses

Summary: Ref T5655.

Test Plan: `arc lint` and `arc unit`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5655

Differential Revision: https://secure.phabricator.com/D10011
Use GIT tracked branches for arc land targets when reasonable

Summary:
See T5690.
-arc land now respects tracked branch when choosing 'onto'; '--onto' option remains as an override.
-arc land now respects tracked branch when choosing a remote; the remote is taken from 'onto's upstream unless the '--remote' option is present; when 'onto' branch has no upstream the '--remote' option must be provided as before.

Since 'arc feature' branches are (already) created as tracking branches, 'arc.land.onto.default' if present, is only used as the default when a non-tracking branch created by some other means is landed with out explicit '--onto'.  This may be surprising but is probably the correct go-forward behavior and is inline with the description in T5690.

Test Plan:
-checked having no arc.land.onto.default still assumes 'master'
-checked 'arc.land.onto.default' still overrides 'master'
-checked upstream branch (of feature branch) overrides 'master' and 'arc.land.onto.default'
-checked '--onto' overrides all
-checked origin is default for non-tracking branches
-checked the land onto branch's upstream remote is used instead of 'origin'
-checked '--remote' overrides 'origin' and the tracked upstream
-tested several crazy branch names including 'something/like/this' for both the upstream and tracking branches
-tested on linux and OS X
-rinse and repeat on Windows

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5690

Differential Revision: https://secure.phabricator.com/D10058
Allow "arc browse" to browse objects

Summary: Ref T5781. This implements `arc browse T234`, for any monogrammed object.

Test Plan:
  - Ran `arc browse T234` outside of a working copy (does not require repository API).
  - Ran `arc browse T234` in a working copy, got task.
  - Ran `arc browse PATH` in a working copy.
  - Ran `arc browse nonpath` with and without `--force`.

Reviewers: csilvers, btrahan

Reviewed By: btrahan

Subscribers: epriestley, spicyj

Maniphest Tasks: T5781

Differential Revision: https://secure.phabricator.com/D10140
Add a --browse flag to `arc diff`, to open objects in a browser after creating them

Summary: Ref T5781. Add a flag to optionally open a web browser after creating a diff or revision.

Test Plan: Created //this revision// with `arc diff --browse` // !!! //

Reviewers: csilvers, btrahan

Reviewed By: btrahan

Subscribers: epriestley, spicyj

Maniphest Tasks: T5781

Differential Revision: https://secure.phabricator.com/D10141
Add a --browse flag to `arc todo`

Summary: Ref T5781. Like D10141, but for `arc todo`. Fixes T5787.

Test Plan: See T5787.

Reviewers: btrahan, csilvers

Reviewed By: csilvers

Subscribers: epriestley, spicyj

Maniphest Tasks: T5781, T5787

Differential Revision: https://secure.phabricator.com/D10142
Allow "arc browse <symbol>" to resolve symbolic commits

Summary: Ref T5781. This makes things like `arc browse master` work (but they open the commit, not a revision).

Test Plan: Ran `arc browse master`.

Reviewers: csilvers, btrahan

Reviewed By: btrahan

Subscribers: epriestley, spicyj

Maniphest Tasks: T5781

Differential Revision: https://secure.phabricator.com/D10143
Add a linter rule for parentheses being used with PHP language constructs

Summary: Fixes T5648.

Test Plan: Added some test cases.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5648

Differential Revision: https://secure.phabricator.com/D10122
Rename a test class

Summary: Rename `ArcanistPHPCSLinterTestCase` to `ArcanistPhpcsLinterTestCase` for consistency with the class being tested.

Test Plan: `arc unit`

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D10145
Don't interpret `arc browse .` as a commit

Summary: Ref T5781. `git show .` works like HEAD, but that isn't what `arc browse .` means.

Test Plan: Ran `arc browse .` with a repository at a published commit.

Reviewers: chad, btrahan, avive, avivey

Reviewed By: avivey

Subscribers: epriestley, avivey

Maniphest Tasks: T5781

Differential Revision: https://secure.phabricator.com/D10197
Remove --background flag to prevent `arc` from hanging

Summary:
Ref T4281. A long time ago, we added a `--background` flag to let `arc lint` and `arc unit` run while you're typing a commit message, in some situations.

This code is only moderately beneficial and is way too complicated. Particularly, it has a long history of causing hangs (T4281, T2463), doesn't work on Windows, and is impossible to debug.

It's also running into a serious PHP bug with EAGAIN/EPIPE being indistinguishable that I haven't been able to find a reasonable workaround for in ~3-4 hours of trying.

All the pathways forward that I can see make this already-complex system more complex.

The major reason that this stuff is so complex is that the subprocess may need to prompt the user (notably, to apply patches from lint).

Instead, I'm going to simplify how `arc diff` interacts with `arc lint` and `arc unit`, so we can just fire-and-forget a background process, let it do as much work as it can without needing user input, and then pick up wherever it left off. This will be slightly less cool/magical, but it won't hang bizarrely and I will be able to debug it.

For now, simply remove the `--background` flag and behavior so `arc` works for everyone.

Test Plan: Ran `arc diff` to create this diff.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4281

Differential Revision: https://secure.phabricator.com/D10198
Make arcanist lint tests flexible about testcase formatting

Summary:
We currently require an exact number of "~" characters, but this is needless and error-prone.

Instead, allow any number larger than 3.

Test Plan:
  - Added meta test-case.
  - Ran `arc unit --everything`.

Reviewers: btrahan, thoughtpolice

Reviewed By: thoughtpolice

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D10251
[lint] Add HLint-based Haskell linter

Summary:
This adds a lint engine for `hlint`, which is the standard and most general Haskell lint tool around these days.

Signed-off-by: Austin Seipp <aseipp@pobox.com>

Test Plan: Install `hlint`, and run `arc unit`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Projects: #arcanist

Differential Revision: https://secure.phabricator.com/D10250
Don't parse separator tabs as part of the filename in Git diffs which affect files with spaces

Summary:
Fixes T5870. When a filename contains spaces, Git will add a "\t" at the end of the "---" and "+++" lines. We currently consume this and think we're reading a file called "blah blah\t".

Instead, parse it out as not part of the filename.

Test Plan: Added failing unit test and made it pass.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5870

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