HomePhabricator

Fix double file content in files in new subdirectories in Subversion

Description

Fix double file content in files in new subdirectories in Subversion

Summary:
Fixes T5555. Normally, when we svn diff subdir/, we use --depth empty to get only changes for the directory itself (usually, property changes).

However, this flag has no effect if the directory is newly added.

Adjust the diff parser so that if two sets of hunks are specified for a single file in a raw diff, we let the last one win instead of including both. This approach is a broadly more reasonable interpretation of these diffs.

Test Plan:

  • Added a new file in a new subdirectory in Subversion.
  • Ran arc diff --only.
  • No double file content in resulting diff.
  • Added unit test.
  • There's fairly comprehensive unit test coverage for this stuff.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T5555

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

Details

Provenance
Evan Priestley <epriestley@orbital.(none)>Authored on
epriestleyPushed on Jul 15 2014, 4:43 PM
Reviewer
chad
Differential Revision
D9921: Fix double file content in files in new subdirectories in Subversion
Parents
rARC9016207307ae: Fix various spelling mistakes
Branches
Unknown
Tags
Unknown

Event Timeline