]> khamidou — GitHub mirrors - arcanist.git/commit
Change patch generation for moving a file
authorNicholas Harper <nharper@fb.com>
Mon, 15 Aug 2011 19:25:05 +0000 (12:25 -0700)
committerNicholas Harper <nharper@fb.com>
Mon, 15 Aug 2011 22:36:45 +0000 (15:36 -0700)
commit4c05dc3cd61dd99b09ec3328ae7e2ee52d2f212b
tree0aff543740237aa962ec6f5458f77c6755d67901
parent7a72b0b4f9b96b005b4a87cec870d33af3b18f09
Change patch generation for moving a file

Summary:
The unix utility `patch` will not move a file (unless it is in or out of
/dev/null). If a diff copies or moves a file and also makes changes to the file,
the generated patch needs to list the new filename as the path to both the
original and new files so the changes get written to the new file.

(When arc applies this patch, it copies or moves the original as needed before
running `patch`.)

(This only matters for svn repos, since arc uses git commands for git repos
instead of using `patch`.)

Test Plan:
Created an arc bundle of a diff that copied a file to a new location and made
changes in both locations, and then ran arc patch with this bundle (in an svn
repo) to see that it correctly patches.

Reviewed By: epriestley
Reviewers: epriestley, jungejason, tuomaspelkonen
CC: aran, epriestley, nh
Differential Revision: 813
src/parser/bundle/ArcanistBundle.php