WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 5 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 6 years ago.
textdiff.new.version.patch (18.8 KB) - added by Simek 6 years ago.
Most recent version according to http://cvs.horde.org/framework/Text_Diff/

Download all attachments as: .zip

Change History (20)

@simek6 years ago

comment:1 follow-up: @hakre6 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

comment:2 in reply to: ↑ 1 @Denis-de-Bernardy6 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?

comment:3 @Denis-de-Bernardy6 years ago

  • Component changed from Administration to Revisions
  • Owner anonymous deleted

comment:4 @hakre6 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.

comment:5 follow-up: @Denis-de-Bernardy6 years ago

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

comment:6 in reply to: ↑ 5 @hakre6 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.

comment:7 @hakre6 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.

comment:8 @Denis-de-Bernardy6 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.

comment:9 @Denis-de-Bernardy6 years ago

  • Milestone changed from 2.8 to Future Release

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

comment:10 @Denis-de-Bernardy6 years ago

  • Milestone changed from Future Release to 2.9

comment:11 @Denis-de-Bernardy6 years ago

  • Keywords needs-unit-tests added

comment:12 @westi6 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.

comment:13 @Simek6 years ago

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

@Simek6 years ago

Most recent version according to http://cvs.horde.org/framework/Text_Diff/

comment:14 @Simek6 years ago

  • Milestone changed from Future Release to 3.0

Maybe 3.0 release is the good time to update it?

comment:15 @nacin6 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.

comment:16 @nacin6 years ago

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

comment:17 @automattor6 years ago

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

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

comment:18 @nacin5 years ago

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