Add trailing tabs when generating synthetic Git diffs for files with spaces
Git, Mercurial, diff, and patch have conspired to make things weird. To correctly handle files with spaces in the way everything else does and expects, we need to emit semantic trailing whitespace literals.
- Created a file with spaces in it in a Mercurial repositroy, committed it, diffed it into a revision.
- Used arc patch to apply the change to a clean copy of the repository.
- Before patch: Mercurial incorrectly creates a file named X, not a file named X Y.txt.
- After patch: arc patch commit is identical to genuine commit.
- Also added test coverage. The other general behaviors here are fairly well covered already.
Reviewed By: amckinley
Maniphest Tasks: T8768
Differential Revision: https://secure.phabricator.com/D18869