Fix an escaping issue with "svn commit"

Summary: Fixes T2438. We currently escape everything with '@', but SVN rejects that for '.'

Test Plan:
Unit tests. Performed this commit:

  $ svn st
   M      .
  A       x@123
  $ arc commit --conduit-uri=http://local.aphront.com:8080/ --revision 53

      Revision 'D53: asdf' has not been accepted. Commit this revision anyway?
      [y/N] y

  Committing 'D53: asdf'...
  Sending        .
  Adding         x@123
  Transmitting file data .
  Committed revision 37.
  Done.

I grepped for more '@' adding but couldn't find any. It's a bit tricky to grep for though, so it's possible I missed some.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran, mbishopim3

Maniphest Tasks: T2438

Differential Revision: https://secure.phabricator.com/D4703
lint_untracked
Ignore untracked files in lint repository cache key

Summary: Some people have 2GB+ untracked files in repo which significantly slows down this or even crashes it.

Test Plan: Added a debug output here and linted repo with untracked path.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, arudolph

Differential Revision: https://secure.phabricator.com/D4713
Provide hgsprintf() for building hg revsets

Summary: I guess this is correct? See T2387 for discussion.

Test Plan: Unit tests.

Reviewers: bos, DurhamGoode

Reviewed By: DurhamGoode

CC: aran

Maniphest Tasks: T2387

Differential Revision: https://secure.phabricator.com/D4711
Correct a bunch of mercurial revset construction

Summary: Possibly improves T2387 state of the world?

Test Plan: not yet

Reviewers: bos, DurhamGoode

Reviewed By: DurhamGoode

CC: aran

Maniphest Tasks: T2387

Differential Revision: https://secure.phabricator.com/D4712
Allow running `arc land` after `git svn rebase`

Summary: `git pull` may fail in git-svn after rebasing (which is a side effect of dcommit).

Test Plan:
  $ git svn rebase
  $ git log trunk..master
  $ git pull --ff-only; echo $?

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4716
Separate Phutil specific lint rules from XHPAST

Summary: Also provides an example how to build custom linter using XHPAST.

Test Plan: Added debug output to `willLintPaths()`, verified that each path is parsed only once.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4718
Reset master after unsuccessful push

Test Plan: None.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4717
Restore directory after executing ArcanistBundleTestCase

Summary:
This test currently chdir()'s into a directory which is later removed. If another test tries to run a shell script while the CWD is invalid, the shell may emit this to stderr:

  shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

Among other things, this can cause the XHPAST test to fail, because it detects syntax errors by examining stderr.

Instead, retore the directory.

Test Plan: Ran "arc unit --everything", which could previously fail if XHPAST ran after Bundle.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4738
Use all changed files since base revision in repository cache key

Test Plan: Added debug output for repository version, linted, committed, linted again, saw the same version, changed file, saw different version.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4731
Expose `--coverage` and `--no-coverage` flags from `arc diff`

Summary: Currently, we don't expose these at top level, so you can't disable coverage if your coverage is explosively broken. Expose them as passthrough arguments.

Test Plan:

  - Touched a file in `arc` which triggered unit tests.
  - Without `xdebug` installed:
    - Ran `arc diff --preview`, `arc diff --preview --no-coverage` (both fine).
    - Ran `arc diff --preview --coverage`, got exception about coverage not being available.
  - Installed `xdebug`.
    - Ran `arc diff --preview`, got coverage.
    - Ran `arc diff --preview --coverage`, got coverage.
    - Ran `arc diff --preview --no-coverage`, no coverage.

Reviewers: indiefan, btrahan, vrana

Reviewed By: vrana

CC: aran

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