WordPress.org

Make WordPress Core

Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#9467 closed enhancement (fixed)

Update Diff Engine [patch included]

Reported by: simek Owned by: nacin
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.8
Component: Revisions Keywords: has-patch
Focuses: Cc:

Description

I prepared patch which update Diff engine files to latest versions.

I've tested those changed files on my test blog and everything was ok.

Attachments (2)

diff.update.patch (8.6 KB) - added by simek 11 years ago.
textdiff.new.version.patch (18.8 KB) - added by Simek 10 years ago.
Most recent version according to http://cvs.horde.org/framework/Text_Diff/

Download all attachments as: .zip

Change History (20)

@simek
11 years ago

#1 follow-up: @hakre
11 years ago

this patch will help wordpress become more PHP5 compatible. that means: better workin in current environments.

let me smile: all php4 users should drop dead :D

#2 in reply to: ↑ 1 @Denis-de-Bernardy
11 years ago

Replying to hakre:

this patch will help wordpress become more PHP5 compatible. that means: better workin in current environments.

let me smile: all php4 users should drop dead :D

the patch also means php4 users will be using more memory, no?

#3 @Denis-de-Bernardy
11 years ago

  • Component changed from Administration to Revisions
  • Owner anonymous deleted

#4 @hakre
11 years ago

Well php 4 users will use more memory but PHP 5 users will use less memory.

+1 A step in the right direction.

#5 follow-up: @Denis-de-Bernardy
11 years ago

mm, php5 users would use the same memory. they'd be carrying an object reference no matter what.

#6 in reply to: ↑ 5 @hakre
11 years ago

Replying to Denis-de-Bernardy:

mm, php5 users would use the same memory. they'd be carrying an object reference no matter what.

That's what many PHP users believe but it is not the case. It uses more memory if you pass objects with &, it is not the same as without.

#7 @hakre
11 years ago

Need to correct my last statement. I made a little Test with a current PHP 5.2.x version and it is not the case any longer. Memory Usage remains the same.

#8 @Denis-de-Bernardy
11 years ago

Right. And that would be valid in php5.0 as well. Per the php docs, objects are always a pointer (in other words, a php reference) in php5.

#9 @Denis-de-Bernardy
11 years ago

  • Milestone changed from 2.8 to Future Release

this can wait. it improves nothing, nor does it fix anything.

#10 @Denis-de-Bernardy
11 years ago

  • Milestone changed from Future Release to 2.9

#11 @Denis-de-Bernardy
11 years ago

  • Keywords needs-unit-tests added

#12 @westi
10 years ago

  • Milestone changed from 2.9 to Future Release

Moving out of 2.9 for now as this is an enhancement not a bug.

#13 @Simek
10 years ago

I've added new patch which update Text Diff to most recent release.

#14 @Simek
10 years ago

  • Milestone changed from Future Release to 3.0

Maybe 3.0 release is the good time to update it?

#15 @nacin
10 years ago

The &'s need to go back in. Those are for PHP4 compatibility.

I wouldn't remove the ticket reference to #7391.

Un-patching those things should make this patch much smaller and would look much better for 3.0. The only changes I see are:

  • New option to diff at the character-level.
  • Detects line breaks, CL vs RF vs CRLF.
  • Two new functions to count number of added and deleted lines.

#16 @nacin
10 years ago

  • Owner set to nacin
  • Status changed from new to reviewing

#17 @automattor
10 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

(In [13211]) Update Text_Diff. Props simek. Fixes #9467

#18 @nacin
10 years ago

  • Keywords needs-unit-tests removed
Note: See TracTickets for help on using tickets.