Added some sample rcsdiffs for adding and deleting a line from a file. Wrote some test cases to be tested by ArcanistDiffParser.
Details
- Reviewers
epriestley - Commits
- rARCe0702d17c26c: Parsing rcsdiff -u
By making all the test cases pass.
Diff Detail
- Branch
- rcsDiffSamples
- Lint
Lint Passed - Unit
Tests Passed
Event Timeline
Nice job getting the tests set up, those look perfect. Pointer inline.
src/parser/ArcanistDiffParser.php | ||
---|---|---|
308–312 | I think you should be able to add something like this: case 'rcsdiff -u': $this->parseIndexHunk($change); break; |
Hacky way to pass the RCS revision tests (Just testing). Next upate will little better :P
src/parser/__tests__/diff/rcs-deleteline.rcsdiff | ||
---|---|---|
8–9 | Is this newline in the original? I can't reproduce it with rcsdiff -- my output looks like: +++ a/testing.php 2013/03/11 16:46:19 i.e., all on one line |
Okay, I made these changes:
https://secure.phabricator.com/differential/diff/11577/
And produced these two beautiful diffs:
https://secure.phabricator.com/differential/diff/11575/
https://secure.phabricator.com/differential/diff/11576/
...plus passing unit tests. Check if my inlines are on track and then I think we're in business?
src/parser/__tests__/ArcanistDiffParserTestCase.php | ||
---|---|---|
559 | This should just be .rcsdiff, not .rcs.diff. | |
src/parser/__tests__/diff/rcs-addline.rcsdiff | ||
7–8 | (It looks like these are spaces in the files, but tabs from rcsdiff.) |
{F35917}Hi evan,
I created the diffs another time, just to be sure, I am getting diffs like this:
Regarding spaces and tabs in diff's, yes in original diff's there were tabs but lint was raising errors because of tab literal.
If you think Lint is just bossing you around... Ignore it. You have good reason to. It's just a machine executing some slow and bad code, he can never know better than you.
Ok, Google's an exception. Listen to Google. It knows advise and wisdom. But still, it won't lint code for you.
Closed by commit rARCe0702d17c26c (authored by @Afaque_Hussain, committed by @epriestley).