Community
Participate
Working Groups
To make sure the feature introduced with bug 224588 works as expected we will need a bunch of jUnits. They should cover: * counting lines for patches in unified diff format * counting lines for patches in context diff format * counting lines for patches in standard diff format * counting lines using given regular expressions
Created attachment 96846 [details] Couple of jUnits
Created attachment 96847 [details] mylyn/context/zip
Created attachment 96859 [details] Patch 2 The previous patch was trying to use an unavailable getters from Hunk class. Since they're needed only for the purpose of testing I think it will be better to use reflection here.
Two tests fail, it's caused by the fact that PatchReader miscounts the number of lines in an empty file (before patching). Instead of 0 it returns 2. This happens only to context patches (ie patch_addition_context.txt, patch_oneline_context.txt).
Won't make it for 3.5M2.
Created attachment 129066 [details] Patch_v03 Patch updated to HEAD.
Created attachment 129096 [details] Patch_v04 Patch making a change in PatchReader along with the tests. This change makes the tests pass I'm not sure if it's a general fix though.
Created attachment 129097 [details] Patch_v05 This one should be fine. Tomasz, please provide some comments on the fix.
The fix looks fine, released to HEAD, available in builds >I20090317-1029. Thanks Pawel.