Parsing rcsdiff -u

Authored by Afaque_Hussain on Mar 11 2013, 7:01 PM.



Added some sample rcsdiffs for adding and deleting a line from a file. Wrote some test cases to be tested by ArcanistDiffParser.

Test Plan

By making all the test cases pass.

Diff Detail

Lint Skipped
Unit Tests Skipped
epriestley requested changes to this revision.Mar 13 2013, 4:27 PM

Nice job getting the tests set up, those look perfect. Pointer inline.


I think you should be able to add something like this:

case 'rcsdiff -u':
Afaque_Hussain updated this revision to Unknown Object (????).Mar 13 2013, 7:19 PM

Hacky way to pass the RCS revision tests (Just testing). Next upate will little better :P

epriestley added inline comments.Mar 13 2013, 10:38 PM

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

epriestley requested changes to this revision.Mar 13 2013, 10:48 PM

Okay, I made these changes:

And produced these two beautiful diffs: passing unit tests. Check if my inlines are on track and then I think we're in business?


This should just be .rcsdiff, not .rcs.diff.


(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.

Afaque_Hussain updated this revision to Unknown Object (????).Mar 14 2013, 9:54 AM

Updating D5324: Parsing rcsdiff -u

Somehow got it to pass the test.{F35930}

That's quite hacky, I have to say. But it works.

And it was fun doing in a class when professor was teaching :P

epriestley accepted this revision.Mar 14 2013, 1:10 PM

greatest feature ever

epriestley closed this revision.Mar 14 2013, 1:12 PM

Closed by commit rARCe0702d17c26c (authored by @Afaque_Hussain, committed by @epriestley).

epriestley edited edge metadata.Nov 18 2016, 10:48 PM
epriestley changed the visibility from "All Users" to "Public (No Login Required)".