mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-12-28 08:20:56 +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:
parent
ba560159d4
commit
31a390a38c
3 changed files with 15 additions and 1 deletions
|
@ -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 '______________________'.");
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
11
src/parser/__tests__/diff/svn-property-windows.svndiff
Normal file
11
src/parser/__tests__/diff/svn-property-windows.svndiff
Normal 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
|
Loading…
Reference in a new issue