]> khamidou — GitHub mirrors - arcanist.git/commit
Fix ArcanistBundle to generate disjoint, minimal hunks
authorepriestley <git@epriestley.com>
Thu, 10 Nov 2011 01:55:04 +0000 (17:55 -0800)
committerepriestley <git@epriestley.com>
Thu, 10 Nov 2011 02:06:14 +0000 (18:06 -0800)
commit8c70ee38775f562272f2078b153a620f85a8c78b
treea8c3ddd3db426b8b1ccf15ac0e0e00f08879459a
parent2a78b2bffa2dd9d23ab306c2671c0a7273af6410
Fix ArcanistBundle to generate disjoint, minimal hunks

Summary: 'patch' chokes on hunks with too much trailing stuff. 'git apply'
chokes on overlapping hunks. Make them both happy. Write some test cases so I
stop breaking this stuff.

Test Plan:
  - Applied a previously-failing patch via SVN.
  - Applied a previously-failing-then-succeeding patch via Git.
  - Ran unit tests.

Reviewers: jungejason, btrahan, nh, tuomaspelkonen, aran

Reviewed By: jungejason

CC: aran, jungejason
Differential Revision: 1099
src/__phutil_library_map__.php
src/parser/bundle/ArcanistBundle.php
src/parser/bundle/__tests__/ArcanistBundleTestCase.php [new file with mode: 0644]
src/parser/bundle/__tests__/__init__.php [new file with mode: 0644]
src/parser/bundle/__tests__/data/disjoint-hunks.diff [new file with mode: 0644]
src/parser/bundle/__tests__/data/disjoint-hunks.new [new file with mode: 0644]
src/parser/bundle/__tests__/data/disjoint-hunks.old [new file with mode: 0644]
src/parser/bundle/__tests__/data/trailing-context.diff [new file with mode: 0644]
src/parser/bundle/__tests__/data/trailing-context.new [new file with mode: 0644]
src/parser/bundle/__tests__/data/trailing-context.old [new file with mode: 0644]