Tags:
create new tag
, view all tags

Feature Proposals » A small patch that will show you the diffs of attachments

Summary

Current State: Developer: Reason: Date: Concerns By: Bug Tracking: Proposed For:
ParkedProposal   None       KampalaRelease

Detail

TopicSummary: A small patch that will show you the diffs of attachments
CurrentState: ParkedProposal
CommittedDeveloper:  
ReasonForDecision: None
DateOfCommitment:  
ConcernRaisedBy:  
BugTracking:  
OutstandingIssues: binaries: The diff twiki uses tries to diff the binaries and garbage is printed to the screen.
RelatedTopics:  
InterestedParties:  
ProposedFor: KampalaRelease
TWikiContributors: AlexChiang

Edit Form

TopicSummary:
CurrentState:
CommittedDeveloper:
ReasonForDecision:
DateOfCommitment:   Format: YYYY-MM-DD
ConcernRaisedBy:
BugTracking:
OutstandingIssues:
RelatedTopics:
InterestedParties:
ProposedFor:
TWikiContributors:
 
This is a small patch that will show you the diffs of attachments. I wrote it with the idea that you could see the differences between various versions of an attached perl script.

There's a problem with binary files. I'm not totally familiar with the way that twiki implements diff, but on my system, diffing two binary files with GNU diff (v2.8.1) returns the message that "binary files foo and bar differ". The diff that twiki uses actually tries to diff the binaries and garbage is printed to the screen. I haven't thought of a way to work around that yet.

In any case, I find it useful. Perhaps someone smarter than me can massage it so that it will handle binary files correctly. These patches are against the latest stable version of TWiki (sorry, can't remember the code name). Please let me know if the patch is screwed up. It seemed to work for me when I tested it.

Category: TWikiPatches

-- AlexChiang - 09 Aug 2003

If there is any chance that this patch can be re-done using -u to give us context that would be great. We should consider it anyway though

-- SvenDowideit - 09 May 2004

I am attaching 3 context patches, respectively for lib/TWiki/Store.pm, bin/attach, and bin/rdiff. These are diffs against the unmodified Feb 2003 release.

-- AlexChiang - 26 Jul 2004

It should be possible to convert popular binary attachment format files (such as MS Word, Powerpoint, PDF, etc.) to HTML in order to facilitate using vanilla diff tools. Google already has the technology to display binary files like these in best effort HTML.

-- NiallMurray - 18 Aug 2005

How does this patch translate to versions 4.x.x ? Or is there already some way to do attachment diffs that I donīt know about?

-- MikkoLaakso - 11 Apr 2007

Eeeeek, another forgotten patch. I'd like to suggest it for the next release - can someone do me a favour and ask me about it in a month? (in case i forget again)

-- SvenDowideit - 11 Apr 2007

SvenDowideit, consider yourself asked.

-- JohnRouillard - 11 May 2007

Sven, did you see this?

-- JohnRouillard - 14 May 2007

I miss this feature as well, would be really useful.

-- MikkoLaakso - 20 May 2007

sven is too busy with user changes to work on this. if someone else would like to take on the task of bring the code patch up-to-date, then this could be something that ships for 4.2. otherwise, i would support its inclusion in a 4.2.1 release.

-- WillNorris - 25 May 2007

This proposal did not make the deadline for Freetown. The target is now Georgetown.

I am convinced noone will look at it for quite a while.

I am stopping the 14-day clock by raising this concern.

I would like to know how the feature will handle binary files such a jpegs, gifs, MS Word docs etc etc. A diff is not worth much unless it is a text file. I would not want to see a feature that produces garbage output for most files.

-- KennethLavrsen - 28 May 2007

This proposal has been waiting for answers to the concern I raised.

How will this feature handle non-text attachments? I cannot see that the attached patches address this.

If this can obvious issue can be handled in the spec (e.g. do not show a diff link unless the extension is one of a known list) then I have no further reservations against the proposal.

Is there still an interest in driving this proposal or do we just park it?

-- KennethLavrsen - 14 Apr 2008

I am parking this proposal based on the fact that the proposer has shown no interest to answer even a simple question for a year now. I park it to give those proposal where there is an interest more focus. To revive - simply un-park it.

-- KennethLavrsen - 29 May 2008

Pinging this topic. Useful feature. Anyone taking this?

-- PeterThoeny - 2010-08-01

Thanks PeterJones for working on this. I propose to limit the types of attachment to show the diffs. Either by the result of RCS ("binary files differ"), or by adding a {DiffAttachmentTypes} configure setting set to 'bat, c, cpp, css, h, htm, html, java, js, pl, py, rtf, sh, txt, svg'. In case a diff cannot be shown, show a message such as "__Note:__ Differences between versions of this binary file cannot be shown."

-- PeterThoeny - 2011-03-08

Peter Jones: Could you edit this page and add the spec & doc at the top of this page?

-- PeterThoeny - 2011-08-23

Doing diff between two large files, which is larger than 10MB, can be time consuming. We'd better setup a size limitation and when a file exceeds that ceiling size, display some warning message to user before going on with diff.

-- YaojunFei - 2012-10-12

In most case, a readable text file won't be so large. I happened to see some large logs files uploaded by our TWiki users.

-- YaojunFei - 2012-10-12

Yes, good idea to add configure option for max size of attachments to handle diff.

Discussed at JerusalemReleaseMeeting2012x10x12: This proposal is inactive. Anyone can claim it as a committed developer to implement the feature.

-- PeterThoeny - 2012-10-13

I changed the status to ParkedProposal due to long inactivity. Anybody feel free to claim and implement this useful feature.

-- Peter Thoeny - 2015-06-18

ChangeProposalForm
TopicClassification FeatureRequest
TopicSummary A small patch that will show you the diffs of attachments
CurrentState ParkedProposal
CommittedDeveloper

ReasonForDecision None
DateOfCommitment

ConcernRaisedBy

BugTracking

OutstandingIssues binaries: The diff twiki uses tries to diff the binaries and garbage is printed to the screen.
RelatedTopics

InterestedParties

ProposedFor KampalaRelease
TWikiContributors AlexChiang
Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatpatch Store.pm.patch r1 manage 1.3 K 2004-07-26 - 23:29 AlexChiang part 1 of 3
Unknown file formatpatch attach.patch r1 manage 1.2 K 2004-07-26 - 23:31 AlexChiang part 2 of 3
TWiki logotwiki patch.twiki r1 manage 6.0 K 2003-08-09 - 08:06 AlexChiang patch to diff attachments
Unknown file formatpatch rdiff.patch r1 manage 1.6 K 2004-07-26 - 23:32 AlexChiang part 3 of 3
Edit | Attach | Watch | Print version | History: r27 < r26 < r25 < r24 < r23 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r27 - 2015-06-18 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.