]> khamidou — GitHub mirrors - arcanist.git/commit
Correctly parse Mercurial output for "hg diff --git" when binary files are
authorepriestley <git@epriestley.com>
Fri, 18 Nov 2011 19:03:17 +0000 (11:03 -0800)
committerepriestley <git@epriestley.com>
Sun, 20 Nov 2011 22:21:40 +0000 (14:21 -0800)
commit18773682c7554c5b6af072b25757ef48b917271a
tree8e7b7353239158d043261068715b4b4f7cbe2cca
parent0f35d03d29800c310317d2c65a16dc7abb2623da
Correctly parse Mercurial output for "hg diff --git" when binary files are
removed

Summary: Mercurial output diverges from git output when binary files are
removed. Parse the Mercurial flavor.

Test Plan:
  - Unit test fails before this change and passes afterward.
  - Removed a binary file in my hg local and successfully "arc diff --only"'d
the change.

NOTE: Git can't apply these patches, and reports:

  $ git apply < ~/Desktop/patch.txt
  error: removal patch leaves file contents
  error: level.png: patch does not apply

Reviewers: Makinde, btrahan, jungejason, nh, tuomaspelkonen, aran

Reviewed By: jungejason

CC: aran, jungejason, Makinde
Differential Revision: 1126
src/parser/diff/ArcanistDiffParser.php
src/parser/diff/__tests__/ArcanistDiffParserTestCase.php
src/parser/diff/__tests__/data/hg-binary-delete.hgdiff [new file with mode: 0644]