Page MenuHomePhabricator

Added support for parsing PhpStorm produced patches
Needs ReviewPublic

Authored by aik099 on Nov 1 2014, 11:45 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 22, 12:23 AM
Unknown Object (File)
Tue, Apr 16, 11:56 PM
Unknown Object (File)
Sun, Apr 7, 4:37 AM
Unknown Object (File)
Sat, Apr 6, 8:13 AM
Unknown Object (File)
Wed, Apr 3, 8:28 PM
Unknown Object (File)
Wed, Apr 3, 7:56 PM
Unknown Object (File)
Wed, Apr 3, 7:56 PM
Unknown Object (File)
Wed, Apr 3, 7:56 PM
Subscribers

Details

Summary

With these changes it's now possible to do 2 things with patches, created by PhpStorm:

  • validate that PhpStorm-specific comment, that follows after each changed filename is correct (all lines present)
  • don't consider such patches as malformed and allow them to be uploaded

Fixes T4698

Test Plan
  1. create patch in PhpStorm (or take "phpstorm-multiple-files.svndiff" from this revision)
  2. try creating new/updating existing differential revision
  3. see that no error happens and patch is recognized

Diff Detail

Repository
rARC Arcanist
Branch
T4698
Lint
Lint Errors
Unit
Tests Passed
Build Status
Buildable 2926
Build 2930: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

aik099 retitled this revision from to Added support for parsing PhpStorm produced patches.
aik099 updated this object.
aik099 edited the test plan for this revision. (Show Details)
aik099 added a reviewer: epriestley.
src/parser/ArcanistDiffParser.php
687

This line was uncovered before my changes. Another line in added processIDEAComment method isn't covered due same reason: exception assertion isn't used.

To improve situation I recommend (in another Differential revision of course) to:

  1. add $expected_exception_message argument to ArcanistPhutilTestCase::assertException method
  2. assert different exceptions (depending on parsed diff) in ArcanistDiffParserTestCase::parseDiff method