1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-25 16:22:42 +01:00

Fix issue with SVN property changes under Windows

Summary: We were incorrectly matching `$` in the regexp against a possible `\r\n`. I missed this earlier when trying to catch all of these.

Test Plan:
  - Added unit test and made it pass.
  - Did another search for `getLine()` to see if I could spot any more of these, but failed to identify any via inspection.

Reviewers: vrana, mbishopim3

Reviewed By: mbishopim3

CC: aran

Differential Revision: https://secure.phabricator.com/D5038
This commit is contained in:
epriestley 2013-02-20 13:24:14 -08:00
parent ba560159d4
commit 31a390a38c
3 changed files with 15 additions and 1 deletions

View file

@ -365,7 +365,7 @@ final class ArcanistDiffParser {
* (or any other parser) with a carefully constructed property change.
*/
protected function parsePropertyHunk(ArcanistDiffChange $change) {
$line = $this->getLine();
$line = $this->getLineTrimmed();
if (!preg_match('/^_+$/', $line)) {
$this->didFailParse("Expected '______________________'.");
}

View file

@ -546,6 +546,9 @@ EOTEXT
case 'suppress-blank-empty.gitdiff':
$this->assertEqual(1, count($changes));
break;
case 'svn-property-windows.svndiff':
$this->assertEqual(1, count($changes));
break;
default:
throw new Exception("No test block for diff file {$diff_file}.");
break;

View file

@ -0,0 +1,11 @@
Index: .arcconfig
===================================================================
--- .arcconfig (revision 1957)
+++ .arcconfig (working copy)
Property changes on: .arcconfig
___________________________________________________________________
Added: herp
## -0,0 +1 ##
+derp
\ No newline at end of property